Skip to main content

n8n + Apify Integration Guide: Automate Web Scraping Workflows (2026)

· 3 min read
Yassine El Haddad
Software Developer & Automation Specialist

I build production AI agents, web scrapers, and automation pipelines. Most of what I publish here comes from the actual problems they run into: proxies that get banned, anti-bot stacks that fingerprint your client, RAG that drifts when the underlying data moves. Stack: Python, TypeScript, Go, FastAPI, LangChain, Crawlee, Playwright, deployed on AWS, GCP, and Cloudflare.

n8n is an open-source workflow automation tool. Apify provides cloud-hosted web scraping Actors. Together they form a powerful pipeline: Apify collects data, n8n orchestrates where it goes next — Google Sheets, Slack, databases, AI models, or downstream APIs.

This guide shows three integration patterns with working node configurations.

Integration Architecture

[Trigger] → [Run Apify Actor] → [Wait for Completion] → [Fetch Dataset] → [Process + Store]

n8n can trigger Apify in two ways:

  1. HTTP Request node — call Apify's REST API directly
  2. Webhook node — receive Apify run completion notifications (push model)

Pattern 1: Schedule + Scrape + Store to Google Sheets

This runs an Apify Actor on a schedule and stores results in a Google Sheet.

Step 1: Schedule Trigger

  • Node: Schedule Trigger
  • Interval: Every day at 9 AM

Step 2: Run Apify Actor

  • Node: HTTP Request
  • Method: POST
  • URL: https://api.apify.com/v2/acts/apify~google-maps-scraper/runs?fpr=use-apify
  • Headers:
    { "Authorization": "Bearer YOUR_APIFY_TOKEN", "Content-Type": "application/json" }
  • Body:
    {
    "searchStringsArray": ["coffee shops London"],
    "maxCrawledPlacesPerSearch": 50
    }

Step 3: Wait for Run to Complete

  • Node: HTTP Request (poll or use built-in wait)
  • Method: GET
  • URL: https://api.apify.com/v2/acts/apify~google-maps-scraper/runs/%7B%7B?fpr=use-apify $json.data.id }}
  • Use n8n's Wait node (60 seconds) before this check
  • Continue only when status === "SUCCEEDED"

Step 4: Fetch Dataset Items

  • Node: HTTP Request
  • Method: GET
  • URL: https://api.apify.com/v2/datasets/%7B%7B?fpr=use-apify $json.data.defaultDatasetId }}/items?format=json
  • Headers: { "Authorization": "Bearer YOUR_APIFY_TOKEN" }

Step 5: Split Into Items

  • Node: Split In Batches (to handle the array)

Step 6: Append to Google Sheets

  • Node: Google SheetsAppend Row
  • Map fields from Apify output to sheet columns

Pattern 2: Webhook-Driven (Event-Based)

Instead of polling, configure Apify to push run completion to n8n:

In n8n:

  1. Add a Webhook node (trigger mode)
  2. Copy the webhook URL (e.g., https://your-n8n.example.com/webhook/abc123)

In Apify Console:

  1. Go to your Actor → Settings → Webhooks
  2. Add webhook:
    • Event: ACTOR.RUN.SUCCEEDED
    • URL: Your n8n webhook URL
    • Payload: { "runId": {{runId}}, "datasetId": {{defaultDatasetId}} }

n8n continues on webhook receipt:

[Webhook] → [HTTP: Fetch dataset items] → [Process] → [Store]

This is more efficient than polling for long-running Actors.


Pattern 3: AI Data Pipeline (Apify → n8n → OpenAI → Slack)

Scrape competitor mentions, summarize with GPT-4o, and post to Slack:

[Schedule] → [Apify: Twitter Scraper] → [Split items] → [OpenAI: Summarize] → [Slack: Post summary]

HTTP Request to Apify Twitter Scraper:

{
"searchTerms": ["your-brand"],
"maxItems": 50,
"since": "2026-03-18"
}

OpenAI node:

  • Model: gpt-4o
  • Prompt: Summarize the sentiment and key themes in these tweets: {{ $json.full_text }}

Slack node:

  • Channel: #competitive-intel
  • Message: {{ $node['OpenAI'].json['choices'][0]['message']['content'] }}

Useful Apify API Endpoints for n8n

ActionMethod + URL
Run ActorPOST /v2/acts/{actorId}/runs
Check run statusGET /v2/actor-runs/{runId}
Get dataset itemsGET /v2/datasets/{datasetId}/items
List last runsGET /v2/acts/{actorId}/runs

All endpoints require Authorization: Bearer YOUR_TOKEN header.

Get your API token at console.apify.com → Settings → Integrations.


n8n vs Make.com for Apify Integration

Both tools integrate with Apify via HTTP nodes:

n8nMake.com
Apify native nodeNo (use HTTP)Yes (Apify module)
PricingFree self-hostedFree 1,000 ops/month
ComplexityHigher (more flexible)Lower (visual mapping)
Self-hostingYesNo
Best forDevelopers, complex flowsBusiness users, quick setup

For the easiest setup, Make.com's native Apify module eliminates the need to construct API calls manually.

Common mistakes and fixes

n8n HTTP node returns 401 from Apify API.

Check that the Authorization header value is 'Bearer YOUR_API_TOKEN' (with space after Bearer). The token is under Apify Console → Settings → Integrations → API tokens.

Actor run returns status 'SUCCEEDED' but dataset is empty.

The Actor may have run but produced no output — check the Actor logs. Also verify the run ID is correct when fetching dataset items; use the run ID from the start-run response, not the Actor ID.

n8n workflow triggers too frequently and hits Apify rate limits.

Apify API rate limit is 120 requests/minute per token. Add a 'Wait' node in n8n, or use Apify's native scheduler instead of n8n for the trigger.