AutomationFlowsWeb Scraping › Bypass Cloudflare Turnstile for Web Scraping with 2captcha

Bypass Cloudflare Turnstile for Web Scraping with 2captcha

ByLudwig @ludwig on n8n.io

This workflow contains community nodes that are only compatible with the self-hosted version of n8n.

Event trigger★★★★☆ complexity18 nodesExecute Workflow TriggerHTTP RequestStop And ErrorN8N Nodes Puppeteer
Web Scraping Trigger: Event Nodes: 18 Complexity: ★★★★☆ Added:

This workflow corresponds to n8n.io template #7151 — we link there as the canonical source.

This workflow follows the Execute Workflow Trigger → HTTP Request recipe pattern — see all workflows that pair these two integrations.

The workflow JSON

Copy or download the full n8n JSON below. Paste it into a new n8n workflow, add your credentials, activate. Full import guide →

Download .json
{
  "id": "YU0WAOtF9hea7N32",
  "meta": {
    "templateCredsSetupCompleted": true
  },
  "name": "Bypass Cloudflare Turnstile for Web Scraping with n8n",
  "tags": [],
  "nodes": [
    {
      "id": "82693aca-f1ba-42a6-aa00-46043a6ee20d",
      "name": "Execute Workflow Trigger",
      "type": "n8n-nodes-base.executeWorkflowTrigger",
      "position": [
        420,
        402
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "02e86bac-28df-493a-a32c-0310d62bdd59",
      "name": "Set destination_url value",
      "type": "n8n-nodes-base.set",
      "position": [
        620,
        402
      ],
      "parameters": {},
      "executeOnce": true,
      "typeVersion": 3.4
    },
    {
      "id": "352ae1ee-3d99-4282-94be-b258e2929b58",
      "name": "Get destination web page",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        820,
        400
      ],
      "parameters": {},
      "executeOnce": true,
      "typeVersion": 4.2
    },
    {
      "id": "4e3ed4c0-88bb-48de-97f5-d95af77f5fd0",
      "name": "Extract Turnstile Sitekey",
      "type": "n8n-nodes-base.code",
      "position": [
        1020,
        400
      ],
      "parameters": {},
      "typeVersion": 2
    },
    {
      "id": "c95b46ec-f42d-463d-89c9-ad1c23462143",
      "name": "Wait 30 seconds",
      "type": "n8n-nodes-base.wait",
      "position": [
        1420,
        402
      ],
      "parameters": {},
      "typeVersion": 1.1
    },
    {
      "id": "733cab5b-fa74-4bc8-a76d-908ab1624baa",
      "name": "Create Captcha Task",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        1220,
        400
      ],
      "parameters": {},
      "executeOnce": true,
      "typeVersion": 4.2
    },
    {
      "id": "9fdcbc00-21aa-4e6b-8a98-d8aaa05f2dbe",
      "name": "Get Captcha Solution",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        1620,
        400
      ],
      "parameters": {},
      "executeOnce": true,
      "typeVersion": 4.2
    },
    {
      "id": "e877d8e4-5e02-43e8-9997-42aa532da92f",
      "name": "No operation - return loop",
      "type": "n8n-nodes-base.noOp",
      "position": [
        2000,
        542
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "1bbc2b4d-3d50-4731-8372-8702edfc5ec7",
      "name": "Raise runIndex error",
      "type": "n8n-nodes-base.stopAndError",
      "position": [
        2220,
        402
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "98bcbd64-b443-4fd8-8e01-9a33e7fe7b12",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        400,
        600
      ],
      "parameters": {
        "content": ""
      },
      "typeVersion": 1
    },
    {
      "id": "f9e80add-bb12-479a-95e4-18fa25c6ef5f",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        360,
        300
      ],
      "parameters": {
        "content": ""
      },
      "typeVersion": 1
    },
    {
      "id": "e7e3b6f6-ccc5-42a4-a1ab-90862fea7401",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        560,
        362
      ],
      "parameters": {
        "content": ""
      },
      "typeVersion": 1
    },
    {
      "id": "cb30271c-c963-40a6-b4b4-599ad8c7fe89",
      "name": "When clicking \u2018Test workflow\u2019",
      "type": "n8n-nodes-base.manualTrigger",
      "position": [
        440,
        60
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "089464e5-16dd-4008-8408-5a37ab5d30e3",
      "name": "Check Captcha Status",
      "type": "n8n-nodes-base.switch",
      "position": [
        1820,
        400
      ],
      "parameters": {},
      "typeVersion": 3.2
    },
    {
      "id": "f4a6d929-b885-4176-8980-5011228e9dec",
      "name": "Puppeteer",
      "type": "n8n-nodes-puppeteer.puppeteer",
      "position": [
        880,
        60
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "12bbd971-1112-4abf-803a-cce62fa3d84b",
      "name": "Pass CF Turnstile check using 2Captcha",
      "type": "n8n-nodes-base.executeWorkflow",
      "position": [
        660,
        60
      ],
      "parameters": {},
      "typeVersion": 1.1
    },
    {
      "id": "1161dd05-a426-4c4b-aece-89ec1160a5d6",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        360,
        -20
      ],
      "parameters": {
        "content": ""
      },
      "typeVersion": 1
    },
    {
      "id": "642676a6-eddc-41e7-8fbb-b19628de137a",
      "name": "Sticky Note9",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1820,
        1020
      ],
      "parameters": {
        "content": ""
      },
      "typeVersion": 1
    }
  ],
  "active": false,
  "settings": {
    "executionOrder": "v1"
  },
  "versionId": "dee57826-ca00-425a-b328-0b31f43e2f4e",
  "connections": {
    "Wait 30 seconds": {
      "main": [
        [
          {
            "node": "Get Captcha Solution",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Create Captcha Task": {
      "main": [
        [
          {
            "node": "Wait 30 seconds",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Check Captcha Status": {
      "main": [
        [],
        [
          {
            "node": "Raise runIndex error",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "No operation - return loop",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get Captcha Solution": {
      "main": [
        [
          {
            "node": "Check Captcha Status",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Execute Workflow Trigger": {
      "main": [
        [
          {
            "node": "Set destination_url value",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get destination web page": {
      "main": [
        [
          {
            "node": "Extract Turnstile Sitekey",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Extract Turnstile Sitekey": {
      "main": [
        [
          {
            "node": "Create Captcha Task",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Set destination_url value": {
      "main": [
        [
          {
            "node": "Get destination web page",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "No operation - return loop": {
      "main": [
        [
          {
            "node": "Wait 30 seconds",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "When clicking \u2018Test workflow\u2019": {
      "main": [
        [
          {
            "node": "Pass CF Turnstile check using 2Captcha",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Pass CF Turnstile check using 2Captcha": {
      "main": [
        [
          {
            "node": "Puppeteer",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}
Pro

For the full experience including quality scoring and batch install features for each workflow upgrade to Pro

About this workflow

This workflow contains community nodes that are only compatible with the self-hosted version of n8n.

Source: https://n8n.io/workflows/7151/ — original creator credit. Request a take-down →

More Web Scraping workflows → · Browse all categories →

Related workflows

Workflows that share integrations, category, or trigger type with this one. All free to copy and import.

Web Scraping

Automatically scrapes Google My Business listings using Apify's Google Maps Scraper, filters results to businesses with 1-star reviews, and exports structured lead data into a dedicated Google Sheet t

Form Trigger, HTTP Request, Google Sheets +1
Web Scraping

Automate Sales Meeting Prep With Ai & Apify Sent To Whatsapp. Uses gmail, googleCalendar, lmChatOpenAi, informationExtractor. Event-driven trigger; 61 nodes.

Gmail, Google Calendar, OpenAI Chat +5
Web Scraping

This n8n template builds a meeting assistant that compiles timely reminders of upcoming meetings filled with email history and recent LinkedIn activity of other people on the invite. This is then disc

Gmail, Google Calendar, OpenAI Chat +5
Web Scraping

Tool - Serper Crawl URL. Uses httpRequest, executeWorkflowTrigger. Event-driven trigger; 3 nodes.

HTTP Request, Execute Workflow Trigger
Web Scraping

Tool - Serper Crawl URL. Uses httpRequest, executeWorkflowTrigger. Event-driven trigger; 3 nodes.

HTTP Request, Execute Workflow Trigger