{
  "name": "Google Places Lead Scraper with Dumpling",
  "nodes": [
    {
      "parameters": {
        "formTitle": "Lead Scraper",
        "formFields": {
          "values": [
            {
              "fieldLabel": "query"
            },
            {
              "fieldLabel": "country"
            },
            {
              "fieldLabel": "location"
            }
          ]
        },
        "options": {}
      },
      "type": "n8n-nodes-base.formTrigger",
      "typeVersion": 2.2,
      "position": [
        -260,
        -180
      ],
      "id": "7127c6ac-e4ca-4e6d-b626-5e0edb47b12a",
      "name": "On form submission",
      "webhookId": "b9b394ab-e3f6-4ffb-96b8-3f350f7d4962"
    },
    {
      "parameters": {
        "operation": "appendOrUpdate",
        "documentId": {
          "__rl": true,
          "value": "1s9oaGi7gj0Wk1NdP0ywxxSx64fab4bq0toYMpZiMT24",
          "mode": "list",
          "cachedResultName": "apify demo",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1s9oaGi7gj0Wk1NdP0ywxxSx64fab4bq0toYMpZiMT24/edit?usp=drivesdk"
        },
        "sheetName": {
          "__rl": true,
          "value": 724419459,
          "mode": "list",
          "cachedResultName": "Google Places Lead (DumplingAI)",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1s9oaGi7gj0Wk1NdP0ywxxSx64fab4bq0toYMpZiMT24/edit#gid=724419459"
        },
        "columns": {
          "mappingMode": "defineBelow",
          "value": {
            "name": "={{ $json.title }}",
            "address": "={{ $json.address }}",
            "phone_number": "={{ $json.phoneNumber }}",
            "website": "={{ $json.website }}",
            "rating": "={{ $json.rating }}",
            "category": "={{ $json.category }}",
            "rating_count": "={{ $json.ratingCount }}",
            "cid": "={{ $json.cid }}"
          },
          "matchingColumns": [
            "cid"
          ],
          "schema": [
            {
              "id": "cid",
              "displayName": "cid",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": false
            },
            {
              "id": "name",
              "displayName": "name",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": false
            },
            {
              "id": "address",
              "displayName": "address",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": false
            },
            {
              "id": "phone_number",
              "displayName": "phone_number",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": false
            },
            {
              "id": "website",
              "displayName": "website",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": false
            },
            {
              "id": "rating",
              "displayName": "rating",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": false
            },
            {
              "id": "rating_count",
              "displayName": "rating_count",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": false
            },
            {
              "id": "category",
              "displayName": "category",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": false
            }
          ],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        },
        "options": {}
      },
      "type": "n8n-nodes-base.googleSheets",
      "typeVersion": 4.5,
      "position": [
        380,
        -180
      ],
      "id": "98b4cdec-69e2-47d6-905a-be7be6da6a3f",
      "name": "Upsert Google Sheets",
      "credentials": {
        "googleSheetsOAuth2Api": {
          "id": "ESD8JJHqd8A9NlNx",
          "name": "Google Sheets account (Kris)"
        }
      }
    },
    {
      "parameters": {
        "method": "POST",
        "url": "https://app.dumplingai.com/api/v1/search-places",
        "authentication": "genericCredentialType",
        "genericAuthType": "httpHeaderAuth",
        "sendBody": true,
        "specifyBody": "json",
        "jsonBody": "={\n  \"query\": \"{{ $json.query }}\",\n  \"country\": \"{{ $json.country }}\",\n  \"location\": \"{{ $json.location }}\",\n  \"language\": \"en\"\n}\n",
        "options": {}
      },
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.2,
      "position": [
        -40,
        -180
      ],
      "id": "6180c011-9006-466c-bd9e-617db183a143",
      "name": "Scrape Leads (DumplingAi)",
      "credentials": {
        "httpBasicAuth": {
          "id": "O0OOt4m5Ck2YFP46",
          "name": "Apify API"
        },
        "httpHeaderAuth": {
          "id": "ef0BCaFWMOPONYej",
          "name": "DumplingAi"
        }
      }
    },
    {
      "parameters": {
        "fieldToSplitOut": "places",
        "options": {}
      },
      "type": "n8n-nodes-base.splitOut",
      "typeVersion": 1,
      "position": [
        180,
        -180
      ],
      "id": "29b8b9db-6ecb-460b-87b2-a0ba719f1e3d",
      "name": "Split Out"
    }
  ],
  "pinData": {},
  "connections": {
    "On form submission": {
      "main": [
        [
          {
            "node": "Scrape Leads (DumplingAi)",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Scrape Leads (DumplingAi)": {
      "main": [
        [
          {
            "node": "Split Out",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Split Out": {
      "main": [
        [
          {
            "node": "Upsert Google Sheets",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  },
  "active": false,
  "settings": {
    "executionOrder": "v1"
  },
  "versionId": "a51ed092-1d6c-4c6b-b060-661d7ff11ad9",
  "meta": {
    "templateCredsSetupCompleted": true,
    "instanceId": "4aabc0aa2e160dafa4f9d9bcedde563b5af29598cd16960f637ae2fb99aea720"
  },
  "id": "wiTlWaA4zX8gb7tV",
  "tags": [
    {
      "createdAt": "2025-03-22T10:33:09.143Z",
      "updatedAt": "2025-03-22T10:33:09.143Z",
      "id": "CkLrKmooQZxb82mZ",
      "name": "Scraper"
    }
  ]
}