使用Bright Data API和Google Sheets集成的Google Maps商家电话抓取器
高级
这是一个Sales领域的自动化工作流,包含 16 个节点。主要使用 If, Wait, FormTrigger, HttpRequest, GoogleSheets 等节点。 通过Bright Data API与Google Sheets同步的Google Maps电话抓取器
前置要求
- •可能需要目标 API 的认证凭证
- •Google Sheets API 凭证
分类
工作流预览
可视化展示节点连接关系,支持缩放和平移
导出工作流
复制以下 JSON 配置到 n8n 导入,即可使用此工作流
{
"id": "Hm7iTSgpu2of6gz4",
"meta": {
"instanceId": "bc8ca75c203589705ae2e446cad7181d6f2a7cc1766f958ef9f34810e53b8cb2",
"templateCredsSetupCompleted": true
},
"name": "使用 Bright Data API 和 Google Sheets 集成的 Google 地图商家电话号码抓取器",
"tags": [],
"nodes": [
{
"id": "e5b879b7-5f3c-4679-95e4-6c32eae86080",
"name": "便签",
"type": "n8n-nodes-base.stickyNote",
"position": [
-1340,
20
],
"parameters": {
"width": 220,
"height": 220,
"content": "📝 触发器 - 表单提交时启动"
},
"typeVersion": 1
},
{
"id": "703d65f1-bbc7-437a-8a82-a35b6ac04504",
"name": "表单触发器 - 提交位置和关键词",
"type": "n8n-nodes-base.formTrigger",
"position": [
-1280,
80
],
"webhookId": "8b72dcdf-25a1-4b63-bb44-f918f7095d5d",
"parameters": {
"options": {},
"formTitle": "GMB",
"formFields": {
"values": [
{
"fieldLabel": "Location",
"requiredField": true
},
{
"fieldLabel": "keywords",
"requiredField": true
}
]
}
},
"typeVersion": 2.2
},
{
"id": "1b5f22d3-c271-4d80-bc40-9b701a668c40",
"name": "便签1",
"type": "n8n-nodes-base.stickyNote",
"position": [
-1080,
20
],
"parameters": {
"color": 3,
"width": 220,
"height": 220,
"content": "向 Bright Data API 发送抓取请求"
},
"typeVersion": 1
},
{
"id": "61dc6463-12db-453c-a732-dc0d924dc469",
"name": "Bright Data API - 请求商家数据",
"type": "n8n-nodes-base.httpRequest",
"position": [
-1020,
80
],
"parameters": {
"url": "https://api.brightdata.com/datasets/v3/trigger",
"method": "POST",
"options": {},
"jsonBody": "={\n \"input\": [\n {\n \"country\": \"{{ $json.Location }}\",\n \"keyword\": \"{{ $json.keywords }}\",\n \"lat\": \"\"\n }\n ],\n \"custom_output_fields\": [\n \n \"url\",\n \"country\",\n \"name\",\n \n \"address\",\n \"description\",\n \n \"open_hours\",\n \"reviews_count\",\n \"rating\",\n \n \"reviews\",\n \"services_provided\",\n \n \"open_website\",\n \"phone_number\",\n \"permanently_closed\",\n \"photos_and_videos\",\n \"people_also_search\"\n \n ]\n} ",
"sendBody": true,
"sendQuery": true,
"sendHeaders": true,
"specifyBody": "json",
"queryParameters": {
"parameters": [
{
"name": "dataset_id",
"value": "gd_m8ebnr0q2qlklc02fz"
},
{
"name": "include_errors",
"value": "true"
},
{
"name": "type",
"value": "discover_new"
},
{
"name": "discover_by",
"value": "location"
},
{
"name": "limit_per_input",
"value": "2"
}
]
},
"headerParameters": {
"parameters": [
{
"name": "Authorization",
"value": "Bearer BRIGHT_DATA_API_KEY"
}
]
}
},
"typeVersion": 4.2
},
{
"id": "aae71edd-22bc-4bb9-a950-1c82aef6a30b",
"name": "检查抓取状态",
"type": "n8n-nodes-base.httpRequest",
"position": [
-780,
80
],
"parameters": {
"url": "=https://api.brightdata.com/datasets/v3/progress/{{ $json.snapshot_id }}",
"options": {},
"sendQuery": true,
"sendHeaders": true,
"queryParameters": {
"parameters": [
{
"name": "format",
"value": "json"
}
]
},
"headerParameters": {
"parameters": [
{
"name": "Authorization",
"value": "Bearer BRIGHT_DATA_API_KEY"
}
]
}
},
"typeVersion": 4.2
},
{
"id": "6370948d-f408-4cf8-8d3c-0c2db3665cae",
"name": "便签 2",
"type": "n8n-nodes-base.stickyNote",
"position": [
-840,
0
],
"parameters": {
"color": 4,
"width": 220,
"height": 260,
"content": "⏳ 检查状态 - 数据抓取是否完成?"
},
"typeVersion": 1
},
{
"id": "1c016ecd-97db-4638-919f-2cc7136b2384",
"name": "便签 3",
"type": "n8n-nodes-base.stickyNote",
"position": [
-600,
0
],
"parameters": {
"color": 5,
"width": 200,
"height": 260,
"content": "✅ 是否就绪? - 如果就绪则继续;否则等待"
},
"typeVersion": 1
},
{
"id": "67931cf3-a2c5-42e0-86b7-2b1611175037",
"name": "检查状态是否就绪",
"type": "n8n-nodes-base.if",
"position": [
-560,
80
],
"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": "9e089ddb-2cd2-4988-b070-a400d9a464e3",
"name": "便签 4",
"type": "n8n-nodes-base.stickyNote",
"position": [
-380,
240
],
"parameters": {
"color": 7,
"height": 240,
"content": "⏱️ 等待 - 在再次检查前暂停 1 分钟"
},
"typeVersion": 1
},
{
"id": "594732d2-7a44-4b20-9cf6-81314933a857",
"name": "重试前等待",
"type": "n8n-nodes-base.wait",
"position": [
-320,
300
],
"webhookId": "7047efad-de41-4608-b95c-d3e0203ef620",
"parameters": {
"unit": "minutes",
"amount": 1
},
"typeVersion": 1.1
},
{
"id": "34770c87-d63b-4bf8-a7e7-34fb579bd716",
"name": "检查记录是否存在",
"type": "n8n-nodes-base.if",
"position": [
-280,
60
],
"parameters": {
"options": {},
"conditions": {
"options": {
"version": 2,
"leftValue": "",
"caseSensitive": true,
"typeValidation": "strict"
},
"combinator": "and",
"conditions": [
{
"id": "f01bd215-c406-493c-a6e4-2b8ec5686b44",
"operator": {
"type": "number",
"operation": "notEquals"
},
"leftValue": "={{ $json.records }}",
"rightValue": "={{ 0 }}"
}
]
}
},
"typeVersion": 2.2
},
{
"id": "0119bde3-66e8-44f2-8991-dc4b9e02962e",
"name": "便签 5",
"type": "n8n-nodes-base.stickyNote",
"position": [
-360,
-20
],
"parameters": {
"color": 4,
"width": 260,
"height": 240,
"content": "📊 有数据? - 仅在找到商家记录时继续"
},
"typeVersion": 1
},
{
"id": "1cd6681e-47e5-4e82-8e12-408e299b9503",
"name": "便签6",
"type": "n8n-nodes-base.stickyNote",
"position": [
-80,
-40
],
"parameters": {
"color": 5,
"width": 220,
"height": 260,
"content": "📥 获取数据 - 获取包括电话号码在内的商家信息"
},
"typeVersion": 1
},
{
"id": "135b9224-bcd2-4790-9066-278985874a3a",
"name": "获取商家数据",
"type": "n8n-nodes-base.httpRequest",
"position": [
-20,
40
],
"parameters": {
"url": "=https://api.brightdata.com/datasets/v3/snapshot/{{ $json.snapshot_id }}",
"options": {},
"sendQuery": true,
"sendHeaders": true,
"queryParameters": {
"parameters": [
{
"name": "format",
"value": "json"
}
]
},
"headerParameters": {
"parameters": [
{
"name": "Authorization",
"value": "Bearer BRIGHT_DATA_API_KEY"
}
]
}
},
"typeVersion": 4.2
},
{
"id": "141e0fdc-56d7-42f4-92d4-93cda1ffe7e2",
"name": "便签7",
"type": "n8n-nodes-base.stickyNote",
"position": [
180,
-40
],
"parameters": {
"color": 6,
"width": 280,
"height": 260,
"content": "将商家数据保存到您的 Google Sheet 中的 GMB 工作表📄 保存到表格 - 存储商家名称、号码、URL 等"
},
"typeVersion": 1
},
{
"id": "3a0e1f5b-d923-47a0-b036-c18ac260980a",
"name": "保存到 Google Sheets",
"type": "n8n-nodes-base.googleSheets",
"position": [
260,
40
],
"parameters": {
"columns": {
"value": {
"URL": "={{ $json.url }}",
"Name": "={{ $json.name }}",
"Rating": "={{ $json.rating }}",
"Address": "={{ $json.address }}",
"Phone Number": "={{ $json.phone_number }}"
},
"schema": [
{
"id": "Name",
"type": "string",
"display": true,
"required": false,
"displayName": "Name",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "URL",
"type": "string",
"display": true,
"required": false,
"displayName": "URL",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Rating",
"type": "string",
"display": true,
"required": false,
"displayName": "Rating",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Phone Number",
"type": "string",
"display": true,
"required": false,
"displayName": "Phone Number",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Address",
"type": "string",
"display": true,
"required": false,
"displayName": "Address",
"defaultMatch": false,
"canBeUsedToMatch": true
}
],
"mappingMode": "defineBelow",
"matchingColumns": [],
"attemptToConvertTypes": false,
"convertFieldsToString": false
},
"options": {},
"operation": "append",
"sheetName": {
"__rl": true,
"mode": "list",
"value": 619305781,
"cachedResultUrl": "https://docs.google.com/spreadsheets/d/YOUR_GOOGLE_SHEET_ID/edit#gid=619305781",
"cachedResultName": "GMB"
},
"documentId": {
"__rl": true,
"mode": "list",
"value": "YOUR_GOOGLE_SHEET_ID",
"cachedResultUrl": "https://docs.google.com/spreadsheets/d/YOUR_GOOGLE_SHEET_ID/edit?usp=drivesdk",
"cachedResultName": "Business Data Sheet"
}
},
"credentials": {
"googleSheetsOAuth2Api": {
"id": "YOUR_GOOGLE_SHEETS_CREDENTIAL_ID",
"name": "Google Sheets OAuth2"
}
},
"typeVersion": 4.6
}
],
"active": false,
"pinData": {},
"settings": {
"executionOrder": "v1"
},
"versionId": "0bed9bf1-00a3-4eb6-bf7c-cf07bee006a2",
"connections": {
"Wait Before Retry": {
"main": [
[
{
"node": "Check Scraping Status",
"type": "main",
"index": 0
}
]
]
},
"Check Records Exist": {
"main": [
[
{
"node": "Fetch Business Data",
"type": "main",
"index": 0
}
]
]
},
"Fetch Business Data": {
"main": [
[
{
"node": "Save to Google Sheets",
"type": "main",
"index": 0
}
]
]
},
"Check If Status Ready": {
"main": [
[
{
"node": "Check Records Exist",
"type": "main",
"index": 0
}
],
[
{
"node": "Wait Before Retry",
"type": "main",
"index": 0
}
]
]
},
"Check Scraping Status": {
"main": [
[
{
"node": "Check If Status Ready",
"type": "main",
"index": 0
}
]
]
},
"Bright Data API - Request Business Data": {
"main": [
[
{
"node": "Check Scraping Status",
"type": "main",
"index": 0
}
]
]
},
"Form Trigger - Submit Location and Keywords": {
"main": [
[
{
"node": "Bright Data API - Request Business Data",
"type": "main",
"index": 0
}
]
]
}
}
}常见问题
如何使用这个工作流?
复制上方的 JSON 配置代码,在您的 n8n 实例中创建新工作流并选择「从 JSON 导入」,粘贴配置后根据需要修改凭证设置即可。
这个工作流适合什么场景?
高级 - 销售
需要付费吗?
本工作流完全免费,您可以直接导入使用。但请注意,工作流中使用的第三方服务(如 OpenAI API)可能需要您自行付费。
相关工作流推荐
潜在客户工作流:通过 BrightData 进行 Yelp 和 Trustpilot 抓取 + OpenAI 分析
通过 Yelp 和 Trustpilot 抓取 + AI 驱动的邮件外联生成销售线索
If
Code
Wait
+9
32 节点Incrementors
销售
财务洞察自动化:通过Bright Data将市值发送到Telegram
使用Bright Data从Yahoo Finance提取市值数据并在Telegram中可视化
If
Code
Wait
+5
14 节点Incrementors
加密货币交易
集成Bright Data与Telegram提醒的Google Play评论智能系统
使用Bright Data和Telegram提醒的Google Play评论智能分析系统
If
Wait
Telegram
+4
18 节点Incrementors
人工智能
多平台价格查找器:使用 Bright Data 和 Telegram 抓取价格
多平台价格查找器:使用 Bright Data、Claude AI 和 Telegram 抓取价格
If
Code
Wait
+9
85 节点Incrementors
市场调研
通过Bright Data API的Twitter个人资料抓取器,输出到Google Sheets
使用Bright Data API抓取Twitter个人资料并导出到Google Sheets
If
Wait
Form Trigger
+3
15 节点Incrementors
市场调研
通过 Bright Data API 基于 URL 的 Yelp 商家抓取器,采用 Google Sheets 集中存储
使用 Bright Data API 和 Google Sheets 的基于 URL 的 Yelp 商家抓取器
If
Wait
Form Trigger
+3
14 节点Incrementors
市场调研