{
  "name": "Scrape Shopify store leads with ScraperCity and push verified contacts to HubSpot CRM",
  "nodes": [
    {
      "id": "34a65a33-8a1c-46b4-a706-041ed35c9fbb",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        2848,
        304
      ],
      "parameters": {
        "width": 480,
        "height": 896,
        "content": "## Scrape Shopify store leads and push verified contacts into HubSpot CRM\n\n### How it works\n\n1. The workflow is triggered manually and configures search parameters (country, lead count, contact types)"
      }
    },
    {
      "id": "876619d3-57f8-4c21-ac3e-f8d6f7a1f42b",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        3408,
        384
      ],
      "parameters": {
        "width": 448,
        "height": 320,
        "content": "## Workflow trigger and config\n\nManually triggers the workflow and sets the core search parameters — country code, lead count, and contact type flags — that drive the scrape job."
      }
    },
    {
      "id": "491bb140-8547-4f25-a7bb-ab55ceeccf4b",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        3904,
        416
      ],
      "parameters": {
        "width": 448,
        "height": 304,
        "content": "## Initiate scrape job\n\nSubmits the scrape request to ScraperCity and stores the returned run ID for subsequent polling."
      }
    },
    {
      "id": "1ad0b98d-1271-4625-8354-035a5eb22597",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        4400,
        416
      ],
      "parameters": {
        "width": 944,
        "height": 496,
        "content": "## Scrape job polling loop\n\nWaits before the first status check, then polls the scrape job status in a loop — retrying every 60 seconds — until the scrape is reported as complete."
      }
    },
    {
      "id": "2d1f400c-7215-441f-b045-dc16d0d78520",
      "name": "Sticky Note4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        5408,
        384
      ],
      "parameters": {
        "width": 448,
        "height": 320,
        "content": "## Download and parse leads\n\nDownloads the completed scrape results as a CSV file and parses it into structured lead records ready for filtering."
      }
    },
    {
      "id": "cc80e249-6932-4521-a056-0a0bc493ca76",
      "name": "Sticky Note5",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        5904,
        384
      ],
      "parameters": {
        "width": 448,
        "height": 320,
        "content": "## Filter and deduplicate leads\n\nRemoves records without email addresses and eliminates duplicate leads to produce a clean, unique list for validation."
      }
    },
    {
      "id": "fb4b8957-00cc-4d26-b2c8-bda6cc712bc2",
      "name": "Sticky Note6",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        6400,
        416
      ],
      "parameters": {
        "width": 704,
        "height": 304,
        "content": "## Initiate email validation\n\nAggregates all lead emails into a single bulk array and submits them to ScraperCity's email validation API, storing the returned validation run ID."
      }
    },
    {
      "id": "899d27df-58c9-44df-a781-524d431ba612",
      "name": "Sticky Note7",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        5408,
        768
      ],
      "parameters": {
        "width": 2688,
        "height": 464,
        "content": "## Validation job polling loop\n\nWaits before the first validation status check, then polls in a loop — retrying every 30 seconds — until the email validation job is complete."
      }
    },
    {
      "id": "db56a23c-30cf-4d1a-a4fd-10242d397d00",
      "name": "Sticky Note8",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        8160,
        416
      ],
      "parameters": {
        "width": 688,
        "height": 304,
        "content": "## Download and merge validation results\n\nDownloads the validation results, merges them back with the original lead records by email, and filters out any leads with invalid or unverified emails."
      }
    },
    {
      "id": "4ea0efcd-21c9-42cc-937f-941369629097",
      "name": "Sticky Note9",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        8912,
        304
      ],
      "parameters": {
        "width": 240,
        "height": 400,
        "content": "## Push contacts to HubSpot\n\nUpserts each verified lead as a contact in HubSpot CRM, creating new records or updating existing ones based on email address."
      }
    },
    {
      "id": "c6eaf85b-cd1f-4f20-b6f1-2d5f045459f9",
      "name": "When clicking Execute workflow",
      "type": "n8n-nodes-base.manualTrigger",
      "position": [
        3456,
        544
      ]
    },
    {
      "id": "ad359671-3d54-49e1-bfbb-f510dabb699c",
      "name": "Configure Search Parameters",
      "type": "n8n-nodes-base.set",
      "position": [
        3712,
        544
      ]
    },
    {
      "id": "f38ce3ef-03fe-492c-bf39-67b9378b95bc",
      "name": "Start Shopify Store Scrape",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        3952,
        544
      ]
    },
    {
      "id": "5371c2d4-13da-4fd7-aa10-0e9588a38f75",
      "name": "Store Scrape Run ID",
      "type": "n8n-nodes-base.set",
      "position": [
        4208,
        544
      ]
    },
    {
      "id": "54499141-ae82-4735-9fd5-6d0e0e3f94a7",
      "name": "Wait Before First Poll",
      "type": "n8n-nodes-base.wait",
      "position": [
        4448,
        544
      ]
    },
    {
      "id": "9b420bbc-b100-4fb6-aa71-c2c22618f6b6",
      "name": "Poll Loop Controller",
      "type": "n8n-nodes-base.splitInBatches",
      "position": [
        4704,
        544
      ]
    },
    {
      "id": "f60b557b-a0fc-448c-9b4a-1743b59b38d1",
      "name": "Check Scrape Status",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        4960,
        544
      ]
    },
    {
      "id": "adfb84f3-a7a7-4c79-bf52-d4a34a90544c",
      "name": "Is Scrape Complete?",
      "type": "n8n-nodes-base.if",
      "position": [
        5200,
        544
      ]
    },
    {
      "id": "b9515500-d474-43d3-a88d-af0f37fb22ee",
      "name": "Wait 60 Seconds Before Retry",
      "type": "n8n-nodes-base.wait",
      "position": [
        5200,
        736
      ]
    },
    {
      "id": "b08b2d19-14e2-453c-9852-5fbaf456d50d",
      "name": "Download Scraped Store Leads",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        5456,
        544
      ]
    },
    {
      "id": "f487c233-40ca-469b-b504-2a8ae9794c1a",
      "name": "Parse CSV Lead Data",
      "type": "n8n-nodes-base.code",
      "position": [
        5712,
        544
      ]
    },
    {
      "id": "1e7d44e3-3337-4e7c-92d9-4d4988f3169f",
      "name": "Filter Records with Emails",
      "type": "n8n-nodes-base.filter",
      "position": [
        5952,
        544
      ]
    },
    {
      "id": "7fe3e255-5b06-4bc7-93a8-abb3de94d0b3",
      "name": "Remove Duplicate Leads",
      "type": "n8n-nodes-base.removeDuplicates",
      "position": [
        6208,
        544
      ]
    },
    {
      "id": "c9f8806c-beb2-4899-93d7-d93541e5caac",
      "name": "Collect Emails for Validation",
      "type": "n8n-nodes-base.code",
      "position": [
        6448,
        544
      ]
    },
    {
      "id": "f071514c-848c-43b9-bedc-fe5640ee90f8",
      "name": "Start Email Validation",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        6704,
        544
      ]
    },
    {
      "id": "6cc4b9d4-5ad1-4c27-b944-3a486661f02c",
      "name": "Store Validation Run ID",
      "type": "n8n-nodes-base.set",
      "position": [
        6960,
        544
      ]
    },
    {
      "id": "d7000e9a-944b-4660-aa0d-97f317bf237b",
      "name": "Wait Before Validation Poll",
      "type": "n8n-nodes-base.wait",
      "position": [
        7200,
        880
      ]
    },
    {
      "id": "5047f64c-e930-4b90-9f5c-e56c9110e48e",
      "name": "Validation Poll Loop Controller",
      "type": "n8n-nodes-base.splitInBatches",
      "position": [
        7456,
        880
      ]
    },
    {
      "id": "aaa21dec-06b8-40f4-8700-455e466564b6",
      "name": "Check Validation Status",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        7712,
        880
      ]
    },
    {
      "id": "7875f14a-f583-4b52-8cf0-cc4a3373c24f",
      "name": "Is Validation Complete?",
      "type": "n8n-nodes-base.if",
      "position": [
        7952,
        880
      ]
    },
    {
      "id": "68995fc8-d154-4ff0-b90e-6c9a6b50ae18",
      "name": "Wait 30 Seconds Before Validation Retry",
      "type": "n8n-nodes-base.wait",
      "position": [
        5456,
        1072
      ]
    },
    {
      "id": "ba284973-ef0d-4e37-bb6d-4c698f1c07f8",
      "name": "Download Validation Results",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        8208,
        544
      ]
    },
    {
      "id": "64c4058c-327d-45fb-b2a6-902332e27bd9",
      "name": "Merge Leads with Validation Results",
      "type": "n8n-nodes-base.code",
      "position": [
        8448,
        544
      ]
    },
    {
      "id": "d06ee8f4-10fd-4015-9ad8-fcbb804fb630",
      "name": "Filter Valid Emails Only",
      "type": "n8n-nodes-base.filter",
      "position": [
        8704,
        544
      ]
    },
    {
      "id": "a5b89a08-b473-4958-a0e8-717b7990f25a",
      "name": "Create or Update HubSpot Contact",
      "type": "n8n-nodes-base.hubspot",
      "position": [
        8960,
        544
      ]
    }
  ],
  "connections": {
    "Check Scrape Status": {
      "main": [
        [
          {
            "node": "Is Scrape Complete?",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Is Scrape Complete?": {
      "main": [
        [
          {
            "node": "Download Scraped Store Leads",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Wait 60 Seconds Before Retry",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Parse CSV Lead Data": {
      "main": [
        [
          {
            "node": "Filter Records with Emails",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Store Scrape Run ID": {
      "main": [
        [
          {
            "node": "Wait Before First Poll",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Poll Loop Controller": {
      "main": [
        [
          {
            "node": "Check Scrape Status",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Remove Duplicate Leads": {
      "main": [
        [
          {
            "node": "Collect Emails for Validation",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Start Email Validation": {
      "main": [
        [
          {
            "node": "Store Validation Run ID",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Wait Before First Poll": {
      "main": [
        [
          {
            "node": "Poll Loop Controller",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Check Validation Status": {
      "main": [
        [
          {
            "node": "Is Validation Complete?",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Is Validation Complete?": {
      "main": [
        [
          {
            "node": "Download Validation Results",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Wait 30 Seconds Before Validation Retry",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Store Validation Run ID": {
      "main": [
        [
          {
            "node": "Wait Before Validation Poll",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Filter Valid Emails Only": {
      "main": [
        [
          {
            "node": "Create or Update HubSpot Contact",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Filter Records with Emails": {
      "main": [
        [
          {
            "node": "Remove Duplicate Leads",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Start Shopify Store Scrape": {
      "main": [
        [
          {
            "node": "Store Scrape Run ID",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Configure Search Parameters": {
      "main": [
        [
          {
            "node": "Start Shopify Store Scrape",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Download Validation Results": {
      "main": [
        [
          {
            "node": "Merge Leads with Validation Results",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Wait Before Validation Poll": {
      "main": [
        [
          {
            "node": "Validation Poll Loop Controller",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Download Scraped Store Leads": {
      "main": [
        [
          {
            "node": "Parse CSV Lead Data",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Wait 60 Seconds Before Retry": {
      "main": [
        [
          {
            "node": "Poll Loop Controller",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Collect Emails for Validation": {
      "main": [
        [
          {
            "node": "Start Email Validation",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "When clicking Execute workflow": {
      "main": [
        [
          {
            "node": "Configure Search Parameters",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Validation Poll Loop Controller": {
      "main": [
        [
          {
            "node": "Check Validation Status",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Merge Leads with Validation Results": {
      "main": [
        [
          {
            "node": "Filter Valid Emails Only",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Wait 30 Seconds Before Validation Retry": {
      "main": [
        [
          {
            "node": "Validation Poll Loop Controller",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}