{
  "name": "Extract leads from Google Maps into Google Sheets using the Places API",
  "nodes": [
    {
      "id": "1e4e2649-00f0-4696-87cd-327377ef0f51",
      "name": "Google Places Search",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        2160,
        16
      ]
    },
    {
      "id": "cc4b593b-3ff5-4eda-aa65-b5041d708351",
      "name": "Split Out Places",
      "type": "n8n-nodes-base.splitOut",
      "position": [
        2432,
        16
      ]
    },
    {
      "id": "e0435af5-c549-4072-91af-856ab936fc96",
      "name": "Map Places Fields",
      "type": "n8n-nodes-base.set",
      "position": [
        2608,
        16
      ]
    },
    {
      "id": "ade79b8f-823d-44e9-bb3b-fc6c721c08bc",
      "name": "Append or update lead row",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        2912,
        16
      ]
    },
    {
      "id": "1f32af52-4880-4e85-8d93-d881f2fdcc5f",
      "name": "Mark Query as Scraped",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        3360,
        0
      ]
    },
    {
      "id": "ef0657dc-c315-43cc-ac9f-b264587f4b64",
      "name": "Merge",
      "type": "n8n-nodes-base.merge",
      "position": [
        1872,
        16
      ]
    },
    {
      "id": "9f5ef015-c6c9-42f5-9f08-cc0dc4849d6f",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1216,
        -640
      ],
      "parameters": {
        "width": 384,
        "height": 912,
        "content": "## 2. Search & Extraction\nThis section fetches data from the Places API (New).\n1.Setup Credentials\n2. Copy [this](https://docs.google.com/spreadsheets/d/1x_GYw6KHgvhe2dgSw1eKKTimIzQYTsRkkWoxkAJEdD8/co"
      }
    },
    {
      "id": "b6ab7238-bb17-47d8-a8c7-9fea35f543b6",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        2048,
        -656
      ],
      "parameters": {
        "width": 336,
        "height": 928,
        "content": "## 2. API Key and Max Pages\n\n1. Provide your Google Places (new) API Key\nin the **X-Goog-Api-Key** body parameter value\n\n- This API key must be generated from a Google Cloud Project with the \"Places A"
      }
    },
    {
      "id": "411fad2e-8c9b-4b71-ae90-c186fda006ec",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        496,
        -640
      ],
      "parameters": {
        "width": 496,
        "height": 912,
        "content": "## 1. Entry Points\nChoose between the Form node for on-demand searches or the Schedule trigger to process a bulk list of queries from your Google Sheet.\n\n"
      }
    },
    {
      "id": "b99c76d7-c76d-4d39-9b6b-a01032d74660",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        2864,
        -208
      ],
      "parameters": {
        "width": 672,
        "height": 480,
        "content": "##  Data Storage\nNodes here handle lead deduplication and write new results to your \"LEADS\" sheet. If the workflow was scheduled, it updates the source query status to prevent duplicates."
      }
    },
    {
      "id": "0100efce-cb5f-493f-8794-2840d065d15c",
      "name": "Get rows in QUERIES",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        1344,
        32
      ]
    },
    {
      "id": "0bcc72a4-8ea3-47f7-b750-320dd4b4a765",
      "name": "Scrape on schedule",
      "type": "n8n-nodes-base.scheduleTrigger",
      "position": [
        720,
        32
      ]
    },
    {
      "id": "b3efbdad-0a9e-4084-bf91-22d8ac44dad3",
      "name": "Scrape on form submission",
      "type": "n8n-nodes-base.formTrigger",
      "position": [
        720,
        -432
      ]
    },
    {
      "id": "7bfc3769-56db-4133-b5dd-bfa493bb9e87",
      "name": "Discard empty queries",
      "type": "n8n-nodes-base.filter",
      "position": [
        1632,
        32
      ]
    },
    {
      "id": "a15432a0-72f0-4922-9e10-8cadbb2972b5",
      "name": "Sticky Note5",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        496,
        -1328
      ],
      "parameters": {
        "width": 1504,
        "height": 592,
        "content": "# Google Maps Lead Extractor [Places API (New)]\n\n## How it works\nThis workflow automates lead collection from Google Maps using two entry points:\n* **Manual:** Submit a single query (e.g., \"Cafes in P"
      }
    },
    {
      "id": "e0cfa987-f5ee-44dc-b198-ceab69924df5",
      "name": "If",
      "type": "n8n-nodes-base.if",
      "position": [
        3120,
        16
      ]
    }
  ],
  "connections": {
    "If": {
      "main": [
        [
          {
            "node": "Mark Query as Scraped",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Merge": {
      "main": [
        [
          {
            "node": "Google Places Search",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Split Out Places": {
      "main": [
        [
          {
            "node": "Map Places Fields",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Map Places Fields": {
      "main": [
        [
          {
            "node": "Append or update lead row",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Scrape on schedule": {
      "main": [
        [
          {
            "node": "Get rows in QUERIES",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get rows in QUERIES": {
      "main": [
        [
          {
            "node": "Discard empty queries",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Google Places Search": {
      "main": [
        [
          {
            "node": "Split Out Places",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Discard empty queries": {
      "main": [
        [
          {
            "node": "Merge",
            "type": "main",
            "index": 1
          }
        ]
      ]
    },
    "Append or update lead row": {
      "main": [
        [
          {
            "node": "If",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Scrape on form submission": {
      "main": [
        [
          {
            "node": "Merge",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}