{
  "name": "Generate leads with Google Maps",
  "nodes": [
    {
      "id": "edc9d8f5-e1f4-48e2-b7f7-36e53674d5b3",
      "name": "When clicking \"Execute Workflow\"",
      "type": "n8n-nodes-base.manualTrigger",
      "position": [
        -1080,
        540
      ]
    },
    {
      "id": "b761e882-298f-454e-8c21-f77b336ce54e",
      "name": "Run workflow every hours",
      "type": "n8n-nodes-base.scheduleTrigger",
      "position": [
        -1080,
        360
      ]
    },
    {
      "id": "63d30ea8-1e31-47d2-8f3a-6757f438ab8a",
      "name": "Execute Workflow Trigger",
      "type": "n8n-nodes-base.executeWorkflowTrigger",
      "position": [
        -1080,
        200
      ]
    },
    {
      "id": "10f40f60-c29f-47db-a4d1-3d0b8e8363d7",
      "name": "Check Max Retries1",
      "type": "n8n-nodes-base.if",
      "position": [
        1680,
        740
      ]
    },
    {
      "id": "6665de66-8e00-4a45-b26a-93be044e9b8d",
      "name": "Stop and Error1",
      "type": "n8n-nodes-base.stopAndError",
      "position": [
        1880,
        740
      ]
    },
    {
      "id": "f0b15937-3734-4cdf-9256-ae36e39a2046",
      "name": "GMaps API",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        80,
        680
      ]
    },
    {
      "id": "539bb125-173a-45b8-a6fc-0b755a013525",
      "name": "Update Status to Success",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        1520,
        1160
      ]
    },
    {
      "id": "848b71e5-7ff5-4fb5-aad3-33b630ee42c8",
      "name": "Add rows in Google Sheets",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        1080,
        740
      ]
    },
    {
      "id": "4e1e9438-8091-4cf6-8a99-179960a35eae",
      "name": "Set Row Number",
      "type": "n8n-nodes-base.set",
      "position": [
        80,
        80
      ]
    },
    {
      "id": "a1939e46-7a56-4e41-9f12-86e784acd044",
      "name": "Set Zip",
      "type": "n8n-nodes-base.set",
      "position": [
        -120,
        680
      ]
    },
    {
      "id": "062d2c9f-f957-43ee-9fc2-2a8600828b58",
      "name": "Set Place ID",
      "type": "n8n-nodes-base.set",
      "position": [
        680,
        740
      ]
    },
    {
      "id": "0e3f4e19-0067-4233-afa8-1b9dd0a6bf30",
      "name": "Exponential Backoff",
      "type": "n8n-nodes-base.code",
      "position": [
        1280,
        740
      ]
    },
    {
      "id": "68e13297-e299-4218-a02e-354c4bdd61db",
      "name": "Remove Duplicates",
      "type": "n8n-nodes-base.removeDuplicates",
      "position": [
        880,
        740
      ]
    },
    {
      "id": "ee71fd03-8e15-4c38-b10a-8ff5853da476",
      "name": "Wait",
      "type": "n8n-nodes-base.wait",
      "position": [
        1480,
        740
      ]
    },
    {
      "id": "761d8d0e-c185-41a5-9a75-53e51ab67add",
      "name": "Check Max Retries",
      "type": "n8n-nodes-base.if",
      "position": [
        2120,
        1160
      ]
    },
    {
      "id": "d8fa857a-e195-405c-ae15-44fecd3fea3e",
      "name": "Stop and Error",
      "type": "n8n-nodes-base.stopAndError",
      "position": [
        2320,
        1160
      ]
    },
    {
      "id": "127dc44e-dd79-4735-b818-b95ec00184f2",
      "name": "Exponential Backoff1",
      "type": "n8n-nodes-base.code",
      "position": [
        1720,
        1160
      ]
    },
    {
      "id": "fb7e37c4-f0b3-4a19-a4cc-29fd0c158f9d",
      "name": "Wait1",
      "type": "n8n-nodes-base.wait",
      "position": [
        1920,
        1160
      ]
    },
    {
      "id": "520c9d50-bf23-402f-abf2-cb107341da4d",
      "name": "Settings",
      "type": "n8n-nodes-base.set",
      "position": [
        -800,
        360
      ]
    },
    {
      "id": "1e9c68db-5ccd-4db7-a469-47aabb38dca1",
      "name": "GS - Get Subcategory",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        -220,
        340
      ]
    },
    {
      "id": "e822be8c-ac7e-472e-a6e6-8835a1001323",
      "name": "Subcategory",
      "type": "n8n-nodes-base.set",
      "position": [
        180,
        340
      ]
    },
    {
      "id": "003af494-cb09-441b-87c7-43d7d98682e6",
      "name": "GS - Get Zip Codes",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        -520,
        80
      ]
    },
    {
      "id": "cccc740e-55e5-4a64-b7f1-b1ca3fbb236e",
      "name": "Place Array",
      "type": "n8n-nodes-base.code",
      "position": [
        480,
        740
      ]
    },
    {
      "id": "4cd6a14a-084f-4389-90c5-f4d5921fc80d",
      "name": "Loop Zips",
      "type": "n8n-nodes-base.splitInBatches",
      "position": [
        -420,
        280
      ]
    },
    {
      "id": "33bbb601-86ad-40b2-94fc-ccb7753d690e",
      "name": "Loop Subcats",
      "type": "n8n-nodes-base.splitInBatches",
      "position": [
        -320,
        620
      ]
    },
    {
      "id": "fc1f56d7-ac1c-4447-a897-5b48ab4be430",
      "name": "GS - Get Status",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        1280,
        960
      ]
    },
    {
      "id": "04e698d9-2455-4884-8f95-e2a9dbc16d57",
      "name": "Check Max Retries2",
      "type": "n8n-nodes-base.if",
      "position": [
        1880,
        960
      ]
    },
    {
      "id": "be784eb9-1d18-4ddc-a91a-1a78355eabed",
      "name": "Stop and Error2",
      "type": "n8n-nodes-base.stopAndError",
      "position": [
        2080,
        960
      ]
    },
    {
      "id": "3226891f-2e03-442e-9be3-7bc41d067d23",
      "name": "Exponential Backoff2",
      "type": "n8n-nodes-base.code",
      "position": [
        1480,
        960
      ]
    },
    {
      "id": "04435aaa-0ba7-45f9-80a7-248fbd47ff0e",
      "name": "Wait2",
      "type": "n8n-nodes-base.wait",
      "position": [
        1680,
        960
      ]
    },
    {
      "id": "4c246eb7-5ec2-4c89-b0c0-c851cb318c34",
      "name": "Limit",
      "type": "n8n-nodes-base.limit",
      "position": [
        500,
        80
      ]
    },
    {
      "id": "b141c344-c011-41b2-b87d-b5a067e37c0f",
      "name": "Sticky Note20",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1420,
        0
      ],
      "parameters": {
        "width": 250,
        "height": 1390,
        "content": "# AlexK1919 \n![Alex Kim](https://media.licdn.com/dms/image/v2/D5603AQFOYMkqCPl6Sw/profile-displayphoto-shrink_400_400/profile-displayphoto-shrink_400_400/0/1718309808352?e=1736985600&v=beta&t=pQKm7lQf"
      }
    },
    {
      "id": "3fd43827-bc14-4337-89d3-2e48fc010e9f",
      "name": "Sticky Note8",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -860,
        0
      ],
      "parameters": {
        "width": 247,
        "height": 1391,
        "content": "# Settings"
      }
    },
    {
      "id": "c4ddef39-75e4-4a04-808c-2057ed59eddf",
      "name": "Sticky Note15",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -860,
        80
      ],
      "parameters": {
        "width": 219,
        "height": 220,
        "content": "In the Google Sheets document, set the subcategories you'd like to search for\n\nSet the URL of your Google Sheets document\n\nSet the Zip Code sheet name"
      }
    },
    {
      "id": "b02c6a3a-3939-469a-bb50-0417cf2bc3c5",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1140,
        0
      ],
      "parameters": {
        "width": 247,
        "height": 1391,
        "content": "# Triggers"
      }
    },
    {
      "id": "0aeeaed1-e0dd-4837-ba69-31e0205ea824",
      "name": "Zips",
      "type": "n8n-nodes-base.set",
      "position": [
        -320,
        80
      ]
    },
    {
      "id": "e186129c-202b-409a-8028-e7434ab70093",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -580,
        520
      ],
      "parameters": {
        "width": 3060,
        "height": 880,
        "content": "# Google Maps API"
      }
    },
    {
      "id": "6e142b17-55e7-4a2f-ae2a-829edd330aad",
      "name": "Filter Zips",
      "type": "n8n-nodes-base.filter",
      "position": [
        -120,
        80
      ]
    },
    {
      "id": "077dc67e-eab4-413a-8f17-a17b298bf3f4",
      "name": "Filter Subcategories",
      "type": "n8n-nodes-base.filter",
      "position": [
        -20,
        340
      ]
    },
    {
      "id": "2d5f5e14-4958-4b60-9ae3-b66a7ad095e9",
      "name": "If Empty",
      "type": "n8n-nodes-base.if",
      "position": [
        280,
        680
      ]
    },
    {
      "id": "594eee9f-35d2-4b7f-8926-47010891298b",
      "name": "Split Out",
      "type": "n8n-nodes-base.splitOut",
      "position": [
        300,
        80
      ]
    },
    {
      "id": "2402643d-605e-40d8-b4ed-1678a144960b",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -580,
        0
      ],
      "parameters": {
        "width": 3060,
        "height": 500,
        "content": "# Data Prep"
      }
    }
  ],
  "connections": {
    "Wait": {
      "main": [
        [
          {
            "node": "Check Max Retries1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Zips": {
      "main": [
        [
          {
            "node": "Filter Zips",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Limit": {
      "main": [
        [
          {
            "node": "Loop Zips",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Wait1": {
      "main": [
        [
          {
            "node": "Check Max Retries",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Wait2": {
      "main": [
        [
          {
            "node": "Check Max Retries2",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Set Zip": {
      "main": [
        [
          {
            "node": "GMaps API",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "If Empty": {
      "main": [
        [
          {
            "node": "Loop Subcats",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Place Array",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Settings": {
      "main": [
        [
          {
            "node": "GS - Get Zip Codes",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "GMaps API": {
      "main": [
        [
          {
            "node": "If Empty",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Loop Zips": {
      "main": [
        [],
        [
          {
            "node": "GS - Get Subcategory",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Split Out": {
      "main": [
        [
          {
            "node": "Limit",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Filter Zips": {
      "main": [
        [
          {
            "node": "Set Row Number",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Place Array": {
      "main": [
        [
          {
            "node": "Set Place ID",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Subcategory": {
      "main": [
        [
          {
            "node": "Loop Subcats",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Loop Subcats": {
      "main": [
        [
          {
            "node": "Loop Zips",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Set Zip",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Set Place ID": {
      "main": [
        [
          {
            "node": "Remove Duplicates",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Set Row Number": {
      "main": [
        [
          {
            "node": "Split Out",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "GS - Get Status": {
      "main": [
        [
          {
            "node": "Update Status to Success",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Exponential Backoff2",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Check Max Retries": {
      "main": [
        [
          {
            "node": "Stop and Error",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Update Status to Success",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Remove Duplicates": {
      "main": [
        [
          {
            "node": "Add rows in Google Sheets",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Check Max Retries1": {
      "main": [
        [
          {
            "node": "Stop and Error1",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Add rows in Google Sheets",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Check Max Retries2": {
      "main": [
        [
          {
            "node": "Stop and Error2",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "GS - Get Zip Codes": {
      "main": [
        [
          {
            "node": "Zips",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Exponential Backoff": {
      "main": [
        [
          {
            "node": "Wait",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Exponential Backoff1": {
      "main": [
        [
          {
            "node": "Wait1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Exponential Backoff2": {
      "main": [
        [
          {
            "node": "Wait2",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Filter Subcategories": {
      "main": [
        [
          {
            "node": "Subcategory",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "GS - Get Subcategory": {
      "main": [
        [
          {
            "node": "Filter Subcategories",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Execute Workflow Trigger": {
      "main": [
        [
          {
            "node": "Settings",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Run workflow every hours": {
      "main": [
        [
          {
            "node": "Settings",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Update Status to Success": {
      "main": [
        [
          {
            "node": "Loop Subcats",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Exponential Backoff1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Add rows in Google Sheets": {
      "main": [
        [
          {
            "node": "GS - Get Status",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Exponential Backoff",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "When clicking \"Execute Workflow\"": {
      "main": [
        [
          {
            "node": "Settings",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}