{
  "id": "zKOSqoH6TJA6fmuM",
  "meta": {
    "templateCredsSetupCompleted": true
  },
  "name": "Scrape Google Places via Dumpling AI and Auto-Save to Google Sheets",
  "tags": [],
  "nodes": [
    {
      "id": "191b5e95-a169-421a-b922-951055926604",
      "name": "Run Every Day at 1 PM",
      "type": "n8n-nodes-base.scheduleTrigger",
      "position": [
        -480,
        -180
      ],
      "parameters": {
        "rule": {
          "interval": [
            {
              "triggerAtHour": 13
            }
          ]
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "1738c371-415e-48cc-8449-48f2c2fc4e53",
      "name": " Scrape Google Places with Dumpling AI",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        -20,
        -180
      ],
      "parameters": {
        "url": "https://app.dumplingai.com/api/v1/search-places",
        "method": "POST",
        "options": {},
        "jsonBody": "={\n  \"query\": \"{{ $json['places '] }}\"\n}",
        "sendBody": true,
        "specifyBody": "json",
        "authentication": "genericCredentialType",
        "genericAuthType": "httpHeaderAuth"
      },
      "credentials": {
        "httpHeaderAuth": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 4.2
    },
    {
      "id": "70965a94-732e-4eac-b8c3-fdd3240ed9a7",
      "name": "Split Resulting Places List",
      "type": "n8n-nodes-base.splitOut",
      "position": [
        200,
        -180
      ],
      "parameters": {
        "options": {},
        "fieldToSplitOut": "places"
      },
      "typeVersion": 1
    },
    {
      "id": "c017e3c2-8d58-412e-9d5b-41d3ee079a82",
      "name": " Save Scraped Data to Sheet",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        420,
        -180
      ],
      "parameters": {
        "columns": {
          "value": {
            "title": "={{ $json.title }}",
            "rating": "={{ $json.rating }}",
            "address": "={{ $json.address }}",
            "website": "={{ $json.website }}",
            "category": "={{ $json.category }}",
            "phoneNumber": "={{ $json.phoneNumber }}"
          },
          "schema": [
            {
              "id": "title",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "title",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "address",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "address",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "rating",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "rating",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "category",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "category",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "phoneNumber",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "phoneNumber",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "website",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "website",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            }
          ],
          "mappingMode": "defineBelow",
          "matchingColumns": [],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        },
        "options": {},
        "operation": "append",
        "sheetName": {
          "__rl": true,
          "mode": "list",
          "value": "",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1NkLQ4ZZ3qSv8HybYuKyW2BgViUij68ux4_SnoBphmWE/edit#gid=645811013",
          "cachedResultName": "Sheet 2"
        },
        "documentId": {
          "__rl": true,
          "mode": "list",
          "value": "",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1NkLQ4ZZ3qSv8HybYuKyW2BgViUij68ux4_SnoBphmWE/edit?usp=drivesdk",
          "cachedResultName": "Google places"
        }
      },
      "credentials": {
        "googleSheetsOAuth2Api": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 4.6
    },
    {
      "id": "93d4c184-363b-4dac-a87c-c60ec2ec91f8",
      "name": "Fetch Search Terms from Sheet",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        -240,
        -180
      ],
      "parameters": {
        "options": {},
        "sheetName": {
          "__rl": true,
          "mode": "list",
          "value": "",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1NkLQ4ZZ3qSv8HybYuKyW2BgViUij68ux4_SnoBphmWE/edit#gid=0",
          "cachedResultName": "Sheet1"
        },
        "documentId": {
          "__rl": true,
          "mode": "list",
          "value": "",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1NkLQ4ZZ3qSv8HybYuKyW2BgViUij68ux4_SnoBphmWE/edit?usp=drivesdk",
          "cachedResultName": "Google places"
        }
      },
      "credentials": {
        "googleSheetsOAuth2Api": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 4.6
    },
    {
      "id": "dce04c8d-5991-4ddb-86ad-faaaca388048",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -500,
        -360
      ],
      "parameters": {
        "width": 660,
        "height": 240,
        "content": "### \ud83d\uddfa\ufe0f Scrape and Save Google Places Listings\n\nThis workflow runs daily at 1 PM. It reads business-related search terms from a Google Sheet (Sheet1), such as \"best dentist in Houston\", and passes each term to Dumpling AI's `search-places` API. The returned list of places is split and parsed. Each entry is appended to another Google Sheet (Sheet2), capturing title, address, rating, category, phone number, and website. Perfect for building local lead lists from Google Maps results.\n"
      },
      "typeVersion": 1
    }
  ],
  "active": false,
  "settings": {
    "executionOrder": "v1"
  },
  "versionId": "c1bbe36f-5b6d-4cd0-827f-67990b139917",
  "connections": {
    "Run Every Day at 1 PM": {
      "main": [
        [
          {
            "node": "Fetch Search Terms from Sheet",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Split Resulting Places List": {
      "main": [
        [
          {
            "node": " Save Scraped Data to Sheet",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Fetch Search Terms from Sheet": {
      "main": [
        [
          {
            "node": " Scrape Google Places with Dumpling AI",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    " Scrape Google Places with Dumpling AI": {
      "main": [
        [
          {
            "node": "Split Resulting Places List",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}