|
| 1 | +--- |
| 2 | + |
| 3 | +## title: n8n |
| 4 | +description: Connect CoreClaw to n8n workflows using the CoreClaw community node |
| 5 | +sidebar: |
| 6 | + order: 1 |
| 7 | + |
| 8 | +Use [n8n](https://n8n.io/) to build automated workflows that trigger CoreClaw Workers, poll run status, and route results to any service — no code required. |
| 9 | + |
| 10 | +## How it works |
| 11 | + |
| 12 | +The CoreClaw n8n integration provides a dedicated community node (`n8n-nodes-coreclaw`) with built-in actions for common operations: |
| 13 | + |
| 14 | +- **Start a Worker** — Run any Worker from the CoreClaw Store |
| 15 | +- **Check run status** — Poll execution progress |
| 16 | +- **Get results** — Retrieve output data |
| 17 | +- **Abort a run** — Cancel an in-progress execution |
| 18 | + |
| 19 | +You can also use the **HTTP Request** node to call the CoreClaw REST API directly for advanced use cases. |
| 20 | + |
| 21 | +## Prerequisites |
| 22 | + |
| 23 | +- A [CoreClaw](https://console.coreclaw.com/sign-up) account |
| 24 | +- An API key from **Settings → API & Integrations** in the [CoreClaw Console](https://console.coreclaw.com/settings/integrations) |
| 25 | +- An n8n instance (cloud or self-hosted) |
| 26 | + |
| 27 | +--- |
| 28 | + |
| 29 | +## n8n Cloud setup |
| 30 | + |
| 31 | +### Install the CoreClaw node |
| 32 | + |
| 33 | +For n8n Cloud users, installation is straightforward — search and add the node directly from the canvas. |
| 34 | + |
| 35 | +1. In n8n Cloud, create a new workflow or open an existing one. |
| 36 | +2. Open the **nodes panel** (click the **+** button on the canvas). |
| 37 | +3. Search for **CoreClaw** in the community node registry. |
| 38 | + |
| 39 | +Search for CoreClaw node in n8n |
| 40 | + |
| 41 | +1. Click **Install node** to add the CoreClaw node to your instance. |
| 42 | + |
| 43 | +Install n8n-nodes-coreclaw package |
| 44 | + |
| 45 | +After installation, you can find the CoreClaw node under **Community Nodes** in the nodes panel. |
| 46 | + |
| 47 | +CoreClaw node in Community Nodes list |
| 48 | + |
| 49 | +### Create credentials |
| 50 | + |
| 51 | +Before using the CoreClaw node, you need to create a credential with your CoreClaw API key. |
| 52 | + |
| 53 | +1. In n8n, go to **Credentials** → **Add Credential**. |
| 54 | +2. Search for **CoreClaw API** and select it. |
| 55 | + |
| 56 | +Create CoreClaw API credential |
| 57 | + |
| 58 | +1. Enter a name for the credential (e.g., "CoreClaw Production"). |
| 59 | +2. In the **API Key** field, paste the API key you copied from the [CoreClaw Console](https://console.coreclaw.com/settings/integrations). |
| 60 | + |
| 61 | +Enter API key and save credential |
| 62 | + |
| 63 | +1. Click **Save** to store the credential. |
| 64 | + |
| 65 | +You can now use this credential in any CoreClaw node in your workflows. |
| 66 | + |
| 67 | +--- |
| 68 | + |
| 69 | +## n8n self-hosted setup |
| 70 | + |
| 71 | +If you're running a self-hosted n8n instance, install the CoreClaw community node from the settings. |
| 72 | + |
| 73 | +### Install |
| 74 | + |
| 75 | +1. Open your n8n instance. |
| 76 | +2. Go to **Settings** → **Community Nodes**. |
| 77 | +3. Click **Install a community node**. |
| 78 | +4. Enter the npm package name: `n8n-nodes-coreclaw` |
| 79 | +5. Agree to the [risks](https://docs.n8n.io/integrations/community-nodes/risks/) of using community nodes and click **Install**. |
| 80 | +6. After installation, the CoreClaw node appears in your nodes panel under **Community Nodes**. |
| 81 | + |
| 82 | +### Connect |
| 83 | + |
| 84 | +Follow the same steps as [Create credentials](#create-credentials) above to set up your CoreClaw API key. |
| 85 | + |
| 86 | +--- |
| 87 | + |
| 88 | +## CoreClaw node actions |
| 89 | + |
| 90 | +The CoreClaw node provides several built-in actions for common operations. |
| 91 | + |
| 92 | +### Start a Worker |
| 93 | + |
| 94 | +Run any Worker from the CoreClaw Store. |
| 95 | + |
| 96 | + |
| 97 | +| Field | Description | |
| 98 | +| -------------------- | ------------------------------------------------------------------------ | |
| 99 | +| **Worker Slug** | The unique identifier of the Worker (e.g., `01KNXSHE0Y7DZKF1N8B1EMFX35`) | |
| 100 | +| **Version** | The Worker version to run (leave empty for latest) | |
| 101 | +| **Input Parameters** | Worker-specific input fields (varies by Worker) | |
| 102 | +| **Proxy Region** | Optional proxy region for the run | |
| 103 | +| **Callback URL** | Optional webhook URL for async notifications | |
| 104 | + |
| 105 | + |
| 106 | +Get the `scraper_slug` (Worker Slug) from the Worker page in the [CoreClaw Console](https://console.coreclaw.com/store) or from the API (`GET /api/scraper?slug=<scraper_slug>`). |
| 107 | + |
| 108 | +### Check Run Status |
| 109 | + |
| 110 | +Poll the status of a running or completed Worker execution. |
| 111 | + |
| 112 | + |
| 113 | +| Field | Description | |
| 114 | +| ------------ | -------------------------------------------------- | |
| 115 | +| **Run Slug** | The run identifier returned when starting a Worker | |
| 116 | + |
| 117 | + |
| 118 | +Status codes: `1` Ready, `2` Running, `3` Succeeded, `4` Failed, `5` Aborting. |
| 119 | + |
| 120 | +### Get Results |
| 121 | + |
| 122 | +Retrieve the output data from a completed run. |
| 123 | + |
| 124 | + |
| 125 | +| Field | Description | |
| 126 | +| -------------- | ---------------------------------------- | |
| 127 | +| **Run Slug** | The run identifier | |
| 128 | +| **Page Index** | Page number for pagination (default: 1) | |
| 129 | +| **Page Size** | Number of results per page (default: 20) | |
| 130 | + |
| 131 | + |
| 132 | +For large datasets, use the **Export Results** action to download a JSON or CSV file. |
| 133 | + |
| 134 | +### Abort a Run |
| 135 | + |
| 136 | +Cancel an in-progress Worker execution. |
| 137 | + |
| 138 | + |
| 139 | +| Field | Description | |
| 140 | +| ------------ | --------------------------- | |
| 141 | +| **Run Slug** | The run identifier to abort | |
| 142 | + |
| 143 | + |
| 144 | +--- |
| 145 | + |
| 146 | +## Example workflow |
| 147 | + |
| 148 | +Here's a typical n8n workflow using CoreClaw: |
| 149 | + |
| 150 | +1. **Trigger** — Schedule Trigger (e.g., every day at 9 AM) or Webhook |
| 151 | +2. **CoreClaw: Start a Worker** — Run a web scraper with target URLs |
| 152 | +3. **Wait** — Wait 30 seconds for the run to progress |
| 153 | +4. **CoreClaw: Check Run Status** — Poll until status is `3` (Succeeded) |
| 154 | +5. **IF** — Check if status equals `3` |
| 155 | + - **True** → Continue to get results |
| 156 | + - **False** → Loop back to Wait |
| 157 | +6. **CoreClaw: Get Results** — Retrieve the scraped data |
| 158 | +7. **Downstream nodes** — Send to Google Sheets, Slack, database, etc. |
| 159 | + |
| 160 | +--- |
| 161 | + |
| 162 | +## Using HTTP Request node (advanced) |
| 163 | + |
| 164 | +For operations not covered by the CoreClaw node, use the **HTTP Request** node to call the CoreClaw REST API directly. |
| 165 | + |
| 166 | +### Configuration |
| 167 | + |
| 168 | + |
| 169 | +| Field | Value | |
| 170 | +| ----------------- | ------------------------------------------------ | |
| 171 | +| Method | `POST` (most endpoints) | |
| 172 | +| URL | `https://openapi.coreclaw.com/api/v1/<endpoint>` | |
| 173 | +| Authentication | **Header Auth** | |
| 174 | +| Header Name | `api-key` | |
| 175 | +| Header Value | Your CoreClaw API key | |
| 176 | +| Body Content Type | `JSON` | |
| 177 | + |
| 178 | + |
| 179 | +### Common endpoints |
| 180 | + |
| 181 | + |
| 182 | +| Action | Method | Endpoint | |
| 183 | +| ----------------------- | ------ | ---------------------------------- | |
| 184 | +| Get Worker schema | `GET` | `/api/scraper?slug=<scraper_slug>` | |
| 185 | +| Start a Worker | `POST` | `/api/v1/scraper/run` | |
| 186 | +| Run a Task template | `POST` | `/api/v1/task/run` | |
| 187 | +| Check run status | `POST` | `/api/v1/run/detail` | |
| 188 | +| Get results (paginated) | `POST` | `/api/v1/run/result/list` | |
| 189 | +| Export results (file) | `POST` | `/api/v1/run/result/export` | |
| 190 | +| Abort a run | `POST` | `/api/v1/scraper/abort` | |
| 191 | + |
| 192 | + |
| 193 | +Full API reference: [API Integration](/api/integration/). |
| 194 | + |
| 195 | +--- |
| 196 | + |
| 197 | +## Tips |
| 198 | + |
| 199 | +- **Store the API key as an n8n credential** — Never hardcode it in nodes. |
| 200 | +- **Use expressions** — Pass data between nodes with `{{ $json.run_slug }}` instead of manual copy-paste. |
| 201 | +- **Handle errors** — Check the `code` field in responses. Non-zero means an error occurred. |
| 202 | +- **Rate limits** — If you receive `code: 4290`, add a Wait node before retrying. |
| 203 | +- **Webhook callbacks** — Set `callback_url` when starting a Worker to receive notifications instead of polling. |
| 204 | + |
| 205 | +--- |
| 206 | + |
| 207 | +## Troubleshooting |
| 208 | + |
| 209 | +**Node not appearing after installation** |
| 210 | + |
| 211 | +1. Refresh the n8n page. |
| 212 | +2. Check **Settings → Community Nodes** — the node should be listed there. |
| 213 | +3. If using n8n Cloud, ensure verified community nodes are enabled in the Cloud Admin Panel. |
| 214 | + |
| 215 | +**Invalid API key error** |
| 216 | + |
| 217 | +1. Verify the API key in the [CoreClaw Console](https://console.coreclaw.com/settings/integrations). |
| 218 | +2. Ensure there are no extra spaces or line breaks in the credential. |
| 219 | +3. Test the key with a curl command: |
| 220 | + |
| 221 | +```bash |
| 222 | +curl -X POST "https://openapi.coreclaw.com/api/v1/account/info" \ |
| 223 | + -H "api-key: YOUR_API_KEY" \ |
| 224 | + -H "content-type: application/json" \ |
| 225 | + --data "{}" |
| 226 | +``` |
| 227 | + |
| 228 | +A successful response contains `code: 0`. |
| 229 | + |
| 230 | +**Worker-specific input fields** |
| 231 | + |
| 232 | +Each Worker has different input parameters. To find the correct fields: |
| 233 | + |
| 234 | +1. Open the Worker in the [CoreClaw Console](https://console.coreclaw.com/store). |
| 235 | +2. Go to the **Input** tab. |
| 236 | +3. Click the **API** button in the top-right corner. |
| 237 | +4. Select **API clients** to view ready-to-use code snippets. |
| 238 | + |
| 239 | +Or call the API: |
| 240 | + |
| 241 | +```bash |
| 242 | +curl "https://openapi.coreclaw.com/api/scraper?slug=YOUR_SCRAPER_SLUG" |
| 243 | +``` |
| 244 | + |
| 245 | +The response contains `data.parameters.custom.properties` — each entry maps to an input field. |
0 commit comments