Description
@trawlme/n8n-nodes-trawl
An n8n community node for Install community nodes.
Credentials
The node uses a Trawl API credential:
| Field | Value |
| — | — |
| API Key | A Trawl API key, starting with trawl_. Create one in the Trawl app, on the Developers page. |
| Base URL | https://api.trawl.me (default). Change it only to target another Trawl instance. |
The key is sent as Authorization: Bearer . n8n checks it with a one-item scrap list.
Scopes the key needs, by operation:
| Operation | Scope |
| — | — |
| Credential test and the “From List” scrap picker | trawl:scraps:read |
| Get Many | trawl:scraps:read |
| Run | trawl:scraps:run |
| Get Latest Result | trawl:scraps:read and trawl:history:read |
Pick the scrap from a searchable list, or paste its ID (24 hex characters).
Parameters
Parameters lets one scrap serve many inputs. Give a JSON object (or an expression that returns one). The keys must match the scrap’s stored parameter keys exactly (normally TRAWL.), and all of them are required. A mismatch fails the run with a 422. A scrap with no parameters ignores them. With Wait for Result off the body is not checked up front, so a wrong key fails the run later. TRAWL.url can never be overridden.
{ "TRAWL.city": "Paris", "TRAWL.limit": 20 }
Invalid JSON, or a value that is not an object, fails the node with an error naming the field.
Output
- Rows (default): one item per scraped row.
- Full Response: one item per call,
{ statusCode, body }, wherebodyis the raw API JSON{ type, message, data }. It works like the HTTP Request node with “include status” on and “never error”: an HTTP error status (for example a429when a run is already in progress) is output, not thrown, so the workflow can branch onstatusCode. A network error or a timeout still fails the node. Full Response always outputs one item, so the zero-row case of Rows does not apply.
Get Latest Result fails with a clear message when the scrap has never run, when a run is still in progress, when the last run failed, or when the stored data of the last run has aged out. A successful run with zero rows outputs nothing, and so does Run with zero rows: n8n ends the branch there, so for scheduled flows turn on the node setting Always Output Data. Turn on Continue On Fail to get the error as an item instead.
Example workflow
Every morning, run a scrap and post the number of rows to a chat:
1. Schedule Trigger: every day at 08:00.
2. Trawl: Resource Scrap, Operation Run, pick your scrap, Wait for Result on.
3. Any next node (Google Sheets, Slack, a database, …) receives one item per scraped row.
To read data that a Trawl schedule already collected, use Get Latest Result instead of Run: it costs no run.
Import this skeleton with Import from clipboard, then select your credential and scrap:
{
"nodes": [
{
"parameters": { "rule": { "interval": [{ "triggerAtHour": 8 }] } },
"name": "Every morning",
"type": "n8n-nodes-base.scheduleTrigger",
"typeVersion": 1.2,
"position": [0, 0]
},
{
"parameters": {
"resource": "scrap",
"operation": "run",
"scrapId": { "_rl": true, "mode": "id", "value": "YOURSCRAP_ID" },
"waitForResult": true
},
"name": "Trawl",
"type": "@trawlme/n8n-nodes-trawl.trawl",
"typeVersion": 1,
"position": [220, 0]
}
],
"connections": {
"Every morning": { "main": [[{ "node": "Trawl", "type": "main", "index": 0 }]] }
}
}
Development
npm ci
npm run lint
npm run build
npm test
npm run dev # starts a local n8n with the node loaded
Releases are automatic and published from GitHub Actions with npm provenance:
main runs semantic-release (conventional commits), tags vX.Y.Z and publishes to the npm next tag (.github/workflows/release.yml). latest does not move.Promote workflow with that version (.github/workflows/promote.yml): it moves latest to it.npm publish or npm run release by hand. The one exception is the one-time bootstrap described in the release.yml header.