{
  "name": "Scrape Apollo.io leads and sync them to Google Sheets with ScraperCity",
  "nodes": [
    {
      "id": "11111111-0000-0000-0000-000000000001",
      "name": "Sticky Note - Overview",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -2600,
        100
      ],
      "parameters": {
        "width": 500,
        "height": 700,
        "content": "## Scrape Apollo.io leads and sync to Google Sheets via ScraperCity\n\n**Who is this for:** B2B sales teams and growth operators who want verified contact lists from Apollo.io at $0.0039/contact -- auto"
      }
    },
    {
      "id": "11111111-0000-0000-0000-000000000002",
      "name": "Sticky Note - Configuration Section",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -2040,
        -160
      ],
      "parameters": {
        "width": 980,
        "height": 330,
        "content": "## Configuration\n\nThe \"When clicking Execute workflow\" trigger starts the run manually. \"Configure Search Parameters\" holds all user-editable variables -- job titles, industry, company size, and lead "
      }
    },
    {
      "id": "11111111-0000-0000-0000-000000000003",
      "name": "Sticky Note - Async Polling Loop",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1040,
        -160
      ],
      "parameters": {
        "width": 980,
        "height": 330,
        "content": "## Async Polling Loop\n\nScraperCity scrapes run in the background and typically take 10-60 minutes. \"Store Run ID\" saves the job identifier returned by the scrape request. \"Wait 60 Seconds\" pauses exec"
      }
    },
    {
      "id": "11111111-0000-0000-0000-000000000004",
      "name": "Sticky Note - Download and Output Section",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -40,
        -160
      ],
      "parameters": {
        "width": 980,
        "height": 330,
        "content": "## Download and Output\n\nOnce the scrape status is SUCCEEDED, \"Download Scraped Results\" fetches the CSV file from the ScraperCity download endpoint. \"Parse CSV and Format Leads\" transforms raw CSV tex"
      }
    },
    {
      "id": "11111111-0000-0000-0000-000000000005",
      "name": "Sticky Note - Set API Key",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1516,
        288
      ],
      "parameters": {
        "width": 280,
        "height": 70,
        "content": "Add your ScraperCity API key credential here"
      }
    },
    {
      "id": "11111111-0000-0000-0000-000000000006",
      "name": "Sticky Note - Set Google Sheet ID",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        734,
        288
      ],
      "parameters": {
        "width": 280,
        "height": 70,
        "content": "Set your Google Sheets document ID and sheet name here"
      }
    },
    {
      "id": "11111111-0000-0000-0000-000000000007",
      "name": "When clicking 'Execute workflow'",
      "type": "n8n-nodes-base.manualTrigger",
      "position": [
        -2000,
        400
      ]
    },
    {
      "id": "11111111-0000-0000-0000-000000000008",
      "name": "Configure Search Parameters",
      "type": "n8n-nodes-base.set",
      "position": [
        -1750,
        400
      ]
    },
    {
      "id": "11111111-0000-0000-0000-000000000009",
      "name": "Start Apollo Lead Scrape",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        -1500,
        400
      ]
    },
    {
      "id": "11111111-0000-0000-0000-000000000010",
      "name": "Store Run ID",
      "type": "n8n-nodes-base.set",
      "position": [
        -1250,
        400
      ]
    },
    {
      "id": "11111111-0000-0000-0000-000000000011",
      "name": "Polling Loop Controller",
      "type": "n8n-nodes-base.splitInBatches",
      "position": [
        -1000,
        400
      ]
    },
    {
      "id": "11111111-0000-0000-0000-000000000012",
      "name": "Wait 60 Seconds",
      "type": "n8n-nodes-base.wait",
      "position": [
        -750,
        400
      ]
    },
    {
      "id": "11111111-0000-0000-0000-000000000013",
      "name": "Check Scrape Status",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        -500,
        400
      ]
    },
    {
      "id": "11111111-0000-0000-0000-000000000014",
      "name": "Is Scrape Complete?",
      "type": "n8n-nodes-base.if",
      "position": [
        -250,
        400
      ]
    },
    {
      "id": "11111111-0000-0000-0000-000000000015",
      "name": "Download Scraped Results",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        0,
        400
      ]
    },
    {
      "id": "11111111-0000-0000-0000-000000000016",
      "name": "Parse CSV and Format Leads",
      "type": "n8n-nodes-base.code",
      "position": [
        250,
        400
      ]
    },
    {
      "id": "11111111-0000-0000-0000-000000000017",
      "name": "Remove Duplicate Leads",
      "type": "n8n-nodes-base.removeDuplicates",
      "position": [
        500,
        400
      ]
    },
    {
      "id": "11111111-0000-0000-0000-000000000018",
      "name": "Save Leads to Google Sheets",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        750,
        400
      ]
    }
  ],
  "connections": {
    "Store Run ID": {
      "main": [
        [
          {
            "node": "Polling Loop Controller",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Wait 60 Seconds": {
      "main": [
        [
          {
            "node": "Check Scrape Status",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Check Scrape Status": {
      "main": [
        [
          {
            "node": "Is Scrape Complete?",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Is Scrape Complete?": {
      "main": [
        [
          {
            "node": "Download Scraped Results",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Polling Loop Controller",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Remove Duplicate Leads": {
      "main": [
        [
          {
            "node": "Save Leads to Google Sheets",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Polling Loop Controller": {
      "main": [
        [
          {
            "node": "Wait 60 Seconds",
            "type": "main",
            "index": 0
          }
        ],
        []
      ]
    },
    "Download Scraped Results": {
      "main": [
        [
          {
            "node": "Parse CSV and Format Leads",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Start Apollo Lead Scrape": {
      "main": [
        [
          {
            "node": "Store Run ID",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Parse CSV and Format Leads": {
      "main": [
        [
          {
            "node": "Remove Duplicate Leads",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Configure Search Parameters": {
      "main": [
        [
          {
            "node": "Start Apollo Lead Scrape",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "When clicking 'Execute workflow'": {
      "main": [
        [
          {
            "node": "Configure Search Parameters",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}