{
  "name": "Google maps scraper",
  "nodes": [
    {
      "id": "edef59f6-0197-408e-a819-141c1ca8dedd",
      "name": "When clicking \"Execute Workflow\"",
      "type": "n8n-nodes-base.manualTrigger",
      "position": [
        -1820,
        780
      ]
    },
    {
      "id": "d56deaf5-1ad8-45a2-bbf0-3b71560f8036",
      "name": "Extract next start value",
      "type": "n8n-nodes-base.code",
      "position": [
        -640,
        480
      ]
    },
    {
      "id": "6562c236-c957-437b-91a9-15e98af09858",
      "name": "Merge all values from SERPAPI",
      "type": "n8n-nodes-base.code",
      "position": [
        -140,
        680
      ]
    },
    {
      "id": "357e8a57-dbb5-4241-b9c2-863b3ae3fd96",
      "name": "Transform data in the right format",
      "type": "n8n-nodes-base.code",
      "position": [
        380,
        680
      ]
    },
    {
      "id": "4e8e9ae9-f5e3-4bfd-b0d4-9403a1c38d39",
      "name": "Add rows in Google Sheets",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        760,
        680
      ]
    },
    {
      "id": "90194aa3-5960-47bd-9e0e-efee827004c4",
      "name": "SERPAPI - Scrape Google Maps URL",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        -920,
        500
      ]
    },
    {
      "id": "9cfd1e76-2d7c-4618-86d6-e1f3c7729044",
      "name": "Remove duplicate items",
      "type": "n8n-nodes-base.itemLists",
      "position": [
        580,
        680
      ]
    },
    {
      "id": "e47dfa17-fc84-4694-950d-165302a9075f",
      "name": "Split out items",
      "type": "n8n-nodes-base.itemLists",
      "position": [
        40,
        680
      ]
    },
    {
      "id": "decc89ee-f836-4ec2-9a1a-0371a8889ef5",
      "name": "Remove empty values",
      "type": "n8n-nodes-base.filter",
      "position": [
        200,
        680
      ]
    },
    {
      "id": "bd7ca3a5-2697-4653-abf6-372088d925e6",
      "name": "Google Sheets - Get searches  to scrap",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        -1380,
        500
      ]
    },
    {
      "id": "6d0be482-b1ad-4fa0-8d2e-bef9a4414924",
      "name": "Extract keyword and location from URL",
      "type": "n8n-nodes-base.set",
      "position": [
        -1160,
        500
      ]
    },
    {
      "id": "f6fb8db2-8444-4605-af9d-22ca71c7937d",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1920,
        200
      ],
      "parameters": {
        "width": 312.2965981499806,
        "height": 266.8807730722022,
        "content": "## Adjust frequency to your own needs"
      }
    },
    {
      "id": "234b5d18-75d7-495b-960f-06192d9e7c61",
      "name": "Run workflow every hours",
      "type": "n8n-nodes-base.scheduleTrigger",
      "position": [
        -1800,
        300
      ]
    },
    {
      "id": "ea2e9b89-e52c-4e25-803a-ce33c41c20fc",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1460,
        200
      ],
      "parameters": {
        "width": null,
        "height": 511.2196121145973,
        "content": "## Copy my template and connect it to n8n\n\nTemplate link: \n https://docs.google.com/spreadsheets/d/170osqaLBql9M-4RAH3_lBKR7ZMaQqyLUkAD-88xGuEQ/edit?usp=sharing"
      }
    },
    {
      "id": "de515d8d-641d-4b91-9472-608ad3878e32",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -980,
        169.3107006491615
      ],
      "parameters": {
        "width": null,
        "height": 535.9388810024284,
        "content": "## Add your SERPAPI API Key\n\nStart a free trial at serpapi.com and get your API key in \"Your account\" section"
      }
    },
    {
      "id": "a5a63861-7ff3-4072-a669-acce938939d8",
      "name": "Update Status to Success",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        940,
        680
      ]
    },
    {
      "id": "2bdc5b63-e3bb-453e-a236-9c83cd12cc03",
      "name": "Update Status to Error",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        -640,
        620
      ]
    },
    {
      "id": "f413f4ef-fd6d-4967-8df7-a4fee4361246",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1920,
        640
      ],
      "parameters": {
        "width": 312.2965981499806,
        "height": 310.4703136043695,
        "content": "## Click on Execute Workflow to run the workflow manually"
      }
    },
    {
      "id": "cbc53e43-f141-434c-a655-feb1f7d3c65b",
      "name": "Continue IF Loop is complete",
      "type": "n8n-nodes-base.if",
      "position": [
        -380,
        620
      ]
    },
    {
      "id": "229f9652-b703-490e-aa3c-c28b0fe1f2e8",
      "name": "Sticky Note4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -2340,
        200
      ],
      "parameters": {
        "width": 357.33341618921213,
        "height": 532.3420004517685,
        "content": "## Read Me\n\nThis workflow allows to scrape Google Maps data in an efficient way using SerpAPI. \n\nYou'll get all data from Gmaps at a cheaper cost than Google Maps API.\n\nAdd as input, your Google Maps "
      }
    }
  ],
  "connections": {
    "Split out items": {
      "main": [
        [
          {
            "node": "Remove empty values",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Remove empty values": {
      "main": [
        [
          {
            "node": "Transform data in the right format",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Remove duplicate items": {
      "main": [
        [
          {
            "node": "Add rows in Google Sheets",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Extract next start value": {
      "main": [
        [
          {
            "node": "Continue IF Loop is complete",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Run workflow every hours": {
      "main": [
        [
          {
            "node": "Google Sheets - Get searches  to scrap",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Add rows in Google Sheets": {
      "main": [
        [
          {
            "node": "Update Status to Success",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Continue IF Loop is complete": {
      "main": [
        [
          {
            "node": "SERPAPI - Scrape Google Maps URL",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Merge all values from SERPAPI",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Merge all values from SERPAPI": {
      "main": [
        [
          {
            "node": "Split out items",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "SERPAPI - Scrape Google Maps URL": {
      "main": [
        [
          {
            "node": "Extract next start value",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Update Status to Error",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "When clicking \"Execute Workflow\"": {
      "main": [
        [
          {
            "node": "Google Sheets - Get searches  to scrap",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Transform data in the right format": {
      "main": [
        [
          {
            "node": "Remove duplicate items",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Extract keyword and location from URL": {
      "main": [
        [
          {
            "node": "SERPAPI - Scrape Google Maps URL",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Google Sheets - Get searches  to scrap": {
      "main": [
        [
          {
            "node": "Extract keyword and location from URL",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}