{
  "name": "Automate B2B lead generation using Google Places API & SendGrid with dashboard",
  "nodes": [
    {
      "id": "2b77aa46-dc82-4e5c-841d-194450fb4f68",
      "name": "Save Grid to Sheet (ONE-TIME)",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        -2064,
        -48
      ]
    },
    {
      "id": "d7b8f987-503b-4731-a6b1-68d38353f573",
      "name": "Daily Trigger",
      "type": "n8n-nodes-base.scheduleTrigger",
      "position": [
        -2304,
        224
      ]
    },
    {
      "id": "1288149b-95a3-4a74-8175-06a467aba6a0",
      "name": "Read Grid Points",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        -2096,
        224
      ]
    },
    {
      "id": "3e259503-9c55-48c7-8209-6923424174f3",
      "name": "Filter & Randomize Daily Batch",
      "type": "n8n-nodes-base.code",
      "position": [
        -1504,
        224
      ]
    },
    {
      "id": "89cfeb3b-8ef8-4fc4-9067-7cd8c0936efd",
      "name": "Google Nearby Search",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        -1312,
        224
      ]
    },
    {
      "id": "a7f00a42-cf2f-48dd-8a50-d6b17a2d3ede",
      "name": "Parse Nearby Results",
      "type": "n8n-nodes-base.code",
      "position": [
        -1104,
        224
      ]
    },
    {
      "id": "df5b720a-b34f-4fc7-9805-9250b1d1bcfc",
      "name": "Prepare Grid Update",
      "type": "n8n-nodes-base.code",
      "position": [
        -2320,
        784
      ]
    },
    {
      "id": "48d22b6e-4020-4680-846b-90bb31981c76",
      "name": "Mark Grid Points as Searched",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        -2128,
        784
      ]
    },
    {
      "id": "60408db0-60d5-4bf8-90e9-6bfd3b71e3e3",
      "name": "Get Place Details2",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        -912,
        224
      ]
    },
    {
      "id": "99e1e9a4-b66b-465c-9b99-3afcc8e92f7a",
      "name": "Extract Contact Info2",
      "type": "n8n-nodes-base.code",
      "position": [
        -704,
        224
      ]
    },
    {
      "id": "87a2bc70-4282-40f1-bcf6-2284cce9dfc7",
      "name": "Split Places Array2",
      "type": "n8n-nodes-base.splitOut",
      "position": [
        -2320,
        512
      ]
    },
    {
      "id": "3699fac6-e659-452b-9bf4-c5d3ba940007",
      "name": "Filter: Has Website2",
      "type": "n8n-nodes-base.filter",
      "position": [
        -2096,
        512
      ]
    },
    {
      "id": "93eebd70-9998-44df-92ad-ac7c1c909880",
      "name": "Wait (Rate Limit)2",
      "type": "n8n-nodes-base.wait",
      "position": [
        -1488,
        528
      ]
    },
    {
      "id": "a496d6f8-faf0-45f7-97a0-45fec5a11d46",
      "name": "Scrape Website2",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        -1312,
        528
      ]
    },
    {
      "id": "64f5c085-f29e-4774-b8cc-a988c78e1249",
      "name": "Extract Emails2",
      "type": "n8n-nodes-base.code",
      "position": [
        -1152,
        496
      ]
    },
    {
      "id": "a343177d-ae7a-4523-b959-d67d2677fab1",
      "name": "Filter: Has Email2",
      "type": "n8n-nodes-base.if",
      "position": [
        -928,
        496
      ]
    },
    {
      "id": "6747735d-969d-464f-b6e1-ad7d65b4cfc7",
      "name": "Remove Duplicates: Emails",
      "type": "n8n-nodes-base.code",
      "position": [
        -1888,
        512
      ]
    },
    {
      "id": "7ed787f3-b9be-4652-8a13-03b562910ed1",
      "name": "Code in JavaScript",
      "type": "n8n-nodes-base.code",
      "position": [
        -1904,
        224
      ]
    },
    {
      "id": "e3a5ee55-e2b3-44e4-b59f-4aee02245ead",
      "name": "Read Grid Points1",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        -1696,
        224
      ]
    },
    {
      "id": "b6a2059c-5140-4d99-b493-b639ed69e97a",
      "name": "Update row in sheet1",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        -1696,
        48
      ]
    },
    {
      "id": "8dff807c-9046-4e28-bdb9-d18323492fd4",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -2496,
        -224
      ],
      "parameters": {
        "width": null,
        "height": null,
        "content": ""
      }
    },
    {
      "id": "9a033a2c-b4a7-45dc-b259-dae1f893eb70",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -2352,
        -128
      ],
      "parameters": {
        "width": null,
        "height": null,
        "content": ""
      }
    },
    {
      "id": "f923064e-427b-4aa0-9284-0d7e85c14db2",
      "name": "Append Leads (Dedupe by Place ID)1",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        -704,
        560
      ]
    },
    {
      "id": "78b6fcb3-8e28-418f-b9e4-d4368261bfc5",
      "name": "Loop Over Items",
      "type": "n8n-nodes-base.splitInBatches",
      "position": [
        -1664,
        512
      ]
    },
    {
      "id": "dc83ddcd-d5ca-42cd-9d3f-e8391240cbaa",
      "name": "Get row(s) in sheet",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        80,
        32
      ]
    },
    {
      "id": "0bd48d02-4114-4698-9ffd-c340887d3161",
      "name": "Schedule Trigger",
      "type": "n8n-nodes-base.scheduleTrigger",
      "position": [
        -128,
        32
      ]
    },
    {
      "id": "701acb1d-45a2-47f4-878c-f91dba7e4d1d",
      "name": "Filter: Remove Fake Emails",
      "type": "n8n-nodes-base.filter",
      "position": [
        288,
        32
      ]
    },
    {
      "id": "8849b1fa-a8e6-42e9-966b-a4d2ec6f927c",
      "name": "Assign Alternating Templates",
      "type": "n8n-nodes-base.code",
      "position": [
        528,
        32
      ]
    },
    {
      "id": "baeea03a-4f20-4c49-b9c8-35df8fb65e22",
      "name": "Loop Over Items1",
      "type": "n8n-nodes-base.splitInBatches",
      "position": [
        736,
        32
      ]
    },
    {
      "id": "4de9afad-cc0b-4019-882a-6f6dd5684c50",
      "name": "Wait",
      "type": "n8n-nodes-base.wait",
      "position": [
        928,
        48
      ]
    },
    {
      "id": "a9680714-5e13-415a-8c5c-5891cae6ed50",
      "name": "Send an email",
      "type": "n8n-nodes-base.sendGrid",
      "position": [
        1312,
        48
      ]
    },
    {
      "id": "ef6b4b55-d305-4c86-8348-40ce90617300",
      "name": "Update row in sheet",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        1120,
        48
      ]
    },
    {
      "id": "a477738a-024b-4590-8845-d45a7fd0b4ec",
      "name": "Webhook",
      "type": "n8n-nodes-base.webhook",
      "position": [
        -144,
        432
      ]
    },
    {
      "id": "a8608de3-6ba1-4b11-bd87-4f71930e97c6",
      "name": "Get row(s) in sheet1",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        80,
        432
      ]
    },
    {
      "id": "f224db82-5fe7-4e98-91ed-83df8ac34fc8",
      "name": "Respond to Webhook",
      "type": "n8n-nodes-base.respondToWebhook",
      "position": [
        512,
        432
      ]
    },
    {
      "id": "a29b8b39-04d5-483b-8dcd-b53e3871af1d",
      "name": "Filter: Remove Fake Emails1",
      "type": "n8n-nodes-base.filter",
      "position": [
        288,
        432
      ]
    },
    {
      "id": "732365d6-a091-443f-9354-6cee1b293bc1",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -288,
        -192
      ],
      "parameters": {
        "width": null,
        "height": null,
        "content": ""
      }
    },
    {
      "id": "b2cf5139-8829-4803-be63-3d9de719526f",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -192,
        -48
      ],
      "parameters": {
        "width": null,
        "height": null,
        "content": ""
      }
    },
    {
      "id": "a7848d31-a556-4895-b3c4-012fc50637fc",
      "name": "Sticky Note4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -192,
        336
      ],
      "parameters": {
        "width": null,
        "height": null,
        "content": ""
      }
    },
    {
      "id": "ad6425c9-d3b7-4c8b-9736-a0fb80e53a98",
      "name": "Generate Location Grid (ONE-TIME)",
      "type": "n8n-nodes-base.code",
      "position": [
        -2256,
        -48
      ]
    },
    {
      "id": "2d5b7aee-0f17-4c8d-b29f-67ece379ef5a",
      "name": "Sticky Note5",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -3760,
        -304
      ],
      "parameters": {
        "width": null,
        "height": null,
        "content": ""
      }
    }
  ],
  "connections": {
    "Wait": {
      "main": [
        [
          {
            "node": "Update row in sheet",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Webhook": {
      "main": [
        [
          {
            "node": "Get row(s) in sheet1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Daily Trigger": {
      "main": [
        [
          {
            "node": "Read Grid Points",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Send an email": {
      "main": [
        [
          {
            "node": "Loop Over Items1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Extract Emails2": {
      "main": [
        [
          {
            "node": "Filter: Has Email2",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Loop Over Items": {
      "main": [
        [
          {
            "node": "Extract Emails2",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Wait (Rate Limit)2",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Scrape Website2": {
      "main": [
        [
          {
            "node": "Loop Over Items",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Loop Over Items1": {
      "main": [
        [],
        [
          {
            "node": "Wait",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Read Grid Points": {
      "main": [
        [
          {
            "node": "Code in JavaScript",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Schedule Trigger": {
      "main": [
        [
          {
            "node": "Get row(s) in sheet",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Read Grid Points1": {
      "main": [
        [
          {
            "node": "Filter & Randomize Daily Batch",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Code in JavaScript": {
      "main": [
        [
          {
            "node": "Read Grid Points1",
            "type": "main",
            "index": 0
          },
          {
            "node": "Update row in sheet1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Filter: Has Email2": {
      "main": [
        [
          {
            "node": "Append Leads (Dedupe by Place ID)1",
            "type": "main",
            "index": 0
          }
        ],
        []
      ]
    },
    "Get Place Details2": {
      "main": [
        [
          {
            "node": "Extract Contact Info2",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Wait (Rate Limit)2": {
      "main": [
        [
          {
            "node": "Scrape Website2",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get row(s) in sheet": {
      "main": [
        [
          {
            "node": "Filter: Remove Fake Emails",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Prepare Grid Update": {
      "main": [
        [
          {
            "node": "Mark Grid Points as Searched",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Split Places Array2": {
      "main": [
        [
          {
            "node": "Filter: Has Website2",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Update row in sheet": {
      "main": [
        [
          {
            "node": "Send an email",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Filter: Has Website2": {
      "main": [
        [
          {
            "node": "Remove Duplicates: Emails",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get row(s) in sheet1": {
      "main": [
        [
          {
            "node": "Filter: Remove Fake Emails1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Google Nearby Search": {
      "main": [
        [
          {
            "node": "Parse Nearby Results",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Parse Nearby Results": {
      "main": [
        [
          {
            "node": "Get Place Details2",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Extract Contact Info2": {
      "main": [
        [
          {
            "node": "Split Places Array2",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Remove Duplicates: Emails": {
      "main": [
        [
          {
            "node": "Loop Over Items",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Filter: Remove Fake Emails": {
      "main": [
        [
          {
            "node": "Assign Alternating Templates",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Filter: Remove Fake Emails1": {
      "main": [
        [
          {
            "node": "Respond to Webhook",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Assign Alternating Templates": {
      "main": [
        [
          {
            "node": "Loop Over Items1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Mark Grid Points as Searched": {
      "main": [
        []
      ]
    },
    "Filter & Randomize Daily Batch": {
      "main": [
        [
          {
            "node": "Google Nearby Search",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Generate Location Grid (ONE-TIME)": {
      "main": [
        [
          {
            "node": "Save Grid to Sheet (ONE-TIME)",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Append Leads (Dedupe by Place ID)1": {
      "main": [
        [
          {
            "node": "Prepare Grid Update",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}