{
  "id": "ROUkg3YTBSKlNG8y",
  "meta": {
    "builderVariant": "mcp",
    "aiBuilderAssisted": true
  },
  "name": "Google Maps Business Scraper - CoreClaw Full Enrichment",
  "tags": [
    {
      "id": "hbKdNxhuONbJaGlV",
      "name": "coreclaw",
      "createdAt": "2026-07-21T19:21:05.277Z",
      "updatedAt": "2026-07-21T19:21:05.277Z"
    },
    {
      "id": "mi4xSuFB80suoVf6",
      "name": "google-maps",
      "createdAt": "2025-06-05T21:22:08.187Z",
      "updatedAt": "2025-06-05T21:22:08.187Z"
    },
    {
      "id": "qT0iym2C6AcTVJRp",
      "name": "data-enrichment",
      "createdAt": "2025-10-08T23:24:40.494Z",
      "updatedAt": "2025-10-08T23:24:40.494Z"
    }
  ],
  "nodes": [
    {
      "id": "15066cf5-8aca-4460-abe8-24810cbca1e3",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        512,
        288
      ],
      "parameters": {
        "width": 480,
        "height": 640,
        "content": "## Untitled workflow\n\n### How it works\n\n1. The workflow is triggered on a schedule to initiate data processing tasks.\n2. It reads pending queries from a Google Sheet for processing.\n3. An enrichment job is started using CoreClaw API based on the queries.\n4. The job status is checked in a loop until completion.\n5. Once completed, results are fetched, split, and saved to a Google Sheet.\n\n### Setup steps\n\n- [ ] Ensure Google Sheets access is configured with the appropriate credentials.\n- [ ] Set up credentials for the CoreClaw API requests.\n- [ ] Schedule the trigger according to your data refresh needs.\n\n### Customization\n\nYou can customize the check interval in the 'Wait for Job Succeed' node to better suit your workflow timings."
      },
      "typeVersion": 1
    },
    {
      "id": "439866cc-1aca-4189-a3e6-53a944dbd79c",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1072,
        304
      ],
      "parameters": {
        "color": 7,
        "width": 416,
        "height": 368,
        "content": "## Trigger and read queries\n\nThis group triggers the workflow based on a schedule and reads pending queries from a Google Sheet."
      },
      "typeVersion": 1
    },
    {
      "id": "09e21fb6-b9ad-4512-9c19-7a8a264f33dc",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1520,
        304
      ],
      "parameters": {
        "color": 7,
        "width": 416,
        "height": 368,
        "content": "## Start enrichment job\n\nInitiates an enrichment job using the CoreClaw API and waits for its completion."
      },
      "typeVersion": 1
    },
    {
      "id": "bce5a473-ff95-409e-ba12-780d2b2dcbb5",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1968,
        288
      ],
      "parameters": {
        "color": 7,
        "width": 640,
        "height": 400,
        "content": "## Monitor and control flow\n\nMonitors the scraping status and loops until the job is complete before fetching the results."
      },
      "typeVersion": 1
    },
    {
      "id": "23cde8c9-0827-463b-b96e-c30146ad3983",
      "name": "Sticky Note4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        2640,
        352
      ],
      "parameters": {
        "color": 7,
        "width": 864,
        "height": 336,
        "content": "## Process and save results\n\nSplits the fetched results to save business data and lead details in Google Sheets."
      },
      "typeVersion": 1
    },
    {
      "id": "656c0b63-553d-4f1d-a543-8cf44569b38c",
      "name": "Every 30 Minutes",
      "type": "n8n-nodes-base.scheduleTrigger",
      "position": [
        1120,
        496
      ],
      "parameters": {
        "rule": {
          "interval": [
            {
              "field": "minutes",
              "minutesInterval": 30
            }
          ]
        }
      },
      "typeVersion": 1.1
    },
    {
      "id": "67bb0441-0f36-4e14-ab4d-1ff85c47ba90",
      "name": "Read Pending Queries in Sheets",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        1344,
        496
      ],
      "parameters": {
        "options": {},
        "filtersUI": {
          "values": [
            {
              "lookupValue": "false",
              "lookupColumn": "Status"
            }
          ]
        },
        "sheetName": {
          "__rl": true,
          "mode": "list",
          "value": "gid=0",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1DHezdcetT0c3Ie1xB3z3jDc5WElsLN87K4J9EQDef9g/edit#gid=0",
          "cachedResultName": "Query"
        },
        "documentId": {
          "__rl": true,
          "mode": "list",
          "value": "1DHezdcetT0c3Ie1xB3z3jDc5WElsLN87K4J9EQDef9g",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1DHezdcetT0c3Ie1xB3z3jDc5WElsLN87K4J9EQDef9g/edit?usp=drivesdk",
          "cachedResultName": "Google Maps Scraper"
        }
      },
      "credentials": {
        "googleSheetsOAuth2Api": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 4.2,
      "alwaysOutputData": true
    },
    {
      "id": "8102b73c-9d0f-4a86-b94e-c9de0982be77",
      "name": "Post to CoreClaw API",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        1568,
        496
      ],
      "parameters": {
        "url": "https://openapi.coreclaw.com/api/v2/workers/coreclaw~google-maps-scraper/runs",
        "method": "POST",
        "options": {},
        "jsonBody": "={\n  \"input\": {\n    \"parameters\": {\n      \"custom\": {\n        \"keywords\": [\"marketing agency\"],\n        \"base_location\": \"Austin, Texas, USA\",\n        \"max_results\": 15,\n        \"fetch_social_info\": true,\n        \"max_leads_per_place\": 3\n      }\n    }\n  },\n  \"is_async\": true,\n  \"limit\": 20,\n  \"offset\": 0\n}",
        "sendBody": true,
        "sendHeaders": true,
        "specifyBody": "json",
        "authentication": "genericCredentialType",
        "genericAuthType": "httpBearerAuth",
        "headerParameters": {
          "parameters": [
            {
              "name": "Content-Type",
              "value": "application/json"
            },
            {
              "name": "Accept",
              "value": "application/json"
            }
          ]
        }
      },
      "credentials": {
        "httpBearerAuth": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 4.2
    },
    {
      "id": "3ddbb111-76d5-47dd-bc5a-8ab24ffa1170",
      "name": "Wait for Job Completion",
      "type": "n8n-nodes-base.wait",
      "position": [
        1792,
        496
      ],
      "parameters": {},
      "typeVersion": 1.1
    },
    {
      "id": "43537fff-94cd-466a-92df-14b4507fc439",
      "name": "Fetch Job Status",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        2016,
        416
      ],
      "parameters": {
        "url": "=https://openapi.coreclaw.com/api/v2/worker-runs/{{ $json.data.run_slug || $json.data.slug }}",
        "options": {
          "timeout": 10000
        },
        "sendHeaders": true,
        "authentication": "genericCredentialType",
        "genericAuthType": "httpBearerAuth",
        "headerParameters": {
          "parameters": [
            {
              "name": "Content-Type",
              "value": "application/json"
            },
            {
              "name": "Accept",
              "value": "application/json"
            }
          ]
        }
      },
      "credentials": {
        "httpBearerAuth": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 4.2
    },
    {
      "id": "82214268-d0d7-4195-b168-cf81b06fa88f",
      "name": "If Job Not Complete",
      "type": "n8n-nodes-base.if",
      "position": [
        2240,
        496
      ],
      "parameters": {
        "options": {},
        "conditions": {
          "options": {
            "version": 2,
            "leftValue": "",
            "caseSensitive": true,
            "typeValidation": "loose"
          },
          "combinator": "and",
          "conditions": [
            {
              "id": "de704919-205a-470f-a417-b297fbbdbaf9",
              "operator": {
                "type": "string",
                "operation": "notEquals"
              },
              "leftValue": "={{ $json.data.status }}",
              "rightValue": "succeeded"
            }
          ]
        },
        "looseTypeValidation": true
      },
      "typeVersion": 2.2
    },
    {
      "id": "a52c0c7f-01c3-421a-9525-5da794f20b91",
      "name": "Fetch Scraped Data",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        2464,
        512
      ],
      "parameters": {
        "url": "=https://openapi.coreclaw.com/api/v2/worker-runs/{{ $json.data.run_slug || $json.data.slug }}/result",
        "options": {
          "timeout": 10000
        },
        "sendHeaders": true,
        "authentication": "genericCredentialType",
        "genericAuthType": "httpBearerAuth",
        "headerParameters": {
          "parameters": [
            {
              "name": "Content-Type",
              "value": "application/json"
            },
            {
              "name": "Accept",
              "value": "application/json"
            }
          ]
        }
      },
      "credentials": {
        "httpBearerAuth": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 4.2
    },
    {
      "id": "571c5e66-93a5-4ac5-bad3-58d408c2e857",
      "name": "Split Places Data",
      "type": "n8n-nodes-base.splitOut",
      "position": [
        2688,
        512
      ],
      "parameters": {
        "options": {},
        "fieldToSplitOut": "data.list"
      },
      "typeVersion": 1
    },
    {
      "id": "72e8cc3c-a9a9-4ed0-b844-2d7435d79ce9",
      "name": "Append Business Data to Sheets",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        2912,
        512
      ],
      "parameters": {
        "columns": {
          "value": {
            "phone": "={{ $json.phone }}",
            "title": "={{ $json.title }}",
            "status": "true",
            "address": "={{ $json.address }}",
            "website": "={{ $json.website }}",
            "all_emails": "={{ ($json.all_emails || []).join(', ') }}",
            "facebook_url": "={{ $json.social_media.facebook.url[0] }}",
            "linkedin_url": "={{ $json.social_media.linkedin.url[0] }}",
            "instagram_url": "={{ $json.social_media.instagram.url[0] }}",
            "source_keyword": "={{ $json.source_keyword }}",
            "primary_category": "={{ $json.primary_category }}"
          },
          "schema": [
            {
              "id": "title",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "title",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "primary_category",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "primary_category",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "address",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "address",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "phone",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "phone",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "website",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "website",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "all_emails",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "all_emails",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "facebook_url",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "facebook_url",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "instagram_url",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "instagram_url",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "linkedin_url",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "linkedin_url",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "source_keyword",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "source_keyword",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "status",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "status",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            }
          ],
          "mappingMode": "defineBelow",
          "matchingColumns": [
            "website"
          ],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        },
        "options": {},
        "operation": "append",
        "sheetName": {
          "__rl": true,
          "mode": "list",
          "value": 599367330,
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1DHezdcetT0c3Ie1xB3z3jDc5WElsLN87K4J9EQDef9g/edit#gid=599367330",
          "cachedResultName": "CoreClaw Data"
        },
        "documentId": {
          "__rl": true,
          "mode": "list",
          "value": "1DHezdcetT0c3Ie1xB3z3jDc5WElsLN87K4J9EQDef9g",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1DHezdcetT0c3Ie1xB3z3jDc5WElsLN87K4J9EQDef9g/edit?usp=drivesdk",
          "cachedResultName": "Google Maps Scraper"
        }
      },
      "credentials": {
        "googleSheetsOAuth2Api": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 4.6
    },
    {
      "id": "71e1dab9-cfd5-4de1-a357-548dd4bc4949",
      "name": "Split Leads Data",
      "type": "n8n-nodes-base.splitOut",
      "position": [
        3136,
        512
      ],
      "parameters": {
        "include": "allOtherFields",
        "options": {},
        "fieldToSplitOut": "leads_enrichment"
      },
      "typeVersion": 1
    },
    {
      "id": "de8cb60c-84ad-4184-af0e-0d1df7229cb1",
      "name": "Append Lead Details to Sheets",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        3360,
        512
      ],
      "parameters": {
        "columns": {
          "value": {
            "email": "={{ $json.leads_enrichment.email }}",
            "industry": "={{ $json.leads_enrichment.industry }}",
            "full_name": "={{ $json.leads_enrichment.full_name }}",
            "job_title": "={{ $json.leads_enrichment.job_title }}",
            "seniority": "={{ $json.leads_enrichment.seniority }}",
            "place_title": "={{ $json.title }}",
            "company_name": "={{ $json.leads_enrichment.company_name }}",
            "company_size": "={{ $json.leads_enrichment.company_size }}",
            "mobile_number": "={{ $json.leads_enrichment.mobile_number }}",
            "place_website": "={{ $json.website }}",
            "linkedin_profile": "={{ $json.leads_enrichment.linkedin_profile }}"
          },
          "schema": [
            {
              "id": "place_title",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "place_title",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "place_website",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "place_website",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "full_name",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "full_name",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "job_title",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "job_title",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "email",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "email",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "mobile_number",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "mobile_number",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "linkedin_profile",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "linkedin_profile",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "company_name",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "company_name",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "company_size",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "company_size",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "industry",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "industry",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "seniority",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "seniority",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            }
          ],
          "mappingMode": "defineBelow",
          "matchingColumns": [],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        },
        "options": {},
        "operation": "append",
        "sheetName": {
          "__rl": true,
          "mode": "list",
          "value": 1492406469,
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1DHezdcetT0c3Ie1xB3z3jDc5WElsLN87K4J9EQDef9g/edit#gid=1492406469",
          "cachedResultName": "CoreClaw Leads"
        },
        "documentId": {
          "__rl": true,
          "mode": "list",
          "value": "1DHezdcetT0c3Ie1xB3z3jDc5WElsLN87K4J9EQDef9g",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1DHezdcetT0c3Ie1xB3z3jDc5WElsLN87K4J9EQDef9g/edit?usp=drivesdk",
          "cachedResultName": "Google Maps Scraper"
        }
      },
      "credentials": {
        "googleSheetsOAuth2Api": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 4.6
    }
  ],
  "active": false,
  "settings": {
    "binaryMode": "separate",
    "availableInMCP": true,
    "executionOrder": "v1"
  },
  "versionId": "b8c9e0f3-4ff0-4eaf-979c-90284b2432a4",
  "nodeGroups": [],
  "connections": {
    "Every 30 Minutes": {
      "main": [
        [
          {
            "node": "Read Pending Queries in Sheets",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Fetch Job Status": {
      "main": [
        [
          {
            "node": "If Job Not Complete",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Split Leads Data": {
      "main": [
        [
          {
            "node": "Append Lead Details to Sheets",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Split Places Data": {
      "main": [
        [
          {
            "node": "Append Business Data to Sheets",
            "type": "main",
            "index": 0
          },
          {
            "node": "Split Leads Data",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Fetch Scraped Data": {
      "main": [
        [
          {
            "node": "Split Places Data",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "If Job Not Complete": {
      "main": [
        [
          {
            "node": "Wait for Job Completion",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Fetch Scraped Data",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Post to CoreClaw API": {
      "main": [
        [
          {
            "node": "Wait for Job Completion",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Wait for Job Completion": {
      "main": [
        [
          {
            "node": "Fetch Job Status",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Read Pending Queries in Sheets": {
      "main": [
        [
          {
            "node": "Post to CoreClaw API",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}