Google My Business潜在客户提取
高级
这是一个Sales, AI领域的自动化工作流,包含 23 个节点。主要使用 If, Code, Wait, FormTrigger, HttpRequest 等节点,结合人工智能技术实现智能自动化。 使用Bright Data按服务或位置从Google My Business提取潜在客户
前置要求
- •可能需要目标 API 的认证凭证
- •Google Sheets API 凭证
- •Anthropic API Key
使用的节点 (23)
工作流预览
可视化展示节点连接关系,支持缩放和平移
导出工作流
复制以下 JSON 配置到 n8n 导入,即可使用此工作流
{
"id": "S3otujHorKo0cvaH",
"meta": {
"instanceId": "bc8ca75c203589705ae2e446cad7181d6f2a7cc1766f958ef9f34810e53b8cb2",
"templateCredsSetupCompleted": true
},
"name": "使用 Bright Data 从 Google My Business 按服务和位置提取潜在客户到 Google Sheets",
"tags": [],
"nodes": [
{
"id": "6c9e04d8-1a25-47e7-a8ef-536744866ae4",
"name": "表单提交触发器",
"type": "n8n-nodes-base.formTrigger",
"position": [
-640,
-200
],
"webhookId": "2dff254d-a8e3-4d27-9871-e9803e342d4e",
"parameters": {
"options": {},
"formTitle": "Extract Business Data Using Service Name and Location",
"formFields": {
"values": [
{
"fieldLabel": "Service",
"placeholder": "Laptop Store",
"requiredField": true
},
{
"fieldLabel": "State",
"placeholder": "Texas",
"requiredField": true
},
{
"fieldType": "dropdown",
"fieldLabel": "Country",
"fieldOptions": {
"values": [
{
"option": "US"
},
{
"option": "India"
}
]
},
"requiredField": true
}
]
},
"formDescription": "Fill details to extract business leads"
},
"typeVersion": 2.2
},
{
"id": "cfb9e212-c53a-4ecd-a342-572a1dd93bfb",
"name": "工作流描述",
"type": "n8n-nodes-base.stickyNote",
"position": [
-740,
-420
],
"parameters": {
"width": 300,
"height": 180,
"content": "## 按服务和位置提取 Google My Business 潜在客户"
},
"typeVersion": 1
},
{
"id": "2f5231af-2e5d-49fe-8534-c87cb2083c19",
"name": "从 Google Maps 抓取商家数据",
"type": "@brightdata/n8n-nodes-brightdata.brightData",
"position": [
900,
60
],
"parameters": {
"urls": "=[\n {\n \"url\": \"https://www.google.com/maps/search/{{ $json.name }}+in+{{ $json.city }} {{ $json.state }}\",\n \"category\": \"{{ $json.category }}\",\n \"country_name\": \"{{ $json.country }}\",\n \"sample\": false\n }\n]\n ",
"resource": "webScrapper",
"dataset_id": {
"__rl": true,
"mode": "list",
"value": "gd_lh0tnzlo2bie4uhdhr",
"cachedResultName": "Google Maps businesses"
},
"requestOptions": {
"proxy": ""
}
},
"credentials": {
"brightdataApi": {
"id": "YOUR_BRIGHTDATA_CREDENTIAL_ID",
"name": "Bright Data API"
}
},
"typeVersion": 1,
"alwaysOutputData": true
},
{
"id": "50b74589-0c38-4e77-b599-af3dab056dd6",
"name": "Claude AI 模型处理城市",
"type": "@n8n/n8n-nodes-langchain.lmChatAnthropic",
"position": [
-400,
40
],
"parameters": {
"model": {
"__rl": true,
"mode": "list",
"value": "claude-sonnet-4-20250514",
"cachedResultName": "Claude 4 Sonnet"
},
"options": {}
},
"credentials": {
"anthropicApi": {
"id": "YOUR_ANTHROPIC_CREDENTIAL_ID",
"name": "Anthropic API"
}
},
"typeVersion": 1.3
},
{
"id": "cb07c9ad-9522-46f7-bf81-eb22689f4e27",
"name": "按城市分离数据",
"type": "n8n-nodes-base.code",
"position": [
380,
-200
],
"parameters": {
"jsCode": "// Get values from input expressions\nconst serviceName = $('Form Submission Trigger').first().json.Service;\nconst state = $('Form Submission Trigger').first().json.State;\nconst country = $('Form Submission Trigger').first().json.Country;\nconst citiesString = $('Generate City List').first().json.output;\n\n// Validate required fields\nif (!serviceName || !state || !country || !citiesString) {\n throw new Error(\"Missing required input data (Service, State, Country, or City list)\");\n}\n\n// Split cities string by newline and clean extra spaces\nconst cities = citiesString.split('\\n').map(city => city.trim()).filter(city => city.length > 0);\n\n// Generate output items dynamically for each city\nconst output = cities.map(city => ({\n json: {\n name: serviceName,\n country: country,\n state: state,\n city: city,\n category: serviceName\n }\n}));\n\nreturn output;\n"
},
"typeVersion": 2
},
{
"id": "44478ce4-fd08-4e9e-bf2a-4116b5d6084c",
"name": "生成城市列表",
"type": "@n8n/n8n-nodes-langchain.agent",
"position": [
-400,
-200
],
"parameters": {
"text": "=Provide a list of cities or sub areas located inside the Location of {{ $json.State }}, within the country {{ $json.Country }}. This data will be used to search on Google maps for businesses in that region.\nThe output should be a plain text list, without bullets, numbering, or any special characters.\nDo not include any introduction, explanation, or concluding text—only the list of city names.",
"options": {},
"promptType": "define"
},
"typeVersion": 2
},
{
"id": "d4416202-1a71-4f6f-b363-9f7d64e1855b",
"name": "Claude AI 模型处理分类",
"type": "@n8n/n8n-nodes-langchain.lmChatAnthropic",
"position": [
0,
40
],
"parameters": {
"model": {
"__rl": true,
"mode": "list",
"value": "claude-sonnet-4-20250514",
"cachedResultName": "Claude 4 Sonnet"
},
"options": {}
},
"credentials": {
"anthropicApi": {
"id": "YOUR_ANTHROPIC_CREDENTIAL_ID",
"name": "Anthropic API"
}
},
"typeVersion": 1.3
},
{
"id": "74894c83-f855-49ed-b523-1521aa46e28d",
"name": "分类服务类型",
"type": "@n8n/n8n-nodes-langchain.agent",
"position": [
-20,
-200
],
"parameters": {
"text": "=Determine the appropriate category based on the following input: \"{{ $('Form Submission Trigger').item.json.Service }}\"\n\nThe output must contain only the category name that best describes the given service.\nExamples of categories include but are not limited to: Electronics, Healthcare, Education, Food & Beverage, Automotive, Finance, Real Estate, etc.",
"options": {},
"promptType": "define"
},
"typeVersion": 2
},
{
"id": "d3efe732-94cf-4d6e-b55f-12b7c1bb2a5c",
"name": "城市处理说明",
"type": "n8n-nodes-base.stickyNote",
"position": [
300,
-300
],
"parameters": {
"height": 80,
"content": "按城市名称分别进行搜索以确保全面覆盖"
},
"typeVersion": 1
},
{
"id": "be50e961-e293-4376-9f96-5a279d20a37f",
"name": "批量处理城市",
"type": "n8n-nodes-base.splitInBatches",
"position": [
640,
-200
],
"parameters": {
"options": {}
},
"typeVersion": 3
},
{
"id": "d1b3ff9c-4dfc-42d5-ab4b-7e87c2b3d3b4",
"name": "获取现有商家数据",
"type": "n8n-nodes-base.googleSheets",
"position": [
940,
-500
],
"parameters": {
"options": {},
"sheetName": {
"__rl": true,
"mode": "list",
"value": "gid=0",
"cachedResultUrl": "https://docs.google.com/spreadsheets/d/YOUR_GOOGLE_SHEET_ID/edit#gid=0",
"cachedResultName": "Business Leads"
},
"documentId": {
"__rl": true,
"mode": "list",
"value": "YOUR_GOOGLE_SHEET_ID",
"cachedResultUrl": "https://docs.google.com/spreadsheets/d/YOUR_GOOGLE_SHEET_ID/edit",
"cachedResultName": "Business Leads Database"
}
},
"credentials": {
"googleSheetsOAuth2Api": {
"id": "YOUR_GOOGLE_SHEETS_CREDENTIAL_ID",
"name": "Google Sheets OAuth2"
}
},
"typeVersion": 4.6
},
{
"id": "a7d336a6-cfb4-4c34-a39b-98ba5f4b8633",
"name": "检查重复条目",
"type": "n8n-nodes-base.code",
"position": [
1120,
-500
],
"parameters": {
"jsCode": "const items = $input.all();\n\nconst seen = new Map();\nconst duplicates = [];\n\nfor (const item of items) {\n const businessName = String(item.json['Business Name'] || '').trim().toLowerCase();\n const phoneNumber = String(item.json['Phone Number'] || '').trim();\n const address = item.json['Address'];\n const mapsUrl = item.json['Google Maps URL'];\n\n if (!businessName) continue;\n\n const key = businessName;\n\n if (seen.has(key)) {\n const previous = seen.get(key);\n\n if (!phoneNumber || phoneNumber === previous.phoneNumber) {\n duplicates.push({\n json: {\n Address: address,\n 'Google Maps URL': mapsUrl\n }\n });\n }\n\n } else {\n seen.set(key, { phoneNumber });\n }\n}\n\nreturn duplicates;\n"
},
"typeVersion": 2
},
{
"id": "5d5c8d06-0e7b-403f-b020-b46e5ebe3581",
"name": "查找重复行号",
"type": "n8n-nodes-base.googleSheets",
"position": [
1600,
-480
],
"parameters": {
"options": {
"returnFirstMatch": true
},
"filtersUI": {
"values": [
{
"lookupValue": "={{ $json.Address }}",
"lookupColumn": "Address"
},
{
"lookupValue": "={{ $json['Google Maps URL'] }}",
"lookupColumn": "Google Maps URL"
}
]
},
"sheetName": {
"__rl": true,
"mode": "list",
"value": "gid=0",
"cachedResultUrl": "https://docs.google.com/spreadsheets/d/YOUR_GOOGLE_SHEET_ID/edit#gid=0",
"cachedResultName": "Business Leads"
},
"documentId": {
"__rl": true,
"mode": "list",
"value": "YOUR_GOOGLE_SHEET_ID",
"cachedResultUrl": "https://docs.google.com/spreadsheets/d/YOUR_GOOGLE_SHEET_ID/edit",
"cachedResultName": "Business Leads Database"
}
},
"credentials": {
"googleSheetsOAuth2Api": {
"id": "YOUR_GOOGLE_SHEETS_CREDENTIAL_ID",
"name": "Google Sheets OAuth2"
}
},
"executeOnce": true,
"typeVersion": 4.6
},
{
"id": "5480a6a6-597b-4e9f-9d8e-1654fe2adff7",
"name": "检查抓取状态",
"type": "n8n-nodes-base.if",
"position": [
1100,
60
],
"parameters": {
"options": {},
"conditions": {
"options": {
"version": 2,
"leftValue": "",
"caseSensitive": true,
"typeValidation": "strict"
},
"combinator": "and",
"conditions": [
{
"id": "ae36c72f-a772-499f-a1d7-92cf8a8d640c",
"operator": {
"type": "string",
"operation": "exists",
"singleValue": true
},
"leftValue": "={{ $json.message }}",
"rightValue": ""
}
]
}
},
"typeVersion": 2.2
},
{
"id": "f9d3b3b2-b9c3-4f28-8e5b-9cb965122038",
"name": "删除重复行",
"type": "n8n-nodes-base.googleSheets",
"position": [
1880,
-480
],
"parameters": {
"operation": "delete",
"sheetName": {
"__rl": true,
"mode": "list",
"value": "gid=0",
"cachedResultUrl": "https://docs.google.com/spreadsheets/d/YOUR_GOOGLE_SHEET_ID/edit#gid=0",
"cachedResultName": "Business Leads"
},
"documentId": {
"__rl": true,
"mode": "list",
"value": "YOUR_GOOGLE_SHEET_ID",
"cachedResultUrl": "https://docs.google.com/spreadsheets/d/YOUR_GOOGLE_SHEET_ID/edit",
"cachedResultName": "Business Leads Database"
},
"startIndex": "={{ $json.row_number }}"
},
"credentials": {
"googleSheetsOAuth2Api": {
"id": "YOUR_GOOGLE_SHEETS_CREDENTIAL_ID",
"name": "Google Sheets OAuth2"
}
},
"executeOnce": true,
"typeVersion": 4.6
},
{
"id": "a6fe2f90-d5e5-48cf-ab05-1a0c2f584533",
"name": "批量处理重复项",
"type": "n8n-nodes-base.splitInBatches",
"position": [
1340,
-500
],
"parameters": {
"options": {}
},
"typeVersion": 3
},
{
"id": "1ac3e5d6-f738-42be-ada4-002781ea68ed",
"name": "将商家数据保存到表格",
"type": "n8n-nodes-base.googleSheets",
"position": [
2340,
80
],
"parameters": {
"columns": {
"value": {
"City": "={{ $('Separate Data by City').item.json.city }}",
"Address": "={{ $json.address }}",
"Country": "={{ $json.country }}",
"Category": "={{ $json.category }}",
"Reviews URL": "={{ $json.reviews }}",
"Website URL": "={{ $json.open_website }}",
"Phone Number": "={{ $json.phone_number }}",
"Business Name": "={{ $json.name }}",
"Google Rating": "={{ $json.rating }}",
"Total Reviews": "={{ $json.reviews_count }}",
"Google Maps URL": "={{ $json.url }}",
"Operating Hours": "={{ $json.open_hours }}"
},
"schema": [
{
"id": "Business Name",
"type": "string",
"display": true,
"removed": false,
"required": false,
"displayName": "Business Name",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Website URL",
"type": "string",
"display": true,
"removed": false,
"required": false,
"displayName": "Website URL",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Category",
"type": "string",
"display": true,
"removed": false,
"required": false,
"displayName": "Category",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Country",
"type": "string",
"display": true,
"removed": false,
"required": false,
"displayName": "Country",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "City",
"type": "string",
"display": true,
"removed": false,
"required": false,
"displayName": "City",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Phone Number",
"type": "string",
"display": true,
"removed": false,
"required": false,
"displayName": "Phone Number",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Google Maps URL",
"type": "string",
"display": true,
"removed": false,
"required": false,
"displayName": "Google Maps URL",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Address",
"type": "string",
"display": true,
"removed": false,
"required": false,
"displayName": "Address",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Operating Hours",
"type": "string",
"display": true,
"removed": false,
"required": false,
"displayName": "Operating Hours",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Google Rating",
"type": "string",
"display": true,
"removed": false,
"required": false,
"displayName": "Google Rating",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Total Reviews",
"type": "string",
"display": true,
"removed": false,
"required": false,
"displayName": "Total Reviews",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Reviews URL",
"type": "string",
"display": true,
"removed": false,
"required": false,
"displayName": "Reviews URL",
"defaultMatch": false,
"canBeUsedToMatch": true
}
],
"mappingMode": "defineBelow",
"matchingColumns": [],
"attemptToConvertTypes": false,
"convertFieldsToString": false
},
"options": {},
"operation": "append",
"sheetName": {
"__rl": true,
"mode": "list",
"value": "gid=0",
"cachedResultUrl": "https://docs.google.com/spreadsheets/d/YOUR_GOOGLE_SHEET_ID/edit#gid=0",
"cachedResultName": "Business Leads"
},
"documentId": {
"__rl": true,
"mode": "list",
"value": "YOUR_GOOGLE_SHEET_ID",
"cachedResultUrl": "https://docs.google.com/spreadsheets/d/YOUR_GOOGLE_SHEET_ID/edit",
"cachedResultName": "Business Leads Database"
}
},
"credentials": {
"googleSheetsOAuth2Api": {
"id": "YOUR_GOOGLE_SHEETS_CREDENTIAL_ID",
"name": "Google Sheets OAuth2"
}
},
"typeVersion": 4.6
},
{
"id": "fb085dbf-205d-442c-9fa3-bb858df76d5d",
"name": "获取已抓取数据",
"type": "n8n-nodes-base.httpRequest",
"position": [
2160,
-120
],
"parameters": {
"url": "=https://api.brightdata.com/datasets/v3/snapshot/{{ $json.snapshot_id }}",
"options": {},
"sendQuery": true,
"sendHeaders": true,
"queryParameters": {
"parameters": [
{
"name": "format",
"value": "json"
}
]
}
},
"credentials": {
"httpHeaderAuth": {
"id": "YOUR_BRIGHTDATA_CRED_ID",
"name": "Bright Data API"
}
},
"typeVersion": 4.2
},
{
"id": "c6856520-d927-458c-8354-cf3ee7101183",
"name": "检查数据收集状态",
"type": "n8n-nodes-base.httpRequest",
"position": [
1340,
-100
],
"parameters": {
"url": "=https://api.brightdata.com/datasets/v3/progress/{{ $json.snapshot_id }}",
"options": {},
"sendHeaders": true
},
"credentials": {
"httpHeaderAuth": {
"id": "YOUR_BRIGHTDATA_CRED_ID",
"name": "Bright Data API"
}
},
"typeVersion": 4.2,
"alwaysOutputData": true
},
{
"id": "d3c03942-cc00-4f13-9be2-cb4abf49ed5d",
"name": "等待速率限制",
"type": "n8n-nodes-base.wait",
"position": [
1620,
-100
],
"webhookId": "10b45556-5e91-4387-abd0-f9078b220286",
"parameters": {
"amount": 25
},
"typeVersion": 1.1
},
{
"id": "e2989c58-cb07-4643-820a-0b99f2daacd5",
"name": "检查数据是否就绪",
"type": "n8n-nodes-base.if",
"position": [
1880,
-100
],
"parameters": {
"options": {},
"conditions": {
"options": {
"version": 2,
"leftValue": "",
"caseSensitive": true,
"typeValidation": "strict"
},
"combinator": "or",
"conditions": [
{
"id": "35ed620d-b5d5-4e97-bcc5-52b283d85616",
"operator": {
"name": "filter.operator.equals",
"type": "string",
"operation": "equals"
},
"leftValue": "={{ $json.status }}",
"rightValue": "ready"
}
]
}
},
"typeVersion": 2.2
},
{
"id": "7ae091e8-1cd6-4b7d-9a49-9a3b7cfc5aa8",
"name": "数据收集说明",
"type": "n8n-nodes-base.stickyNote",
"position": [
1120,
-220
],
"parameters": {
"color": 6,
"width": 1500,
"height": 480,
"content": "## 数据收集监控"
},
"typeVersion": 1
},
{
"id": "9842b5c4-046c-4223-97f7-c346fa77e38d",
"name": "重复项移除说明",
"type": "n8n-nodes-base.stickyNote",
"position": [
740,
-680
],
"parameters": {
"color": 6,
"width": 1500,
"height": 380,
"content": "## 重复项移除流程"
},
"typeVersion": 1
}
],
"active": true,
"pinData": {},
"settings": {
"executionOrder": "v1"
},
"versionId": "da879faa-05c7-4bda-b495-18ed50989277",
"connections": {
"Fetch Scraped Data": {
"main": [
[
{
"node": "Save Business Data to Sheet",
"type": "main",
"index": 0
}
]
]
},
"Generate City List": {
"main": [
[
{
"node": "Categorize Service Type",
"type": "main",
"index": 0
}
]
]
},
"Check if Data Ready": {
"main": [
[
{
"node": "Fetch Scraped Data",
"type": "main",
"index": 0
}
],
[
{
"node": "Check Data Collection Status",
"type": "main",
"index": 0
}
]
]
},
"Delete Duplicate Row": {
"main": [
[
{
"node": "Process Duplicates in Batches",
"type": "main",
"index": 0
}
]
]
},
"Check Scraping Status": {
"main": [
[
{
"node": "Check Data Collection Status",
"type": "main",
"index": 0
}
],
[
{
"node": "Save Business Data to Sheet",
"type": "main",
"index": 0
}
]
]
},
"Separate Data by City": {
"main": [
[
{
"node": "Process Cities in Batches",
"type": "main",
"index": 0
}
]
]
},
"Wait for Rate Limiting": {
"main": [
[
{
"node": "Check if Data Ready",
"type": "main",
"index": 0
}
]
]
},
"Categorize Service Type": {
"main": [
[
{
"node": "Separate Data by City",
"type": "main",
"index": 0
}
]
]
},
"Form Submission Trigger": {
"main": [
[
{
"node": "Generate City List",
"type": "main",
"index": 0
}
]
]
},
"Find Duplicate Row Number": {
"main": [
[
{
"node": "Delete Duplicate Row",
"type": "main",
"index": 0
}
]
]
},
"Process Cities in Batches": {
"main": [
[
{
"node": "Get Existing Business Data",
"type": "main",
"index": 0
}
],
[
{
"node": "Scrape Business Data from Google Maps",
"type": "main",
"index": 0
}
]
]
},
"Claude AI Model for Cities": {
"ai_languageModel": [
[
{
"node": "Generate City List",
"type": "ai_languageModel",
"index": 0
}
]
]
},
"Get Existing Business Data": {
"main": [
[
{
"node": "Check for Duplicate Entries",
"type": "main",
"index": 0
}
]
]
},
"Check for Duplicate Entries": {
"main": [
[
{
"node": "Process Duplicates in Batches",
"type": "main",
"index": 0
}
]
]
},
"Save Business Data to Sheet": {
"main": [
[
{
"node": "Process Cities in Batches",
"type": "main",
"index": 0
}
]
]
},
"Check Data Collection Status": {
"main": [
[
{
"node": "Wait for Rate Limiting",
"type": "main",
"index": 0
}
]
]
},
"Process Duplicates in Batches": {
"main": [
[],
[
{
"node": "Find Duplicate Row Number",
"type": "main",
"index": 0
}
]
]
},
"Claude AI Model for Categories": {
"ai_languageModel": [
[
{
"node": "Categorize Service Type",
"type": "ai_languageModel",
"index": 0
}
]
]
},
"Scrape Business Data from Google Maps": {
"main": [
[
{
"node": "Check Scraping Status",
"type": "main",
"index": 0
}
]
]
}
}
}常见问题
如何使用这个工作流?
复制上方的 JSON 配置代码,在您的 n8n 实例中创建新工作流并选择「从 JSON 导入」,粘贴配置后根据需要修改凭证设置即可。
这个工作流适合什么场景?
高级 - 销售, 人工智能
需要付费吗?
本工作流完全免费,您可以直接导入使用。但请注意,工作流中使用的第三方服务(如 OpenAI API)可能需要您自行付费。
相关工作流推荐
潜在客户工作流:通过 BrightData 进行 Yelp 和 Trustpilot 抓取 + OpenAI 分析
通过 Yelp 和 Trustpilot 抓取 + AI 驱动的邮件外联生成销售线索
If
Code
Wait
+9
32 节点Incrementors
销售
使用关键词在 X 和其他社交媒体平台发布最新新闻
使用关键词和 Bright Data 通过 AI 内容生成自动发布最新新闻到 X
If
Code
Wait
+8
16 节点Dvir Sharon
设计
自动发现和分析TikTok影响者并发送邮件通知
使用Bright Data、Claude AI和邮件推广发现和分析TikTok影响者
Code
Wait
Gmail
+7
22 节点Dvir Sharon
人工智能
WordPress 内容生成器 v3
WordPress 内容生成器 v3
If
Set
Code
+21
102 节点Alex Kim
人工智能
(Duc)深度研究市场模板
集成PerplexityAI研究和OpenAI内容的多层级WordPress博客生成器
If
Set
Xml
+28
132 节点Daniel Ng
人工智能
使用Bright Data和LLMs自动化大规模超个性化外联
通过Bright Data和大语言模型实现大规模超个性化外联自动化
If
Set
Wait
+8
21 节点Yaron Been
销售