Google Maps 数据提取
高级
这是一个Content Creation, Multimodal AI领域的自动化工作流,包含 18 个节点。主要使用 If, Set, Code, Filter, HttpRequest 等节点。 使用Perplexity AI和邮箱验证自动化Google Maps潜在客户生成
前置要求
- •可能需要目标 API 的认证凭证
- •Google Sheets API 凭证
使用的节点 (18)
工作流预览
可视化展示节点连接关系,支持缩放和平移
导出工作流
复制以下 JSON 配置到 n8n 导入,即可使用此工作流
{
"id": "5xiooM6nIMsvcr9o",
"meta": {
"instanceId": "ceb08568f263be96b9229103e3685353eb955188135771424bbdacd1c1030ab4",
"templateCredsSetupCompleted": true
},
"name": "Google Maps 数据提取",
"tags": [],
"nodes": [
{
"id": "a495a9d9-782f-46e0-b2f7-55476ebe4ed8",
"name": "点击\"执行工作流\"时",
"type": "n8n-nodes-base.manualTrigger",
"position": [
-1632,
1440
],
"parameters": {},
"typeVersion": 1
},
{
"id": "0e74a10e-ce5c-4616-842d-53812d1ff6e3",
"name": "设置参数",
"type": "n8n-nodes-base.set",
"position": [
-1392,
1440
],
"parameters": {
"values": {
"number": [
{
"name": "num",
"value": 10
},
{
"name": "pageStart",
"value": 1
},
{
"name": "pageLimit",
"value": 100
}
],
"string": [
{
"name": "q",
"value": "librerías Vic"
},
{
"name": "gl",
"value": "es"
},
{
"name": "hl",
"value": "es"
},
{
"name": "resultsSheetName",
"value": "Resultados"
},
{
"name": "logSheetName",
"value": "Log"
},
{
"name": "language",
"value": "spanish"
}
]
},
"options": {},
"keepOnlySet": true
},
"typeVersion": 2
},
{
"id": "1a3392af-449c-4c1d-8bed-2fee02f2bd7d",
"name": "分批处理",
"type": "n8n-nodes-base.splitInBatches",
"position": [
-864,
1440
],
"parameters": {
"options": {},
"batchSize": "=1"
},
"typeVersion": 2
},
{
"id": "ea10290d-ca7c-4437-bf82-90153c203e1b",
"name": "HTTP 请求",
"type": "n8n-nodes-base.httpRequest",
"position": [
-448,
1424
],
"parameters": {
"url": "https://google.serper.dev/places",
"method": "POST",
"options": {
"redirect": {
"redirect": {}
}
},
"sendBody": true,
"sendHeaders": true,
"authentication": "genericCredentialType",
"bodyParameters": {
"parameters": [
{
"name": "q",
"value": "={{ $('Set parameters').item.json.q }}"
},
{
"name": "gl",
"value": "={{ $('Set parameters').item.json.gl }}"
},
{
"name": "page",
"value": "={{ $json.page }}"
},
{
"name": "hl",
"value": "={{ $('Set parameters').item.json.hl }}"
},
{
"name": "num",
"value": "={{ $('Set parameters').item.json.num }}"
}
]
},
"genericAuthType": "httpHeaderAuth",
"headerParameters": {
"parameters": [
{}
]
}
},
"credentials": {
"httpHeaderAuth": {
"id": "CyP2bctO1OJzFYSQ",
"name": "Header Auth account"
}
},
"typeVersion": 4.2
},
{
"id": "f3911359-b48f-4860-9a9f-3e6199444d9f",
"name": "在表格中追加行(结果)",
"type": "n8n-nodes-base.googleSheets",
"position": [
432,
1024
],
"parameters": {
"columns": {
"value": {
"Name": "={{ $json.Name }}",
"UUID": "={{ $json.UUID }}",
"Email": "={{ $json.Email }}",
"Phone": "={{ $json.Phone }}",
"Rating": "={{ $json.Rating }}",
"Address": "={{ $json.Address }}",
"Website": "={{ $json.Website }}"
},
"schema": [
{
"id": "UUID",
"type": "string",
"display": true,
"required": false,
"displayName": "UUID",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Name",
"type": "string",
"display": true,
"required": false,
"displayName": "Name",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Address",
"type": "string",
"display": true,
"required": false,
"displayName": "Address",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Website",
"type": "string",
"display": true,
"required": false,
"displayName": "Website",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Rating",
"type": "string",
"display": true,
"required": false,
"displayName": "Rating",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Email",
"type": "string",
"display": true,
"required": false,
"displayName": "Email",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Valid Email",
"type": "string",
"display": true,
"removed": false,
"required": false,
"displayName": "Valid Email",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Phone",
"type": "string",
"display": true,
"required": false,
"displayName": "Phone",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Valid Phone",
"type": "string",
"display": true,
"removed": false,
"required": false,
"displayName": "Valid Phone",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Summary",
"type": "string",
"display": true,
"removed": false,
"required": false,
"displayName": "Summary",
"defaultMatch": false,
"canBeUsedToMatch": true
}
],
"mappingMode": "defineBelow",
"matchingColumns": [],
"attemptToConvertTypes": false,
"convertFieldsToString": false
},
"options": {},
"operation": "append",
"sheetName": {
"__rl": true,
"mode": "list",
"value": 958337799,
"cachedResultUrl": "https://docs.google.com/spreadsheets/d/1NfDypwQx-NkaFwemG-WaL7qFfa0lwSC9I4ijByex41E/edit#gid=958337799",
"cachedResultName": "Resultados"
},
"documentId": {
"__rl": true,
"mode": "list",
"value": "1NfDypwQx-NkaFwemG-WaL7qFfa0lwSC9I4ijByex41E",
"cachedResultUrl": "https://docs.google.com/spreadsheets/d/1NfDypwQx-NkaFwemG-WaL7qFfa0lwSC9I4ijByex41E/edit?usp=drivesdk",
"cachedResultName": "Google_Maps_Leads"
}
},
"credentials": {
"googleSheetsOAuth2Api": {
"id": "PCN0zg5upWW6Ryfc",
"name": "Google Sheets account"
}
},
"typeVersion": 4.7
},
{
"id": "b1f3ae25-09f9-4ec4-96eb-70cb99b437c3",
"name": "JavaScript - 页面管理",
"type": "n8n-nodes-base.code",
"position": [
-1120,
1440
],
"parameters": {
"jsCode": "const { pageStart = 1, pageLimit = 50 } = $json;\nconst out = [];\nfor (let p = pageStart; p <= pageLimit; p++) out.push({ json: { page: p } });\nreturn out;\n"
},
"typeVersion": 2
},
{
"id": "1826c04a-c862-4f4e-9242-fa307254013e",
"name": "JavaScript1 - 地点对象",
"type": "n8n-nodes-base.code",
"position": [
240,
1024
],
"parameters": {
"jsCode": "const places = $json.places || [];\nreturn places.map(p => ({\n json: {\n UUID: p.cid || '',\n Name: p.title || '',\n Address: p.address || '',\n Website: p.website || '',\n Rating: p.rating ?? '',\n Email: '',\n Phone: String(p.phoneNumber || '').replace(/^\\+/, '').replace(/\\s+/g, ''),\n \"Opening Hours\": ''\n }\n}));"
},
"typeVersion": 2
},
{
"id": "c35c5058-c07d-45cd-9c2d-e2a2c4dfd107",
"name": "便签2",
"type": "n8n-nodes-base.stickyNote",
"position": [
-1984,
848
],
"parameters": {
"width": 2672,
"height": 784,
"content": "## Google Maps 数据提取"
},
"typeVersion": 1
},
{
"id": "d62bc2a6-ad41-4bd0-bf44-fb704efb47d7",
"name": "如果结束批次",
"type": "n8n-nodes-base.if",
"position": [
-192,
1424
],
"parameters": {
"options": {},
"conditions": {
"options": {
"version": 2,
"leftValue": "",
"caseSensitive": true,
"typeValidation": "strict"
},
"combinator": "and",
"conditions": [
{
"id": "275e97cf-7809-4268-9a4d-3d6fa7886798",
"operator": {
"type": "string",
"operation": "exists",
"singleValue": true
},
"leftValue": "={{ Array.isArray($json.places) && $json.places.length > 0 }}\n\n",
"rightValue": ""
}
]
}
},
"typeVersion": 2.2
},
{
"id": "91bf3742-845b-404c-ae80-4076e5b638ef",
"name": "遍历项目",
"type": "n8n-nodes-base.splitInBatches",
"position": [
-992,
1968
],
"parameters": {
"options": {
"reset": false
}
},
"typeVersion": 3
},
{
"id": "ef5e11b3-355f-49c8-809e-37de55f706dc",
"name": "转换为 JSON 对象1",
"type": "n8n-nodes-base.code",
"position": [
-544,
1984
],
"parameters": {
"jsCode": "const items = $input.all()[0].json.choices[0].message.content;\nconst cleaned = items.replace('```json', '').replace('```', '')\nconst parsed = JSON.parse(cleaned);\n\nreturn {data: parsed}"
},
"typeVersion": 2
},
{
"id": "ede2a523-da1b-4104-a21f-46025fcd3cb1",
"name": "过滤器",
"type": "n8n-nodes-base.filter",
"position": [
-1312,
1968
],
"parameters": {
"options": {},
"conditions": {
"options": {
"version": 2,
"leftValue": "",
"caseSensitive": true,
"typeValidation": "strict"
},
"combinator": "and",
"conditions": [
{
"id": "781fc345-87ce-4f2a-84f4-059bd802fc17",
"operator": {
"type": "string",
"operation": "notEquals"
},
"leftValue": "={{ $json.Name }}",
"rightValue": "Name"
},
{
"id": "bbaeb84c-0c19-42f2-9e06-e826e69833fa",
"operator": {
"type": "string",
"operation": "notEmpty",
"singleValue": true
},
"leftValue": "={{ $json.Name }}",
"rightValue": ""
}
]
}
},
"typeVersion": 2.2
},
{
"id": "4a819d88-0e33-428e-a921-e3efd637425b",
"name": "便签3",
"type": "n8n-nodes-base.stickyNote",
"position": [
-1984,
1648
],
"parameters": {
"color": 3,
"width": 2668,
"height": 652,
"content": "**工作流:地图 → 表格 → 邮箱验证**"
},
"typeVersion": 1
},
{
"id": "f7d88b7d-4c34-454b-81b8-c2f8a6bd0767",
"name": "通过 Perplexity 获取联系方式",
"type": "n8n-nodes-base.httpRequest",
"position": [
-752,
1984
],
"parameters": {
"url": "https://api.perplexity.ai/chat/completions",
"method": "POST",
"options": {},
"jsonBody": "= {\n \"model\": \"sonar\",\n \"messages\": [\n {\n \"role\": \"system\",\n \"content\": \"You are a research assistant. Retrieve data from a company and return it. If a field does not exist, return \\\"N/A\\\" for that field. Return JSON only, without any other information. Use spanish as outputlanguege.\"\n },\n {\n \"role\": \"user\",\n \"content\": \"Get the Email and Company Background of {{ $json.Name }} in {{ $json.Address }}, reference website: {{ $json.Website }}\"\n }\n ],\n \"response_format\": {\n \"type\": \"json_schema\",\n \"json_schema\": {\n \"schema\": {\n \"$schema\": \"http://json-schema.org/draft-07/schema#\",\n \"title\": \"CompanyDetails\",\n \"type\": \"object\",\n \"properties\": {\n \"Email\": {\n \"type\": \"string\"\n },\n \"Background\": {\n \"type\": \"string\"\n }\n },\n \"required\": [\n \"Email\",\n \"Background\"\n ]\n }\n }\n }\n}",
"sendBody": true,
"specifyBody": "json",
"authentication": "genericCredentialType",
"genericAuthType": "httpBearerAuth"
},
"credentials": {
"httpBearerAuth": {
"id": "h8NxbxLPki3hdtGN",
"name": "Bearer Auth account"
},
"httpHeaderAuth": {
"id": "CyP2bctO1OJzFYSQ",
"name": "Header Auth account"
}
},
"typeVersion": 4.2
},
{
"id": "f3dd6c14-9e38-464d-8438-034124be5e6f",
"name": "在表格中更新行",
"type": "n8n-nodes-base.googleSheets",
"position": [
512,
1984
],
"parameters": {
"columns": {
"value": {
"UUID": "={{ $('Google Sheets Trigger').item.json.UUID }}",
"Email": "={{ $('Convert to JSON Object1').item.json.data.Email }}",
"Summary": "={{ $('Convert to JSON Object1').item.json.data.Background }}",
"Valid Email": "={{ $json.apiResponse.result.status }}"
},
"schema": [
{
"id": "UUID",
"type": "string",
"display": true,
"removed": false,
"required": false,
"displayName": "UUID",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Name",
"type": "string",
"display": true,
"removed": true,
"required": false,
"displayName": "Name",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Address",
"type": "string",
"display": true,
"removed": true,
"required": false,
"displayName": "Address",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Website",
"type": "string",
"display": true,
"removed": true,
"required": false,
"displayName": "Website",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Rating",
"type": "string",
"display": true,
"removed": true,
"required": false,
"displayName": "Rating",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Email",
"type": "string",
"display": true,
"removed": false,
"required": false,
"displayName": "Email",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Valid Email",
"type": "string",
"display": true,
"removed": false,
"required": false,
"displayName": "Valid Email",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Phone",
"type": "string",
"display": true,
"removed": true,
"required": false,
"displayName": "Phone",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Valid Phone",
"type": "string",
"display": true,
"removed": true,
"required": false,
"displayName": "Valid Phone",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Summary",
"type": "string",
"display": true,
"removed": false,
"required": false,
"displayName": "Summary",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "row_number",
"type": "number",
"display": true,
"removed": true,
"readOnly": true,
"required": false,
"displayName": "row_number",
"defaultMatch": false,
"canBeUsedToMatch": true
}
],
"mappingMode": "defineBelow",
"matchingColumns": [
"UUID"
],
"attemptToConvertTypes": false,
"convertFieldsToString": false
},
"options": {},
"operation": "update",
"sheetName": {
"__rl": true,
"mode": "list",
"value": 958337799,
"cachedResultUrl": "https://docs.google.com/spreadsheets/d/1NfDypwQx-NkaFwemG-WaL7qFfa0lwSC9I4ijByex41E/edit#gid=958337799",
"cachedResultName": "Resultados"
},
"documentId": {
"__rl": true,
"mode": "list",
"value": "1NfDypwQx-NkaFwemG-WaL7qFfa0lwSC9I4ijByex41E",
"cachedResultUrl": "https://docs.google.com/spreadsheets/d/1NfDypwQx-NkaFwemG-WaL7qFfa0lwSC9I4ijByex41E/edit?usp=drivesdk",
"cachedResultName": "Google_Maps_Leads"
}
},
"credentials": {
"googleSheetsOAuth2Api": {
"id": "PCN0zg5upWW6Ryfc",
"name": "Google Sheets account"
}
},
"typeVersion": 4.5
},
{
"id": "87a8e074-faed-4ec7-9650-42b610e2e11b",
"name": "如果",
"type": "n8n-nodes-base.if",
"position": [
-272,
1984
],
"parameters": {
"options": {},
"conditions": {
"options": {
"version": 2,
"leftValue": "",
"caseSensitive": true,
"typeValidation": "strict"
},
"combinator": "and",
"conditions": [
{
"id": "cd1148ba-bbcb-4f5c-ba26-0f3138760cec",
"operator": {
"type": "string",
"operation": "equals"
},
"leftValue": "={{ $json.data.Email }}",
"rightValue": "N/A"
}
]
}
},
"typeVersion": 2.2
},
{
"id": "4811c3db-b958-43eb-9700-5a134e5f8e6b",
"name": "验证邮箱",
"type": "@verificaremails/n8n-nodes-verificaremails.verificaremails",
"position": [
16,
2048
],
"parameters": {
"email": "={{ $json.data.Email }}"
},
"credentials": {
"verificaremailsApi": {
"id": "qhsM7hEZAD18qhy6",
"name": "Verificaremails account"
}
},
"typeVersion": 1
},
{
"id": "e69b897c-c75e-4254-957e-946c3038735a",
"name": "Google Sheets 触发器",
"type": "n8n-nodes-base.googleSheetsTrigger",
"position": [
-1680,
1968
],
"parameters": {
"event": "rowAdded",
"options": {},
"pollTimes": {
"item": [
{
"mode": "everyMinute"
}
]
},
"sheetName": {
"__rl": true,
"mode": "list",
"value": 958337799,
"cachedResultUrl": "https://docs.google.com/spreadsheets/d/1NfDypwQx-NkaFwemG-WaL7qFfa0lwSC9I4ijByex41E/edit#gid=958337799",
"cachedResultName": "Resultados"
},
"documentId": {
"__rl": true,
"mode": "list",
"value": "1NfDypwQx-NkaFwemG-WaL7qFfa0lwSC9I4ijByex41E",
"cachedResultUrl": "https://docs.google.com/spreadsheets/d/1NfDypwQx-NkaFwemG-WaL7qFfa0lwSC9I4ijByex41E/edit?usp=drivesdk",
"cachedResultName": "Google_Maps_Leads"
}
},
"credentials": {
"googleSheetsTriggerOAuth2Api": {
"id": "AgjjQoVh4c79DXyi",
"name": "Google Sheets Trigger account"
}
},
"typeVersion": 1
}
],
"active": false,
"pinData": {},
"settings": {
"executionOrder": "v1"
},
"versionId": "50ac0811-d697-4722-8025-d6fe982adab8",
"connections": {
"If": {
"main": [
[
{
"node": "Update row in sheet",
"type": "main",
"index": 0
}
],
[
{
"node": "VerificarEmails",
"type": "main",
"index": 0
}
]
]
},
"Filter": {
"main": [
[
{
"node": "Loop Over Items",
"type": "main",
"index": 0
}
]
]
},
"HTTP Request": {
"main": [
[
{
"node": "If End Batch",
"type": "main",
"index": 0
}
]
]
},
"If End Batch": {
"main": [
[
{
"node": "JavaScript1 - Places Objects",
"type": "main",
"index": 0
}
],
[]
]
},
"Set parameters": {
"main": [
[
{
"node": "JavaScript - Page Management",
"type": "main",
"index": 0
}
]
]
},
"Loop Over Items": {
"main": [
[],
[
{
"node": "Get Contact Details via Perplexity",
"type": "main",
"index": 0
}
]
]
},
"VerificarEmails": {
"main": [
[
{
"node": "Update row in sheet",
"type": "main",
"index": 0
}
]
]
},
"Split In Batches": {
"main": [
[
{
"node": "HTTP Request",
"type": "main",
"index": 0
}
],
[]
]
},
"Update row in sheet": {
"main": [
[
{
"node": "Loop Over Items",
"type": "main",
"index": 0
}
]
]
},
"Google Sheets Trigger": {
"main": [
[
{
"node": "Filter",
"type": "main",
"index": 0
}
]
]
},
"Convert to JSON Object1": {
"main": [
[
{
"node": "If",
"type": "main",
"index": 0
}
]
]
},
"JavaScript - Page Management": {
"main": [
[
{
"node": "Split In Batches",
"type": "main",
"index": 0
}
]
]
},
"JavaScript1 - Places Objects": {
"main": [
[
{
"node": "Append row in sheet (Resultados)",
"type": "main",
"index": 0
}
]
]
},
"Append row in sheet (Resultados)": {
"main": [
[
{
"node": "Split In Batches",
"type": "main",
"index": 0
}
]
]
},
"Get Contact Details via Perplexity": {
"main": [
[
{
"node": "Convert to JSON Object1",
"type": "main",
"index": 0
}
]
]
},
"When clicking ‘Execute workflow’": {
"main": [
[
{
"node": "Set parameters",
"type": "main",
"index": 0
}
]
]
}
}
}常见问题
如何使用这个工作流?
复制上方的 JSON 配置代码,在您的 n8n 实例中创建新工作流并选择「从 JSON 导入」,粘贴配置后根据需要修改凭证设置即可。
这个工作流适合什么场景?
高级 - 内容创作, 多模态 AI
需要付费吗?
本工作流完全免费,您可以直接导入使用。但请注意,工作流中使用的第三方服务(如 OpenAI API)可能需要您自行付费。
相关工作流推荐
Printify自动化 - 更新标题和描述 - AlexK1919
使用GPT-4o-mini为Printify自动生成SEO产品标题和描述
If
Set
Code
+10
26 节点Amit Mehta
内容创作
内容生成器 v3
AI驱动博客自动化:使用GPT-4生成并发布SEO文章至WordPress和Twitter
If
Set
Code
+25
144 节点Jay Emp0
内容创作
WordPress博客自动化专业版(深度研究)v2.1市场
使用GPT-4o、Perplexity AI和多语言支持自动化SEO优化的博客创建
If
Set
Xml
+27
125 节点Daniel Ng
内容创作
内容聚合
使用Gemini AI从网站文章自动化社交媒体帖子发布到LinkedIn和X/Twitter
If
Set
Xml
+16
34 节点Vadim
内容创作
LinkedIn和X病毒内容自动引擎
使用AI生成和发布自动创建LinkedIn和X的病毒内容
If
Set
Wait
+26
156 节点Diptamoy Barman
内容创作
基于 YouTube 视频的自主博客发布
使用 ChatGPT、Sheets、Apify、Pexels 和 WordPress 从 YouTube 视频自主发布博客
If
Set
Code
+18
80 节点Oriol Seguí
内容创作