Skip to main content
Tutorial

n8n workflows that scrape and enrich

Build reliable n8n web scraping workflows with the HTTP Request node, cron scheduling, and error branches, using a scrape API that returns clean markdown.

fastcrw
By RecepNovember 27, 20269 min read

n8n web scraping workflows: HTTP node, scheduling, and error handling

An n8n web scraping workflow that survives production has three parts: a node that fetches clean content instead of raw HTML, a schedule trigger that runs on a cadence you control, and an error branch that catches failed requests instead of silently dropping rows. This guide builds all three using n8n's built-in HTTP Request node against the fastCRW scrape API, which returns markdown or structured JSON directly, so you skip the HTML-parsing node entirely.

n8n does not ship a scraping node. The common approach is either a raw HTTP Request against the target site (fragile: JavaScript-rendered pages return an empty shell, and most sites block generic user agents) or a headless-browser sub-workflow (heavy: a Puppeteer or Playwright step inside n8n needs its own container and slows every run). Calling a scrape API from the HTTP Request node keeps the workflow to native nodes only, with rendering and anti-bot handling done upstream.

Workflow 1: scheduled scrape into a table

The most common pattern is "check this page daily and store what changed." Four nodes: Schedule Trigger, HTTP Request, a Set/Edit Fields node to shape the output, and a database node (Postgres, Airtable, Google Sheets).

  1. Schedule Trigger: set to Cron mode, e.g. 0 6 * * * for 06:00 daily.
  2. HTTP Request node: POST to the scrape endpoint. Method: POST, URL: https://api.fastcrw.com/v1/scrape, Authentication: Generic Credential Type > Header Auth with header name Authorization and value Bearer crw_live_your_key. Body (JSON):
{
  "url": "https://example.com/pricing",
  "formats": ["markdown"],
  "onlyMainContent": true
}

The response body carries data.markdown and data.metadata. In the next node, reference it as {{ $json.data.markdown }}.

  1. Edit Fields node: map data.markdown, data.metadata.title, and a timestamp expression {{ $now.toISO() }} into the columns your table expects.
  2. Database node: append or upsert the row. For change detection, hash the markdown (an Edit Fields expression with a small crypto function, or a Code node with two lines) and compare against the last stored hash before writing.

Test with the pin icon on the HTTP Request node before wiring the rest, the fastest way to see the real response shape is to run that single node and inspect its output panel, not to guess from docs.

Workflow 2: batch scrape a list of URLs

For enrichment workflows (a spreadsheet of company URLs that needs a description or contact page pulled for each row), loop over the input with a Split In Batches node so you don't fire hundreds of requests at once.

  1. Source node (Google Sheets / Airtable / a Code node with an array) feeding one URL per item.
  2. Split In Batches: batch size 5 to 10, so the HTTP Request node inside the loop runs a bounded number of concurrent items per pass rather than the whole list at once.
  3. HTTP Request node inside the loop, URL set from the item: {{ $json.url }} substituted into the same POST body as above.
  4. Merge back into the original sheet by row ID once the loop completes.

If you only need URLs discovered from a site rather than a fixed list, replace step 1 with a single HTTP Request to the map endpoint, which returns every URL on a domain in one call instead of a crawl job:

POST https://api.fastcrw.com/v1/map
{
  "url": "https://example.com"
}

The response's data.links array is exactly the array Split In Batches expects next.

Workflow 3: crawl and poll for completion

Crawling a whole site is asynchronous: you start a job and poll until it finishes, rather than waiting on one long HTTP call. n8n handles this with an HTTP Request to start the crawl, then a Wait node plus a loop back to a status-check HTTP Request.

  1. Start crawl: POST https://api.fastcrw.com/v1/crawl with {"url": "https://example.com", "limit": 50, "maxDepth": 2}. The response returns a job id.
  2. Wait node: 15 to 30 seconds.
  3. Status check: GET https://api.fastcrw.com/v1/crawl/{{ $json.id }}.
  4. IF node: branch on {{ $json.status }}. If scraping, loop back to the Wait node. If completed, continue to processing; if failed, route to the error branch below.

Set a max-iteration guard (a counter in a Code node, or n8n's built-in loop limit) so a stuck job doesn't poll forever and eat your workflow's execution quota.

Error handling: don't let one bad URL kill the run

The HTTP Request node's default behavior is to stop the whole workflow on a non-2xx response. For a batch of 50 URLs, one dead link should not abort the other 49. Fix this in two settings:

  • On the HTTP Request node, open Settings > On Error and set it to Continue (using error output). This adds a second output branch on the node that fires only on failure, carrying the error message in $json.error.
  • Wire that error output to a logging step (append the failed URL + error to a "failures" sheet or table) instead of leaving it disconnected, which silently drops the item.

For a workflow-level safety net, add an Error Trigger node as a separate trigger in the same workflow (or a dedicated error-handling workflow referenced in Workflow Settings > Error Workflow). It fires on any unhandled node failure and can post to Slack or email, so a schema change on the target site or an expired API key surfaces immediately instead of showing up as "the sheet stopped updating" three days later.

A distinct failure mode worth branching on separately: a 200 response where the target page returned a bot-detection wall instead of real content. Check data.metadata.statusCode and the length of data.markdown: a suspiciously short markdown body (under a few hundred characters) on a page you know has more content is a signal to retry with renderJs: true in the request body rather than treat it as success.

Failure typeWhere it shows upFix in n8n
Target site down / timeoutHTTP Request node, non-2xx or timeoutError output branch → log row, continue loop
Invalid API key401 on every requestError Workflow → alert immediately, don't retry per-item
Rate limit hit429 responses mid-batchReduce Split In Batches size; add Wait node between batches
Bot wall / thin content200 but tiny markdown bodyIF node on content length → retry with renderJs true
Crawl job stuckStatus stays "scraping" indefinitelyLoop counter cap → route to error log after N polls

Which scraping approach fits an n8n workflow

The right node choice depends on what the target site needs and how much you want n8n itself to manage.

ApproachNodes neededHandles JavaScript pagesHandles anti-bot
Raw HTTP Request to target site1NoNo
HTTP Request + HTML Extract node2-3NoNo
Headless browser sub-workflow (Puppeteer container)3+ and a separate serviceYesManual, per-site
HTTP Request to a scrape API1Yes (auto-escalated server-side)Handled upstream

For a handful of static pages, a raw HTTP Request plus n8n's HTML Extract node is genuinely enough and adding an external API is unnecessary. Reach for a scrape API when the target renders content with JavaScript, blocks generic clients, or when the workflow needs markdown/structured JSON directly instead of a DOM you'd parse yourself. In an independent test against Firecrawl's own 1,000-URL benchmark set, fastCRW's scrape endpoint measured 63.74% truth-recall (522 of 819 labeled URLs) against Crawl4AI's 59.95% and Firecrawl's 56.04%, at 87.7% scrape success (877/1,000) with 0 thrown errors across 3,000 requests (diagnose_3way.py, 2026-05-08). Full methodology is on the benchmarks page.

Structured extraction inside the same workflow

If the goal isn't the whole page but specific fields (price, availability, contact email), skip the markdown-then-Code-node-regex step and ask the extract endpoint for a JSON schema directly:

POST https://api.fastcrw.com/v1/extract
{
  "urls": ["https://example.com/product"],
  "schema": {
    "type": "object",
    "properties": {
      "price": { "type": "string" },
      "inStock": { "type": "boolean" }
    }
  }
}

The response's data object matches your schema, so the next node in n8n can map straight into your table columns with no parsing logic in the workflow at all. Extract runs an LLM behind the schema, so it costs more per page than a plain scrape and adds latency, but it removes an entire branch of the workflow (write once, or spend n8n nodes writing a regex that breaks the next time the page's HTML changes).

Credentials and rate limits

Store the API key as an n8n credential (Header Auth), never pasted into the node body, so it does not appear in exported workflow JSON or execution logs. On the target API side, fastCRW's free tier includes 1,000 one-time credits (no card required) and each scrape, crawl page, or map page costs 1 credit; self-hosting the engine is free under AGPL-3.0 if you'd rather run it yourself and have n8n's HTTP Request node point at localhost instead. See pricing for the cloud tiers, or the GitHub repo to self-host.

Where fastCRW is not the right tool: if you're scraping a single static page you fully control and don't need JS rendering, a raw HTTP Request node is simpler and free of any external dependency. And if the target explicitly disallows automated access in its terms, no API changes that.

Sources

FAQ

Frequently asked questions

Does n8n have a built-in web scraping node?
No. n8n has an HTTP Request node and an HTML Extract node for parsing static HTML, but no dedicated scraping node with JavaScript rendering or anti-bot handling. Most production workflows point the HTTP Request node at a scrape API instead.
How do I stop one failed URL from breaking my n8n batch?
Open the HTTP Request node's Settings and set On Error to Continue (using error output). This adds a second output branch that carries the failure so you can log it and let the rest of the batch keep running.
How do I schedule a scraping workflow in n8n?
Add a Schedule Trigger node in Cron mode, e.g. 0 6 * * * for a 06:00 daily run, and connect it directly to your HTTP Request node. n8n runs the whole downstream chain on that cadence with no extra service needed.
Can n8n scrape JavaScript-rendered pages?
The HTTP Request node alone cannot execute JavaScript, so a client-rendered page returns an empty shell. Either add a headless-browser sub-workflow, or call a scrape API that renders JavaScript server-side and returns markdown or HTML to the HTTP Request node directly.
How do I poll a long-running crawl job in n8n?
Start the crawl with one HTTP Request that returns a job id, then loop a Wait node into a second HTTP Request that checks job status. Branch on the status field with an IF node, and cap the loop with a counter so a stuck job doesn't poll forever.

Get Started

Try fastCRW free

Run a live request in the playground — no signup required. Or grab a free API key with 1000 free credits, no credit card.

Continue exploring

More tutorial posts

View category archive