8
n8n 中文网amn8n.com

演示 - WhatsApp 语音代理

高级

这是一个Miscellaneous, AI Chatbot, Multimodal AI领域的自动化工作流,包含 18 个节点。主要使用 Webhook, GmailTool, RespondToWebhook, GoogleCalendarTool, McpTrigger 等节点。 使用 Twilio、VAPI、Google 日历和 OpenAI 创建 WhatsApp 语音助手

前置要求
  • HTTP Webhook 端点(n8n 会自动生成)
  • Google 账号和 Gmail API 凭证
  • OpenAI API Key
  • Supabase URL 和 API Key
工作流预览
可视化展示节点连接关系,支持缩放和平移
导出工作流
复制以下 JSON 配置到 n8n 导入,即可使用此工作流
{
  "id": "hSC68gkBlh2XuLpG",
  "meta": {
    "instanceId": "b8a5093b5456db9e25d3dfee5ac3b3b01627b82a51b5b4c92c46527b44088cc7"
  },
  "name": "演示 - WhatsApp 语音代理",
  "tags": [],
  "nodes": [
    {
      "id": "43b9c5a5-4d0b-4713-a9c5-ea00e24cc320",
      "name": "Supabase 向量存储",
      "type": "@n8n/n8n-nodes-langchain.vectorStoreSupabase",
      "position": [
        1216,
        -32
      ],
      "parameters": {
        "mode": "retrieve-as-tool",
        "options": {},
        "tableName": {
          "__rl": true,
          "mode": "list",
          "value": "documents",
          "cachedResultName": "documents"
        },
        "toolDescription": "Retrieve this tool to get pricing Informatio or any other General Inquiry."
      },
      "credentials": {
        "supabaseApi": {
          "id": "Q4GZ3W6mxCehoH23",
          "name": "Supabase account"
        }
      },
      "typeVersion": 1.3
    },
    {
      "id": "07c67c64-9390-472d-807c-3c0c4a0405a7",
      "name": "OpenAI 嵌入",
      "type": "@n8n/n8n-nodes-langchain.embeddingsOpenAi",
      "position": [
        1216,
        112
      ],
      "parameters": {
        "options": {}
      },
      "credentials": {
        "openAiApi": {
          "id": "I91cpgp1xdieYw6j",
          "name": "OpenAi account"
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "15ee6172-40e2-439b-bfce-a64850fdf4d1",
      "name": "创建日历事件",
      "type": "n8n-nodes-base.googleCalendarTool",
      "position": [
        -240,
        32
      ],
      "parameters": {
        "end": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('End', ``, 'string') }}",
        "start": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('Start', ``, 'string') }}",
        "calendar": {
          "__rl": true,
          "mode": "list",
          "value": "nabin.busines@gmail.com",
          "cachedResultName": "nabin.busines@gmail.com"
        },
        "additionalFields": {}
      },
      "credentials": {
        "googleCalendarOAuth2Api": {
          "id": "ctueqxNJZ9Heg0WW",
          "name": "Google Calendar account"
        }
      },
      "typeVersion": 1.3
    },
    {
      "id": "e5a95d98-88ee-4557-84f7-ee3a4bf56ad1",
      "name": "获取日历事件",
      "type": "n8n-nodes-base.googleCalendarTool",
      "position": [
        -96,
        32
      ],
      "parameters": {
        "options": {},
        "timeMax": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('Before', ``, 'string') }}",
        "timeMin": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('After', ``, 'string') }}",
        "calendar": {
          "__rl": true,
          "mode": "list",
          "value": "nabin.busines@gmail.com",
          "cachedResultName": "nabin.busines@gmail.com"
        },
        "operation": "getAll"
      },
      "credentials": {
        "googleCalendarOAuth2Api": {
          "id": "ctueqxNJZ9Heg0WW",
          "name": "Google Calendar account"
        }
      },
      "typeVersion": 1.3
    },
    {
      "id": "f22f3c2d-1e22-45d8-9cfd-8895733b862b",
      "name": "更新日历事件",
      "type": "n8n-nodes-base.googleCalendarTool",
      "position": [
        48,
        48
      ],
      "parameters": {
        "eventId": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('Event_ID', ``, 'string') }}",
        "calendar": {
          "__rl": true,
          "mode": "list",
          "value": "nabin.busines@gmail.com",
          "cachedResultName": "nabin.busines@gmail.com"
        },
        "operation": "update",
        "updateFields": {}
      },
      "credentials": {
        "googleCalendarOAuth2Api": {
          "id": "ctueqxNJZ9Heg0WW",
          "name": "Google Calendar account"
        }
      },
      "typeVersion": 1.3
    },
    {
      "id": "d56e75ab-7086-45cb-bf2c-dca53cfbbe8d",
      "name": "删除日历事件",
      "type": "n8n-nodes-base.googleCalendarTool",
      "position": [
        176,
        80
      ],
      "parameters": {
        "eventId": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('Event_ID', ``, 'string') }}",
        "options": {},
        "calendar": {
          "__rl": true,
          "mode": "list",
          "value": "nabin.busines@gmail.com",
          "cachedResultName": "nabin.busines@gmail.com"
        },
        "operation": "delete"
      },
      "credentials": {
        "googleCalendarOAuth2Api": {
          "id": "ctueqxNJZ9Heg0WW",
          "name": "Google Calendar account"
        }
      },
      "typeVersion": 1.3
    },
    {
      "id": "d8c9f9d7-1fb2-4293-b411-1d72afd03c63",
      "name": "发送邮件通知",
      "type": "n8n-nodes-base.gmailTool",
      "position": [
        720,
        352
      ],
      "webhookId": "028d9f35-e95f-48db-98cd-d5fbe5e5ddef",
      "parameters": {
        "sendTo": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('To', ``, 'string') }}",
        "message": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('Message', ``, 'string') }}",
        "options": {},
        "subject": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('Subject', ``, 'string') }}",
        "emailType": "text"
      },
      "credentials": {
        "gmailOAuth2": {
          "id": "n8VNOucmPCeP3LOO",
          "name": "Gmail account"
        }
      },
      "typeVersion": 2.1
    },
    {
      "id": "45496f90-c8a7-40a5-bbe3-2f0b183828e4",
      "name": "MCP 服务器 – 日历",
      "type": "@n8n/n8n-nodes-langchain.mcpTrigger",
      "position": [
        -240,
        -240
      ],
      "webhookId": "1902a1d2-f8a8-4601-b20c-90e824fe478d",
      "parameters": {
        "path": "1902a1d2-f8a8-4601-b20c-90e824fe478d"
      },
      "typeVersion": 2
    },
    {
      "id": "9ebb9d32-59ea-4f52-ba5a-f6a57356ac8d",
      "name": "MCP 服务器 – Gmail",
      "type": "@n8n/n8n-nodes-langchain.mcpTrigger",
      "position": [
        576,
        160
      ],
      "webhookId": "41a2ab5f-1a7d-440b-a1e3-1b2308dee744",
      "parameters": {
        "path": "41a2ab5f-1a7d-440b-a1e3-1b2308dee744"
      },
      "typeVersion": 2
    },
    {
      "id": "566c8afb-cb1b-4216-a543-5b26cb5182e8",
      "name": "MCP 服务器 – 知识库",
      "type": "@n8n/n8n-nodes-langchain.mcpTrigger",
      "position": [
        1152,
        -240
      ],
      "webhookId": "3643c062-c554-43d8-84d1-692b886b780f",
      "parameters": {
        "path": "3643c062-c554-43d8-84d1-692b886b780f"
      },
      "typeVersion": 2
    },
    {
      "id": "61ded9b5-737a-42bf-956e-60614c87fbe2",
      "name": "入站 Webhook (VAPI)",
      "type": "n8n-nodes-base.webhook",
      "position": [
        480,
        -112
      ],
      "webhookId": "81e240fc-d3fb-4ccd-b91a-0aacbf2d8f2a",
      "parameters": {
        "path": "81e240fc-d3fb-4ccd-b91a-0aacbf2d8f2a",
        "options": {},
        "httpMethod": "POST",
        "responseMode": "responseNode"
      },
      "typeVersion": 2.1
    },
    {
      "id": "fe90d72c-fef0-4646-8d07-f90851015ed0",
      "name": "响应 Webhook (VAPI)",
      "type": "n8n-nodes-base.respondToWebhook",
      "position": [
        816,
        -112
      ],
      "parameters": {
        "options": {
          "responseHeaders": {
            "entries": [
              {
                "name": "Content-Type",
                "value": "application/xml"
              }
            ]
          }
        },
        "respondWith": "text",
        "responseBody": "=<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<Response>\n   <Dial>\n      <Sip>sip:15795503867@sip.vapi.ai</Sip>\n   </Dial>\n</Response>\n"
      },
      "typeVersion": 1.4
    },
    {
      "id": "2000941e-5340-4f44-91a2-4068a172f316",
      "name": "便签1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -272,
        -432
      ],
      "parameters": {
        "color": 4,
        "width": 592,
        "height": 768,
        "content": "📅 日历 MCP"
      },
      "typeVersion": 1
    },
    {
      "id": "e2af4a5c-aaac-4458-a26e-fda5db9c4fa5",
      "name": "便签2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        464,
        64
      ],
      "parameters": {
        "color": 5,
        "width": 496,
        "height": 448,
        "content": "📧 Gmail MCP"
      },
      "typeVersion": 1
    },
    {
      "id": "68569b1b-a853-47f2-90b3-284594f44c53",
      "name": "便签3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1088,
        -384
      ],
      "parameters": {
        "color": 6,
        "width": 400,
        "height": 656,
        "content": "📚 知识库 MCP"
      },
      "typeVersion": 1
    },
    {
      "id": "36ab17f2-52f8-401b-af07-419cc50ccb4e",
      "name": "便签",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        384,
        -592
      ],
      "parameters": {
        "color": 2,
        "width": 640,
        "height": 624,
        "content": "## 入口点 – 入站 Webhook (VAPI)"
      },
      "typeVersion": 1
    },
    {
      "id": "22d6f683-025c-4023-9151-c5ef3f9b0dc8",
      "name": "便签4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        384,
        -304
      ],
      "parameters": {
        "color": 3,
        "width": 272,
        "height": 336,
        "content": "当通过 Twilio 收到 WhatsApp 语音指令时,VAPI 会触发此 webhook"
      },
      "typeVersion": 1
    },
    {
      "id": "74243893-60e4-4289-a9d5-8c9f363b897d",
      "name": "便利贴5",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        752,
        -304
      ],
      "parameters": {
        "color": 3,
        "width": 272,
        "height": 336,
        "content": "此节点将处理后的响应发送回 VAPI"
      },
      "typeVersion": 1
    }
  ],
  "active": false,
  "pinData": {},
  "settings": {
    "executionOrder": "v1"
  },
  "versionId": "09fcb8e2-ec67-4f88-a908-d558030605fe",
  "connections": {
    "Embeddings OpenAI": {
      "ai_embedding": [
        [
          {
            "node": "Supabase Vector Store",
            "type": "ai_embedding",
            "index": 0
          }
        ]
      ]
    },
    "Create Calendar Event": {
      "ai_tool": [
        [
          {
            "node": "MCP Server – Calendar",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "Delete Calendar Event": {
      "ai_tool": [
        [
          {
            "node": "MCP Server – Calendar",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "Fetch Calendar Events": {
      "ai_tool": [
        [
          {
            "node": "MCP Server – Calendar",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "Supabase Vector Store": {
      "ai_tool": [
        [
          {
            "node": "MCP Server – Knowledge Base",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "Update Calendar Event": {
      "ai_tool": [
        [
          {
            "node": "MCP Server – Calendar",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "Incoming Webhook (VAPI)": {
      "main": [
        [
          {
            "node": "Respond to Webhook (VAPI)",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Send Email Notification": {
      "ai_tool": [
        [
          {
            "node": "MCP Server – Gmail",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    }
  }
}
常见问题

如何使用这个工作流?

复制上方的 JSON 配置代码,在您的 n8n 实例中创建新工作流并选择「从 JSON 导入」,粘贴配置后根据需要修改凭证设置即可。

这个工作流适合什么场景?

高级 - 杂项, AI 聊天机器人, 多模态 AI

需要付费吗?

本工作流完全免费,您可以直接导入使用。但请注意,工作流中使用的第三方服务(如 OpenAI API)可能需要您自行付费。

工作流信息
难度等级
高级
节点数量18
分类3
节点类型8
难度说明

适合高级用户,包含 16+ 个节点的复杂工作流

外部链接
在 n8n.io 查看

分享此工作流