{
  "name": "Extract Google My Business leads by service or location with Bright Data",
  "nodes": [
    {
      "id": "6c9e04d8-1a25-47e7-a8ef-536744866ae4",
      "name": "Form Submission Trigger",
      "type": "n8n-nodes-base.formTrigger",
      "position": [
        -640,
        -200
      ]
    },
    {
      "id": "cfb9e212-c53a-4ecd-a342-572a1dd93bfb",
      "name": "Workflow Description",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -740,
        -420
      ],
      "parameters": {
        "width": 300,
        "height": 180,
        "content": "## Extract Google My Business Leads by Service and Location\n**Description:** \nExtract Google business listings by service type and geographic location using Bright Data's Google Maps dataset. Automati"
      }
    },
    {
      "id": "2f5231af-2e5d-49fe-8534-c87cb2083c19",
      "name": "Scrape Business Data from Google Maps",
      "type": "@brightdata/n8n-nodes-brightdata.brightData",
      "position": [
        900,
        60
      ]
    },
    {
      "id": "50b74589-0c38-4e77-b599-af3dab056dd6",
      "name": "Claude AI Model for Cities",
      "type": "@n8n/n8n-nodes-langchain.lmChatAnthropic",
      "position": [
        -400,
        40
      ]
    },
    {
      "id": "cb07c9ad-9522-46f7-bf81-eb22689f4e27",
      "name": "Separate Data by City",
      "type": "n8n-nodes-base.code",
      "position": [
        380,
        -200
      ]
    },
    {
      "id": "44478ce4-fd08-4e9e-bf2a-4116b5d6084c",
      "name": "Generate City List",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        -400,
        -200
      ]
    },
    {
      "id": "d4416202-1a71-4f6f-b363-9f7d64e1855b",
      "name": "Claude AI Model for Categories",
      "type": "@n8n/n8n-nodes-langchain.lmChatAnthropic",
      "position": [
        0,
        40
      ]
    },
    {
      "id": "74894c83-f855-49ed-b523-1521aa46e28d",
      "name": "Categorize Service Type",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        -20,
        -200
      ]
    },
    {
      "id": "d3efe732-94cf-4d6e-b55f-12b7c1bb2a5c",
      "name": "City Processing Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        300,
        -300
      ],
      "parameters": {
        "width": null,
        "height": 80,
        "content": "Separate each search by city name for comprehensive coverage"
      }
    },
    {
      "id": "be50e961-e293-4376-9f96-5a279d20a37f",
      "name": "Process Cities in Batches",
      "type": "n8n-nodes-base.splitInBatches",
      "position": [
        640,
        -200
      ]
    },
    {
      "id": "d1b3ff9c-4dfc-42d5-ab4b-7e87c2b3d3b4",
      "name": "Get Existing Business Data",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        940,
        -500
      ]
    },
    {
      "id": "a7d336a6-cfb4-4c34-a39b-98ba5f4b8633",
      "name": "Check for Duplicate Entries",
      "type": "n8n-nodes-base.code",
      "position": [
        1120,
        -500
      ]
    },
    {
      "id": "5d5c8d06-0e7b-403f-b020-b46e5ebe3581",
      "name": "Find Duplicate Row Number",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        1600,
        -480
      ]
    },
    {
      "id": "5480a6a6-597b-4e9f-9d8e-1654fe2adff7",
      "name": "Check Scraping Status",
      "type": "n8n-nodes-base.if",
      "position": [
        1100,
        60
      ]
    },
    {
      "id": "f9d3b3b2-b9c3-4f28-8e5b-9cb965122038",
      "name": "Delete Duplicate Row",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        1880,
        -480
      ]
    },
    {
      "id": "a6fe2f90-d5e5-48cf-ab05-1a0c2f584533",
      "name": "Process Duplicates in Batches",
      "type": "n8n-nodes-base.splitInBatches",
      "position": [
        1340,
        -500
      ]
    },
    {
      "id": "1ac3e5d6-f738-42be-ada4-002781ea68ed",
      "name": "Save Business Data to Sheet",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        2340,
        80
      ]
    },
    {
      "id": "fb085dbf-205d-442c-9fa3-bb858df76d5d",
      "name": "Fetch Scraped Data",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        2160,
        -120
      ]
    },
    {
      "id": "c6856520-d927-458c-8354-cf3ee7101183",
      "name": "Check Data Collection Status",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        1340,
        -100
      ]
    },
    {
      "id": "d3c03942-cc00-4f13-9be2-cb4abf49ed5d",
      "name": "Wait for Rate Limiting",
      "type": "n8n-nodes-base.wait",
      "position": [
        1620,
        -100
      ]
    },
    {
      "id": "e2989c58-cb07-4643-820a-0b99f2daacd5",
      "name": "Check if Data Ready",
      "type": "n8n-nodes-base.if",
      "position": [
        1880,
        -100
      ]
    },
    {
      "id": "7ae091e8-1cd6-4b7d-9a49-9a3b7cfc5aa8",
      "name": "Data Collection Notes",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1120,
        -220
      ],
      "parameters": {
        "width": 1500,
        "height": 480,
        "content": "## Data Collection Monitoring\n### Monitors Bright Data scraping progress and fetches results when ready\n### Polls the API until scraping completes, then retrieves the final dataset"
      }
    },
    {
      "id": "9842b5c4-046c-4223-97f7-c346fa77e38d",
      "name": "Duplicate Removal Notes",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        740,
        -680
      ],
      "parameters": {
        "width": 1500,
        "height": 380,
        "content": "## Duplicate Removal Process\n### Identifies and removes duplicate business entries\n### Compares business names and phone numbers to eliminate redundant data"
      }
    }
  ],
  "connections": {
    "Fetch Scraped Data": {
      "main": [
        [
          {
            "node": "Save Business Data to Sheet",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Generate City List": {
      "main": [
        [
          {
            "node": "Categorize Service Type",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Check if Data Ready": {
      "main": [
        [
          {
            "node": "Fetch Scraped Data",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Check Data Collection Status",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Delete Duplicate Row": {
      "main": [
        [
          {
            "node": "Process Duplicates in Batches",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Check Scraping Status": {
      "main": [
        [
          {
            "node": "Check Data Collection Status",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Save Business Data to Sheet",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Separate Data by City": {
      "main": [
        [
          {
            "node": "Process Cities in Batches",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Wait for Rate Limiting": {
      "main": [
        [
          {
            "node": "Check if Data Ready",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Categorize Service Type": {
      "main": [
        [
          {
            "node": "Separate Data by City",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Form Submission Trigger": {
      "main": [
        [
          {
            "node": "Generate City List",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Find Duplicate Row Number": {
      "main": [
        [
          {
            "node": "Delete Duplicate Row",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Process Cities in Batches": {
      "main": [
        [
          {
            "node": "Get Existing Business Data",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Scrape Business Data from Google Maps",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Claude AI Model for Cities": {
      "ai_languageModel": [
        [
          {
            "node": "Generate City List",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Get Existing Business Data": {
      "main": [
        [
          {
            "node": "Check for Duplicate Entries",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Check for Duplicate Entries": {
      "main": [
        [
          {
            "node": "Process Duplicates in Batches",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Save Business Data to Sheet": {
      "main": [
        [
          {
            "node": "Process Cities in Batches",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Check Data Collection Status": {
      "main": [
        [
          {
            "node": "Wait for Rate Limiting",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Process Duplicates in Batches": {
      "main": [
        [],
        [
          {
            "node": "Find Duplicate Row Number",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Claude AI Model for Categories": {
      "ai_languageModel": [
        [
          {
            "node": "Categorize Service Type",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Scrape Business Data from Google Maps": {
      "main": [
        [
          {
            "node": "Check Scraping Status",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}