自动化潜在客户呼叫:VAPI、Google Sheets记录与日历预约
中级
这是一个Content Creation, Multimodal AI领域的自动化工作流,包含 13 个节点。主要使用 Set, Code, Webhook, HttpRequest, GoogleSheets 等节点。 自动化潜在客户呼叫:VAPI、Google Sheets记录与日历预约
前置要求
- •HTTP Webhook 端点(n8n 会自动生成)
- •可能需要目标 API 的认证凭证
- •Google Sheets API 凭证
使用的节点 (13)
工作流预览
可视化展示节点连接关系,支持缩放和平移
导出工作流
复制以下 JSON 配置到 n8n 导入,即可使用此工作流
{
"meta": {
"instanceId": "0a25db4fd0692af64b58f35e01611f2ef0b5bb9d6654c57ef3741021e7d8cc11",
"templateId": "5890",
"templateCredsSetupCompleted": true
},
"nodes": [
{
"id": "61f3ed14-9be9-42bb-ac7b-90072005ebc1",
"name": "新潜在客户触发器(Excel)",
"type": "n8n-nodes-base.googleSheetsTrigger",
"position": [
432,
560
],
"parameters": {
"event": "rowAdded",
"options": {},
"pollTimes": {
"item": [
{
"mode": "everyMinute"
}
]
},
"sheetName": {
"__rl": true,
"mode": "list",
"value": 1760068917,
"cachedResultUrl": "https://docs.google.com/spreadsheets/d/1mkHJIhSFXdh1n65GKPwzEzFw0QasunyYm9BDglnXeiI/edit#gid=1760068917",
"cachedResultName": "call_list"
},
"documentId": {
"__rl": true,
"mode": "list",
"value": "1mkHJIhSFXdh1n65GKPwzEzFw0QasunyYm9BDglnXeiI",
"cachedResultUrl": "https://docs.google.com/spreadsheets/d/1mkHJIhSFXdh1n65GKPwzEzFw0QasunyYm9BDglnXeiI/edit?usp=drivesdk",
"cachedResultName": "Vapi_real-estate"
}
},
"credentials": {
"googleSheetsTriggerOAuth2Api": {
"id": "ciFJ21F7Wq3VZJYU",
"name": "Google Sheets Trigger account"
}
},
"typeVersion": 1
},
{
"id": "de15cc25-830d-4efe-9265-685eef529094",
"name": "准备潜在客户数据",
"type": "n8n-nodes-base.set",
"position": [
656,
560
],
"parameters": {
"options": {},
"assignments": {
"assignments": [
{
"id": "a10873fa-0c01-46ed-a364-d31200e44e76",
"name": "Phone",
"type": "string",
"value": "=+{{ $json.Phone }}"
}
]
}
},
"typeVersion": 3.4
},
{
"id": "22384d76-3c0d-4d3b-9e85-4e9d6a005e7f",
"name": "循环处理潜在客户",
"type": "n8n-nodes-base.splitInBatches",
"position": [
880,
560
],
"parameters": {
"options": {}
},
"typeVersion": 3
},
{
"id": "eea1ca56-260e-4f81-980a-6f2dd46e0667",
"name": "开始营销呼叫(VAPI)",
"type": "n8n-nodes-base.httpRequest",
"position": [
1104,
560
],
"parameters": {
"url": "https://api.vapi.ai/call",
"method": "POST",
"options": {},
"jsonBody": "={\n \"assistantId\": \"add_id_here\",\n \"phoneNumberId\": \"add_id_here\",\n \"customers\": [\n {\n \"number\":\"{{ $json.Phone }}\"\n }\n ]\n}",
"sendBody": true,
"specifyBody": "json",
"authentication": "predefinedCredentialType",
"nodeCredentialType": "httpBearerAuth"
},
"credentials": {
"httpBearerAuth": {
"id": "nCXOEqnQiFvQMGPr",
"name": "Bearer Auth account"
}
},
"typeVersion": 4.2
},
{
"id": "9addff6d-2a29-4f02-94a8-d76406987569",
"name": "VAPI 呼叫响应 Webhook",
"type": "n8n-nodes-base.webhook",
"position": [
432,
784
],
"webhookId": "a34ac7ac-7ea4-4942-8dbf-f9ce3f0986e4",
"parameters": {
"path": "a34ac7ac-7ea4-4942-8dbf-f9ce3f0986e4",
"options": {},
"httpMethod": "POST",
"responseMode": "responseNode"
},
"typeVersion": 2
},
{
"id": "9797586c-4313-4ce1-b58b-ec3e31cb705e",
"name": "存储用户响应(表格)",
"type": "n8n-nodes-base.googleSheets",
"position": [
656,
784
],
"parameters": {
"columns": {
"value": {
"next_step": "={{ $json.body.message.toolCalls[0].function.arguments.next_step }}",
"call_notes": "={{ $json.body.message.toolCalls[0].function.arguments.call_notes }}",
"website_url": "={{ $json.body.message.toolCalls[0].function.arguments.website_url }}",
"call_outcome": "={{ $json.body.message.toolCalls[0].function.arguments.call_outcome }}",
"company_name": "={{ $json.body.message.toolCalls[0].function.arguments.company_name }}",
"phone_number": "={{ $json.body.message.toolCalls[0].function.arguments.phone_number }}",
"email_address": "={{ $json.body.message.toolCalls[0].function.arguments.email_address }}",
"prospect_name": "={{ $json.body.message.toolCalls[0].function.arguments.prospect_name }}",
"prospect_role": "={{ $json.body.message.toolCalls[0].function.arguments.prospect_role }}",
"follow_up_date": "={{ $json.body.message.toolCalls[0].function.arguments.follow_up_date }}",
"interest_level": "={{ $json.body.message.toolCalls[0].function.arguments.interest_level }}",
"website_strength": "={{ $json.body.message.toolCalls[0].function.arguments.website_strength }}",
"biggest_challenge": "={{ $json.body.message.toolCalls[0].function.arguments.biggest_challenge }}",
"objections_raised": "={{ $json.body.message.toolCalls[0].function.arguments.objections_raised }}",
"opt_out_requested": "={{ $json.body.message.toolCalls[0].function.arguments.opt_out_requested }}",
"appointment_datetime": "={{ $json.body.message.toolCalls[0].function.arguments.appointment_datetime }}",
"current_marketing_methods": "={{ $json.body.message.toolCalls[0].function.arguments.current_marketing_methods }}",
"previous_digital_marketing": "={{ $json.body.message.toolCalls[0].function.arguments.previous_digital_marketing }}"
},
"schema": [
{
"id": "prospect_name",
"type": "string",
"display": true,
"removed": false,
"required": false,
"displayName": "prospect_name",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "prospect_role",
"type": "string",
"display": true,
"removed": false,
"required": false,
"displayName": "prospect_role",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "company_name",
"type": "string",
"display": true,
"removed": false,
"required": false,
"displayName": "company_name",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "website_url",
"type": "string",
"display": true,
"removed": false,
"required": false,
"displayName": "website_url",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "website_strength",
"type": "string",
"display": true,
"removed": false,
"required": false,
"displayName": "website_strength",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "phone_number",
"type": "string",
"display": true,
"removed": false,
"required": false,
"displayName": "phone_number",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "email_address",
"type": "string",
"display": true,
"removed": false,
"required": false,
"displayName": "email_address",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "current_marketing_methods",
"type": "string",
"display": true,
"removed": false,
"required": false,
"displayName": "current_marketing_methods",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "biggest_challenge",
"type": "string",
"display": true,
"removed": false,
"required": false,
"displayName": "biggest_challenge",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "previous_digital_marketing",
"type": "string",
"display": true,
"removed": false,
"required": false,
"displayName": "previous_digital_marketing",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "objections_raised",
"type": "string",
"display": true,
"removed": false,
"required": false,
"displayName": "objections_raised",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "interest_level",
"type": "string",
"display": true,
"removed": false,
"required": false,
"displayName": "interest_level",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "next_step",
"type": "string",
"display": true,
"removed": false,
"required": false,
"displayName": "next_step",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "appointment_datetime",
"type": "string",
"display": true,
"removed": false,
"required": false,
"displayName": "appointment_datetime",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "call_outcome",
"type": "string",
"display": true,
"removed": false,
"required": false,
"displayName": "call_outcome",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "call_notes",
"type": "string",
"display": true,
"removed": false,
"required": false,
"displayName": "call_notes",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "follow_up_date",
"type": "string",
"display": true,
"removed": false,
"required": false,
"displayName": "follow_up_date",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "opt_out_requested",
"type": "string",
"display": true,
"removed": false,
"required": false,
"displayName": "opt_out_requested",
"defaultMatch": false,
"canBeUsedToMatch": true
}
],
"mappingMode": "defineBelow",
"matchingColumns": [
"prospect_name"
],
"attemptToConvertTypes": false,
"convertFieldsToString": false
},
"options": {},
"operation": "appendOrUpdate",
"sheetName": {
"__rl": true,
"mode": "list",
"value": "gid=0",
"cachedResultUrl": "https://docs.google.com/spreadsheets/d/1mkHJIhSFXdh1n65GKPwzEzFw0QasunyYm9BDglnXeiI/edit#gid=0",
"cachedResultName": "Sheet1"
},
"documentId": {
"__rl": true,
"mode": "list",
"value": "1mkHJIhSFXdh1n65GKPwzEzFw0QasunyYm9BDglnXeiI",
"cachedResultUrl": "https://docs.google.com/spreadsheets/d/1mkHJIhSFXdh1n65GKPwzEzFw0QasunyYm9BDglnXeiI/edit?usp=drivesdk",
"cachedResultName": "Vapi_real-estate"
}
},
"credentials": {
"googleSheetsOAuth2Api": {
"id": "cjPjcwa3RdiMAu79",
"name": "Google Sheets account"
}
},
"typeVersion": 4.5
},
{
"id": "b5dbaaf8-c8e2-4dda-a3a0-862cf25bd659",
"name": "提取预订/订单信息",
"type": "n8n-nodes-base.code",
"position": [
880,
784
],
"parameters": {
"jsCode": "function formatIST(date) {\n const options = {\n timeZone: 'Asia/Kolkata',\n year: 'numeric',\n month: '2-digit',\n day: '2-digit',\n hour: '2-digit',\n minute: '2-digit',\n second: '2-digit',\n hour12: false\n };\n const parts = new Intl.DateTimeFormat('en-GB', options).formatToParts(date);\n const lookup = {};\n parts.forEach(p => lookup[p.type] = p.value);\n return `${lookup.year}-${lookup.month}-${lookup.day} ${lookup.hour}:${lookup.minute}:${lookup.second} IST`;\n}\n\nfor (const item of items) {\n let dateStr = item.json.date_input?.toLowerCase?.() || 'today';\n let timeStr = item.json.time_input || '17:00'; // default to 5 PM\n\n // Step 1: base date\n let baseDate = new Date();\n if (dateStr === 'tomorrow') {\n baseDate.setDate(baseDate.getDate() + 1);\n } else if (dateStr !== 'today') {\n baseDate = new Date(dateStr);\n }\n\n // Step 2: parse time\n const [timePart, ampm] = timeStr.trim().split(/ (AM|PM)/i);\n let [hours, minutes] = timePart.split(':').map(Number);\n if (ampm?.toLowerCase() === 'pm' && hours < 12) hours += 12;\n if (ampm?.toLowerCase() === 'am' && hours === 12) hours = 0;\n\n baseDate.setHours(hours, minutes || 0, 0, 0);\n\n // Step 3: set IST formatted times\n const startIST = formatIST(baseDate);\n const endIST = formatIST(new Date(baseDate.getTime() + 60 * 60 * 1000)); // +1 hour\n\n item.json.appointment_datetime_parsed = startIST;\n item.json.appointment_end_datetime = endIST;\n}\n\nreturn items;\n"
},
"typeVersion": 2
},
{
"id": "74ca51eb-c7c3-4965-839e-db0e80f8dc02",
"name": "安排交付/餐桌预订",
"type": "n8n-nodes-base.googleCalendar",
"position": [
1104,
784
],
"parameters": {
"end": "={{ $json.appointment_end_datetime }}",
"start": "={{ $json.appointment_datetime_parsed }}",
"calendar": {
"__rl": true,
"mode": "id",
"value": "abc@gmail.com"
},
"additionalFields": {}
},
"credentials": {
"googleCalendarOAuth2Api": {
"id": "q6HWhk6UMiK5ZfZQ",
"name": "Google Calendar account"
}
},
"typeVersion": 1.3
},
{
"id": "d34f8054-9d1c-48fe-a6df-35e12a0d09a1",
"name": "发送响应到 VAPI",
"type": "n8n-nodes-base.respondToWebhook",
"position": [
1328,
784
],
"parameters": {
"options": {}
},
"typeVersion": 1.2
},
{
"id": "d1162aa6-e63c-4088-a0ad-b9d224faf43a",
"name": "便签",
"type": "n8n-nodes-base.stickyNote",
"position": [
320,
336
],
"parameters": {
"color": 4,
"width": 352,
"height": 176,
"content": "## 步骤 1 · 接收与准备"
},
"typeVersion": 1
},
{
"id": "0cc00ecf-1736-45a2-9616-7d6718084462",
"name": "便签1",
"type": "n8n-nodes-base.stickyNote",
"position": [
752,
352
],
"parameters": {
"color": 5,
"width": 384,
"content": "## 步骤 2 · 拨号(VAPI)"
},
"typeVersion": 1
},
{
"id": "0567d457-4271-4e1b-a6fd-1346c89e873a",
"name": "便签2",
"type": "n8n-nodes-base.stickyNote",
"position": [
1168,
320
],
"parameters": {
"color": 6,
"width": 336,
"height": 208,
"content": "## 步骤 3 · 捕获结果"
},
"typeVersion": 1
},
{
"id": "36c2d03c-bdd3-4758-8214-08585e028697",
"name": "便签3",
"type": "n8n-nodes-base.stickyNote",
"position": [
1504,
544
],
"parameters": {
"color": 7,
"height": 272,
"content": "## 步骤 4 · 预订与确认"
},
"typeVersion": 1
}
],
"pinData": {},
"connections": {
"Prepare Lead Data": {
"main": [
[
{
"node": "Loop Through Leads",
"type": "main",
"index": 0
}
]
]
},
"Loop Through Leads": {
"main": [
[
{
"node": "Start Marketing Call (VAPI)",
"type": "main",
"index": 0
}
],
[
{
"node": "Loop Through Leads",
"type": "main",
"index": 0
}
]
]
},
"New Lead Trigger (Excel)": {
"main": [
[
{
"node": "Prepare Lead Data",
"type": "main",
"index": 0
}
]
]
},
"Extract Booking/Order Info": {
"main": [
[
{
"node": "Schedule Delivery/Table Booking",
"type": "main",
"index": 0
}
]
]
},
"VAPI Call Response Webhook": {
"main": [
[
{
"node": "Store User Response (Sheet)",
"type": "main",
"index": 0
}
]
]
},
"Store User Response (Sheet)": {
"main": [
[
{
"node": "Extract Booking/Order Info",
"type": "main",
"index": 0
}
]
]
},
"Schedule Delivery/Table Booking": {
"main": [
[
{
"node": "Send Response to VAPI",
"type": "main",
"index": 0
}
]
]
}
}
}常见问题
如何使用这个工作流?
复制上方的 JSON 配置代码,在您的 n8n 实例中创建新工作流并选择「从 JSON 导入」,粘贴配置后根据需要修改凭证设置即可。
这个工作流适合什么场景?
中级 - 内容创作, 多模态 AI
需要付费吗?
本工作流完全免费,您可以直接导入使用。但请注意,工作流中使用的第三方服务(如 OpenAI API)可能需要您自行付费。
相关工作流推荐
使用GPT-4o-mini的技术SEO审计与多格式报告(Sheets-Email)
使用GPT-4o-mini的技术SEO审计与多格式报告(Sheets/Email)
Set
Xml
Code
+14
45 节点Oriol Seguí
内容创作
自动化本地线索查找与冷邮件发送
使用 Apify、AI 和 Gmail 自动查找本地线索并发送冷邮件
If
Set
Wait
+10
18 节点Meak
内容创作
使用GPT-4.1 mini将自然语言转换为网络搜索并记录到Google Sheets
使用GPT-4.1 mini将自然语言转换为网络搜索并记录到Google Sheets
Webhook
Http Request
Google Sheets
+5
14 节点Meak
内容创作
从 Google Maps 列表抓取企业邮箱到 Google Sheets
从 Google Maps 列表抓取企业邮箱到 Google Sheets
Code
Wait
Limit
+8
19 节点Meak
内容创作
工作流目的与关键工具
工作流目的与关键工具:Claude 3.7模型规格
If
Set
Gmail
+10
23 节点Meak
内容创作
Printify自动化 - 更新标题和描述 - AlexK1919
使用GPT-4o-mini为Printify自动生成SEO产品标题和描述
If
Set
Code
+10
26 节点Amit Mehta
内容创作