使用VAPI和n8N的餐厅虚拟接待员与餐桌预订系统
这是一个Support Chatbot, AI Chatbot领域的自动化工作流,包含 9 个节点。主要使用 Webhook, Postgres, RespondToWebhook 等节点。 VAPI和PostgreSQL的餐厅电话处理与餐桌预订自动化系统
- •HTTP Webhook 端点(n8n 会自动生成)
- •PostgreSQL 数据库连接信息
{
"id": "s5rkGHiTGnf7F9PT",
"meta": {
"instanceId": "dd69efaf8212c74ad206700d104739d3329588a6f3f8381a46a481f34c9cc281",
"templateCredsSetupCompleted": true
},
"name": "使用 VAPI 和 n8N 的餐厅虚拟接待员与餐桌预订系统",
"tags": [],
"nodes": [
{
"id": "aa3b9f79-7923-47df-87d8-72ceaa3f0127",
"name": "便签",
"type": "n8n-nodes-base.stickyNote",
"position": [
-580,
-380
],
"parameters": {
"width": 420,
"height": 200,
"content": "📝 功能描述"
},
"typeVersion": 1
},
{
"id": "0cc6d135-9098-4be1-8de3-fe027653d3d9",
"name": "便签1",
"type": "n8n-nodes-base.stickyNote",
"position": [
-100,
20
],
"parameters": {
"color": 3,
"width": 780,
"height": 280,
"content": "🟢 可用性检查流程"
},
"typeVersion": 1
},
{
"id": "511c9929-3614-4d09-b1b6-27c14ce304a7",
"name": "查询餐桌可用性(Postgres)",
"type": "n8n-nodes-base.postgres",
"position": [
220,
100
],
"parameters": {
"table": {
"__rl": true,
"mode": "name",
"value": "table_id"
},
"schema": {
"__rl": true,
"mode": "list",
"value": "public"
},
"options": {},
"operation": "select"
},
"credentials": {
"postgres": {
"id": "4Y4qEFGqF2krfRHZ",
"name": "Postgres-test"
}
},
"typeVersion": 2.6
},
{
"id": "08671a05-f26e-477a-80ab-b6885e10dfd6",
"name": "响应:可用状态(VAPI)",
"type": "n8n-nodes-base.respondToWebhook",
"position": [
440,
100
],
"parameters": {
"options": {},
"respondWith": "json",
"responseBody": "={\n \"results\": [\n {\n \"toolCallId\": \"{{ $('Trigger: Booking Request (VAPI)\t').item.json.body.message.toolCalls[0].id }}\",\n \"result\": \"{{ $json.available }}\"\n }\n ]\n}"
},
"typeVersion": 1.2
},
{
"id": "3efaa272-9bdb-4db1-bb63-94ffca5a161e",
"name": "便签3",
"type": "n8n-nodes-base.stickyNote",
"position": [
-100,
-260
],
"parameters": {
"color": 4,
"width": 780,
"height": 280,
"content": "🔵 预订流程"
},
"typeVersion": 1
},
{
"id": "0fbfd74a-e2a4-4666-9055-c5d588ad6cff",
"name": "触发器:预订请求(VAPI)",
"type": "n8n-nodes-base.webhook",
"position": [
0,
100
],
"webhookId": "027f0f14-93f4-42ff-90a7-715f23316a86",
"parameters": {
"path": "027f0f14-93f4-42ff-90a7-715f23316a86",
"options": {},
"httpMethod": "POST",
"responseMode": "responseNode"
},
"typeVersion": 2
},
{
"id": "13d32034-198f-4429-9515-f71275ff2333",
"name": "在 Postgres 中更新/插入预订记录",
"type": "n8n-nodes-base.postgres",
"position": [
220,
-160
],
"parameters": {
"table": {
"__rl": true,
"mode": "name",
"value": "table_id"
},
"schema": {
"__rl": true,
"mode": "list",
"value": "public"
},
"columns": {
"value": {},
"schema": [],
"mappingMode": "autoMapInputData",
"matchingColumns": [],
"attemptToConvertTypes": false,
"convertFieldsToString": false
},
"options": {},
"operation": "upsert"
},
"credentials": {
"postgres": {
"id": "4Y4qEFGqF2krfRHZ",
"name": "Postgres-test"
}
},
"typeVersion": 2.6
},
{
"id": "16c88128-1e44-42df-bbd3-2cd7b1c2e6b0",
"name": "响应:预订确认(VAPI)",
"type": "n8n-nodes-base.respondToWebhook",
"position": [
440,
-160
],
"parameters": {
"options": {},
"respondWith": "json",
"responseBody": "={\n \"results\": [\n {\n \"toolCallId\": \"{{ $('Trigger: Booking Request (VAPI)\t1').item.json.body.message.toolCalls[0].id }}\",\n \"result\": \"{{ $json.status }}\"\n }\n ]\n}"
},
"typeVersion": 1.2
},
{
"id": "ee35e567-9de8-4518-a66f-0d168a973544",
"name": "触发器:预订请求(VAPI)1",
"type": "n8n-nodes-base.webhook",
"position": [
0,
-160
],
"webhookId": "2f7eff83-2e85-45ee-b544-7f889ca3ad07",
"parameters": {
"path": "2f7eff83-2e85-45ee-b544-7f889ca3ad07",
"options": {},
"httpMethod": "POST",
"responseMode": "responseNode"
},
"typeVersion": 2
}
],
"active": false,
"pinData": {},
"settings": {
"timezone": "Asia/Kolkata",
"callerPolicy": "workflowsFromSameOwner",
"executionOrder": "v1"
},
"versionId": "50da786a-d8c6-4453-9bbe-835b7b673c43",
"connections": {
"Upsert Booking in Postgres\t": {
"main": [
[
{
"node": "Respond: Booking Confirmation (VAPI)\t",
"type": "main",
"index": 0
}
]
]
},
"Trigger: Booking Request (VAPI)\t": {
"main": [
[
{
"node": "Query Table Availability (Postgres)",
"type": "main",
"index": 0
}
]
]
},
"Trigger: Booking Request (VAPI)\t1": {
"main": [
[
{
"node": "Upsert Booking in Postgres\t",
"type": "main",
"index": 0
}
]
]
},
"Query Table Availability (Postgres)": {
"main": [
[
{
"node": "Respond: Availability Status (VAPI)",
"type": "main",
"index": 0
}
]
]
}
}
}如何使用这个工作流?
复制上方的 JSON 配置代码,在您的 n8n 实例中创建新工作流并选择「从 JSON 导入」,粘贴配置后根据需要修改凭证设置即可。
这个工作流适合什么场景?
中级 - 客服机器人, AI 聊天机器人
需要付费吗?
本工作流完全免费,您可以直接导入使用。但请注意,工作流中使用的第三方服务(如 OpenAI API)可能需要您自行付费。
相关工作流推荐
Oneclick AI Squad
@oneclick-aiThe AI Squad Initiative is a pioneering effort to build, automate and scale AI-powered workflows using n8n.io. Our mission is to help individuals and businesses integrate AI agents seamlessly into their daily operations from automating tasks and enhancing productivity to creating innovative, intelligent solutions. We design modular, reusable AI workflow templates that empower creators, developers and teams to supercharge their automation with minimal effort and maximum impact.
分享此工作流