我的工作流程 2
高级
这是一个Lead Generation, Multimodal AI领域的自动化工作流,包含 21 个节点。主要使用 If, Set, Sort, Gmail, Airtable 等节点。 从Google Maps获取餐厅潜在客户,通过Apify、Airtable和AI通讯
前置要求
- •Google 账号和 Gmail API 凭证
- •Airtable API Key
- •OpenAI API Key
使用的节点 (21)
工作流预览
可视化展示节点连接关系,支持缩放和平移
导出工作流
复制以下 JSON 配置到 n8n 导入,即可使用此工作流
{
"id": "SmZMmSHj4zgfFxLd",
"meta": {
"instanceId": "87616dfce72ffd690a51f4d408ac3b27a946f12a1119e0e281f5ed271497219e",
"templateCredsSetupCompleted": true
},
"name": "我的工作流程 2",
"tags": [],
"nodes": [
{
"id": "47d0ec85-60df-40f4-bb4d-2c8409a4475e",
"name": "运行执行器",
"type": "@apify/n8n-nodes-apify.apify",
"position": [
-940,
580
],
"parameters": {
"actorId": {
"__rl": true,
"mode": "list",
"value": "nwua9Gu5YrADL7ZDj",
"cachedResultUrl": "https://console.apify.com/actors/nwua9Gu5YrADL7ZDj/input",
"cachedResultName": "Google Maps Scraper (compass/crawler-google-places)"
},
"customBody": "={\n \"includeWebResults\": false,\n \"language\": \"en\",\n \"locationQuery\": \"{{ $json.Location }}\",\n \"maxCrawledPlacesPerSearch\":{{ $json['Number of Items to be Scraped'] }} ,\n \"maxImages\": 0,\n \"maximumLeadsEnrichmentRecords\": 0,\n \"scrapeContacts\": true,\n \"scrapeDirectories\": true,\n \"scrapeImageAuthors\": false,\n \"scrapePlaceDetailPage\": true,\n \"scrapeReviewsPersonalData\": true,\n \"scrapeTableReservationProvider\": true,\n \"searchStringsArray\": [\n \"{{ $json['What to Scrape'] }}\"\n ],\n \"skipClosedPlaces\": true\n}",
"actorSource": "store"
},
"credentials": {
"apifyApi": {
"id": "w0tcRKev5ZCis4ur",
"name": "Apify account"
}
},
"typeVersion": 1
},
{
"id": "49cc3b8a-c690-41a7-8d7c-f43fdaae7a5b",
"name": "获取数据集项",
"type": "@apify/n8n-nodes-apify.apify",
"position": [
-460,
500
],
"parameters": {
"resource": "Datasets",
"datasetId": "={{ $json.defaultDatasetId }}"
},
"credentials": {
"apifyApi": {
"id": "w0tcRKev5ZCis4ur",
"name": "Apify account"
}
},
"typeVersion": 1
},
{
"id": "88d53e9c-9bb4-4fbb-a5ff-f4c01de9c558",
"name": "如果",
"type": "n8n-nodes-base.if",
"position": [
-740,
580
],
"parameters": {
"options": {},
"conditions": {
"options": {
"version": 2,
"leftValue": "",
"caseSensitive": true,
"typeValidation": "strict"
},
"combinator": "and",
"conditions": [
{
"id": "7147dfa1-335a-46a4-b257-3cebbeb40956",
"operator": {
"name": "filter.operator.equals",
"type": "string",
"operation": "equals"
},
"leftValue": "={{ $json.status }}",
"rightValue": "=SUCCEEDED"
}
]
}
},
"typeVersion": 2.2
},
{
"id": "1b2c0bec-5e07-4912-b9c6-340bc5dbe989",
"name": "无操作,不执行任何操作",
"type": "n8n-nodes-base.noOp",
"position": [
-360,
760
],
"parameters": {},
"typeVersion": 1
},
{
"id": "1586395a-9c66-4a8f-a51b-b019e3f771f3",
"name": "聚合",
"type": "n8n-nodes-base.aggregate",
"position": [
480,
380
],
"parameters": {
"options": {},
"fieldsToAggregate": {
"fieldToAggregate": [
{
"fieldToAggregate": "Restaurant_Data"
}
]
}
},
"typeVersion": 1
},
{
"id": "ad264dc3-eb93-42a3-9c0b-7275257a32fd",
"name": "OpenAI 聊天模型",
"type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
"position": [
640,
640
],
"parameters": {
"model": {
"__rl": true,
"mode": "list",
"value": "gpt-4.1-mini"
},
"options": {}
},
"credentials": {
"openAiApi": {
"id": "qlhg6EzexBZ9bwXO",
"name": "OpenAi account"
}
},
"typeVersion": 1.2
},
{
"id": "47e9b471-1cd5-4ead-ac1a-51ffa13a2b51",
"name": "发送消息",
"type": "n8n-nodes-base.gmail",
"position": [
1000,
380
],
"webhookId": "3a862e24-34cc-42af-9176-f45a029b0e4d",
"parameters": {
"sendTo": "prath002@gmail.com",
"message": "={{ $json.output.Body }}",
"options": {
"appendAttribution": false
},
"subject": "={{ $json.output.Subject }}"
},
"credentials": {
"gmailOAuth2": {
"id": "qRfscNFGDLVMQs6g",
"name": "Gmail account"
}
},
"typeVersion": 2.1
},
{
"id": "d3c55f8b-ff7d-4d16-a833-fb80f67542b9",
"name": "表单提交时",
"type": "n8n-nodes-base.formTrigger",
"position": [
-1160,
580
],
"webhookId": "2b948306-5746-4771-b720-537394b21c59",
"parameters": {
"options": {
"buttonLabel": "Submit"
},
"formTitle": "Select Location",
"formFields": {
"values": [
{
"fieldType": "dropdown",
"fieldLabel": "Location",
"fieldOptions": {
"values": [
{
"option": "Bangkok, Thailand"
}
]
},
"requiredField": true
},
{
"fieldLabel": "What to Scrape",
"placeholder": "Restaurants etc..",
"requiredField": true
},
{
"fieldType": "number",
"fieldLabel": "Number of Items to be Scraped",
"placeholder": "50",
"requiredField": true
}
]
}
},
"typeVersion": 2.2
},
{
"id": "e5be4ac3-6e12-4059-a7f5-27dd267c9766",
"name": "提取核心信息",
"type": "n8n-nodes-base.set",
"position": [
-240,
500
],
"parameters": {
"options": {},
"assignments": {
"assignments": [
{
"id": "cdcdbe98-2ad6-4c79-8a1e-01ad5f2ace89",
"name": "title",
"type": "string",
"value": "={{ $json.title }}"
},
{
"id": "a6361af2-4f5c-4407-bf32-b2c0e457466e",
"name": "categoryName",
"type": "string",
"value": "={{ $json.categoryName }}"
},
{
"id": "521a1095-18d1-47cc-b113-7ecee83c26ab",
"name": "Average Price",
"type": "string",
"value": "={{ $json.price }}"
},
{
"id": "d047d620-4102-467a-9eab-fb097c8f1cc3",
"name": "rating",
"type": "number",
"value": "={{ $json.totalScore }}"
},
{
"id": "4e30e3a2-1564-457c-8e84-b55d6f0b11e4",
"name": "reviewsCount",
"type": "number",
"value": "={{ $json.reviewsCount }}"
},
{
"id": "d0aa5224-af7a-4a50-aad1-ec3bde6c6941",
"name": "address",
"type": "string",
"value": "={{ $json.city }}{{ $json.address }}, {{ $json.street }}, {{ $json.postalCode }}"
},
{
"id": "d86d5474-05a4-40cb-8a16-b5c14636f5ae",
"name": "phone",
"type": "string",
"value": "={{ $json.phone || $json.phones[0]}}"
},
{
"id": "3cfa770c-626e-4920-a8bf-a1a41b5c7308",
"name": "url",
"type": "string",
"value": "={{ $json.url }}"
}
]
}
},
"typeVersion": 3.4
},
{
"id": "99952b60-c7ea-4498-8199-850f2a810c7f",
"name": "按评论数和评分排序",
"type": "n8n-nodes-base.sort",
"position": [
-80,
500
],
"parameters": {
"options": {},
"sortFieldsUi": {
"sortField": [
{
"order": "descending",
"fieldName": "reviewsCount"
},
{
"order": "descending",
"fieldName": "rating"
}
]
}
},
"typeVersion": 1
},
{
"id": "e2bfc98e-ef3b-4a60-8bfd-9875f1ca6435",
"name": "分组核心信息",
"type": "n8n-nodes-base.set",
"position": [
320,
380
],
"parameters": {
"options": {},
"assignments": {
"assignments": [
{
"id": "e742dad3-8b1c-4001-bb2f-98c8a34203df",
"name": "Restaurant_Data",
"type": "string",
"value": "=Name: {{ $json.title }}\nCategory: {{ $json.categoryName || '' }}\nPrice Range: {{ $json['Average Price'] || '' }}\nRating: {{ $json.rating }}\nTotal Reviews: {{ $json.reviewsCount }}\nAddress: {{ $json.address.toString() }}\nPhone: {{ $json.phone.toString() }}\nGoogle Map Location: {{ $json.url.toString() }}"
}
]
}
},
"typeVersion": 3.4
},
{
"id": "15d812b2-04ab-4cde-8b31-ac1aabdfa37b",
"name": "评论数 > 500",
"type": "n8n-nodes-base.if",
"position": [
160,
500
],
"parameters": {
"options": {},
"conditions": {
"options": {
"version": 2,
"leftValue": "",
"caseSensitive": true,
"typeValidation": "strict"
},
"combinator": "and",
"conditions": [
{
"id": "4ff04126-679d-4a07-b15a-9dade66e8766",
"operator": {
"type": "number",
"operation": "gt"
},
"leftValue": "={{ $json.reviewsCount }}",
"rightValue": 500
}
]
}
},
"typeVersion": 2.2
},
{
"id": "9808152c-cb40-4040-a030-355cd53fc025",
"name": "AI Agent1",
"type": "@n8n/n8n-nodes-langchain.agent",
"position": [
660,
380
],
"parameters": {
"options": {},
"hasOutputParser": true
},
"typeVersion": 2
},
{
"id": "a1578675-1189-4d47-9810-7b75ca9ac690",
"name": "结构化输出解析器 1",
"type": "@n8n/n8n-nodes-langchain.outputParserStructured",
"position": [
880,
680
],
"parameters": {},
"typeVersion": 1.2
},
{
"id": "70346840-9e1c-4dc2-9ac7-0758a639ba0f",
"name": "便签",
"type": "n8n-nodes-base.stickyNote",
"position": [
-1180,
360
],
"parameters": {
"width": 540,
"content": "## 运行 APIfy Google Map 执行器"
},
"typeVersion": 1
},
{
"id": "f5506c41-4918-4945-96bc-e7272abd2809",
"name": "潜在客户生成器",
"type": "n8n-nodes-base.airtable",
"position": [
160,
220
],
"parameters": {
"base": {
"__rl": true,
"mode": "list",
"value": "appgqYxjdpsWWuk3p",
"cachedResultUrl": "https://airtable.com/appgqYxjdpsWWuk3p",
"cachedResultName": "n8n_Airtable"
},
"table": {
"__rl": true,
"mode": "list",
"value": "tblyPsVMcVtWtBXNp",
"cachedResultUrl": "https://airtable.com/appgqYxjdpsWWuk3p/tblyPsVMcVtWtBXNp",
"cachedResultName": "Google Map Leads - Restaurants"
},
"columns": {
"value": {
"Phone": "={{ $json.phone }}",
"Title": "={{ $json.title }}",
"Rating": "={{ $json.rating }}",
"Address": "={{ $json.address }}",
"Category": "={{ $json.categoryName }}",
"Location": "={{ $json.url }}",
"Review Count": "={{ $json.reviewsCount }}",
"Average_Price_Range": "={{ $json['Average Price'] }}"
},
"schema": [
{
"id": "id",
"type": "string",
"display": true,
"readOnly": true,
"required": false,
"displayName": "id",
"defaultMatch": true
},
{
"id": "Title",
"type": "string",
"display": true,
"removed": false,
"readOnly": false,
"required": false,
"displayName": "Title",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Category",
"type": "string",
"display": true,
"removed": false,
"readOnly": false,
"required": false,
"displayName": "Category",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Average_Price_Range",
"type": "string",
"display": true,
"removed": false,
"readOnly": false,
"required": false,
"displayName": "Average_Price_Range",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Rating",
"type": "number",
"display": true,
"removed": false,
"readOnly": false,
"required": false,
"displayName": "Rating",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Review Count",
"type": "number",
"display": true,
"removed": false,
"readOnly": false,
"required": false,
"displayName": "Review Count",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Address",
"type": "string",
"display": true,
"removed": false,
"readOnly": false,
"required": false,
"displayName": "Address",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Phone",
"type": "string",
"display": true,
"removed": false,
"readOnly": false,
"required": false,
"displayName": "Phone",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Location",
"type": "string",
"display": true,
"removed": false,
"readOnly": false,
"required": false,
"displayName": "Location",
"defaultMatch": false,
"canBeUsedToMatch": true
}
],
"mappingMode": "defineBelow",
"matchingColumns": [],
"attemptToConvertTypes": false,
"convertFieldsToString": false
},
"options": {},
"operation": "create"
},
"credentials": {
"airtableTokenApi": {
"id": "XehoZRpSFKHW9J4N",
"name": "Airtable Personal Access Token account"
}
},
"typeVersion": 2.1
},
{
"id": "1cacca8f-d583-407d-983a-a3e2c39d8d54",
"name": "便签1",
"type": "n8n-nodes-base.stickyNote",
"position": [
-540,
380
],
"parameters": {
"color": 3,
"width": 220,
"height": 280,
"content": "## 从数据集提取数据"
},
"typeVersion": 1
},
{
"id": "7737a847-9106-4f03-a89a-99fd481660dc",
"name": "便签2",
"type": "n8n-nodes-base.stickyNote",
"position": [
-260,
340
],
"parameters": {
"color": 6,
"width": 340,
"height": 320,
"content": "## 仅提取核心信息"
},
"typeVersion": 1
},
{
"id": "f393a9b0-b0e8-4903-afd8-23d91f375c69",
"name": "便签3",
"type": "n8n-nodes-base.stickyNote",
"position": [
140,
140
],
"parameters": {
"width": 360,
"height": 240,
"content": "## 在 Airtable 中创建条目"
},
"typeVersion": 1
},
{
"id": "1d509ea6-5ffd-4e3e-a013-44db228adb33",
"name": "便签4",
"type": "n8n-nodes-base.stickyNote",
"position": [
160,
660
],
"parameters": {
"color": 7,
"width": 440,
"content": "## 为新闻简报进行聚合"
},
"typeVersion": 1
},
{
"id": "715ebbb3-26c6-4a8c-966d-d41efcf210b2",
"name": "便签5",
"type": "n8n-nodes-base.stickyNote",
"position": [
660,
200
],
"parameters": {
"color": 4,
"width": 440,
"content": "## 准备并发送邮件"
},
"typeVersion": 1
}
],
"active": false,
"pinData": {},
"settings": {
"executionOrder": "v1"
},
"versionId": "0516cb5a-b582-4389-855b-78f33d6b3496",
"connections": {
"If": {
"main": [
[
{
"node": "Get dataset items",
"type": "main",
"index": 0
}
],
[
{
"node": "No Operation, do nothing",
"type": "main",
"index": 0
}
]
]
},
"AI Agent1": {
"main": [
[
{
"node": "Send a message",
"type": "main",
"index": 0
}
]
]
},
"Aggregate": {
"main": [
[
{
"node": "AI Agent1",
"type": "main",
"index": 0
}
]
]
},
"Run an Actor": {
"main": [
[
{
"node": "If",
"type": "main",
"index": 0
}
]
]
},
"Reviews > 500": {
"main": [
[
{
"node": "Group Essentials",
"type": "main",
"index": 0
}
],
[
{
"node": "No Operation, do nothing",
"type": "main",
"index": 0
}
]
]
},
"Group Essentials": {
"main": [
[
{
"node": "Aggregate",
"type": "main",
"index": 0
}
]
]
},
"Get dataset items": {
"main": [
[
{
"node": "Extract Essentials",
"type": "main",
"index": 0
}
]
]
},
"OpenAI Chat Model": {
"ai_languageModel": [
[
{
"node": "AI Agent1",
"type": "ai_languageModel",
"index": 0
}
]
]
},
"Extract Essentials": {
"main": [
[
{
"node": "Sort by Review Count and Rating",
"type": "main",
"index": 0
}
]
]
},
"On form submission": {
"main": [
[
{
"node": "Run an Actor",
"type": "main",
"index": 0
}
]
]
},
"Structured Output Parser1": {
"ai_outputParser": [
[
{
"node": "AI Agent1",
"type": "ai_outputParser",
"index": 0
}
]
]
},
"Sort by Review Count and Rating": {
"main": [
[
{
"node": "Reviews > 500",
"type": "main",
"index": 0
},
{
"node": "Lead Creator",
"type": "main",
"index": 0
}
]
]
}
}
}常见问题
如何使用这个工作流?
复制上方的 JSON 配置代码,在您的 n8n 实例中创建新工作流并选择「从 JSON 导入」,粘贴配置后根据需要修改凭证设置即可。
这个工作流适合什么场景?
高级 - 潜在客户开发, 多模态 AI
需要付费吗?
本工作流完全免费,您可以直接导入使用。但请注意,工作流中使用的第三方服务(如 OpenAI API)可能需要您自行付费。
相关工作流推荐
赞助交易邮件自动化
使用Gmail和GPT-4自动化赞助交易邮件回复
If
Set
Gmail
+6
16 节点Pramod Kumar Rathoure
AI 摘要总结
完整的 B2B 销售流程:Apollo 潜在客户生成、Mailgun 外展和 AI 回复管理
完整的 B2B 销售流程:Apollo 潜在客户生成、Mailgun 外展和 AI 回复管理
If
Set
Code
+26
116 节点Paul
内容创作
在可视化参考库中探索n8n节点
在可视化参考库中探索n8n节点
If
Ftp
Set
+93
113 节点I versus AI
其他
GPT-4驱动的冷邮件工作流,包含完全定制的3封邮件跟进
使用GPT-4、Mailgun和Supabase自动化个性化冷邮件序列
If
Set
Code
+22
100 节点Paul
客户培育
使用Gmail、GPT-4和向量知识库的自动化客户支持系统
使用Gmail、GPT-4和向量知识库的自动化客户支持系统
If
Set
Code
+15
32 节点Khair Ahammed
AI RAG 检索增强
AI邮件分诊与GPT-4警报系统及Telegram通知
AI邮件分诊与GPT-4警报系统及Telegram通知
If
Set
Gmail
+22
104 节点Peter Joslyn
客户支持
工作流信息
难度等级
高级
节点数量21
分类2
节点类型13
作者
Pramod Rathoure
@prathoureI design and build custom n8n workflows that cut out repetitive work, connect your favorite tools, and keep things running smoothly—think less busywork, smarter integrations, and faster, error-free results. My goal is to free up your time so you and your team can focus on what really matters. Let’s chat—I’d love to help you turn messy processes into smooth, automated workflows.
外部链接
在 n8n.io 查看 →
分享此工作流