8
n8n 中文网amn8n.com

WhatsApp 文本助手

高级

这是一个Miscellaneous, AI Chatbot, Multimodal AI领域的自动化工作流,包含 27 个节点。主要使用 Set, Twilio, GmailTool, TwilioTrigger, Agent 等节点。 使用 OpenAI、日历和邮件集成创建 WhatsApp 客户支持机器人

前置要求
  • Google 账号和 Gmail API 凭证
  • OpenAI API Key
  • PostgreSQL 数据库连接信息
  • Supabase URL 和 API Key
工作流预览
可视化展示节点连接关系,支持缩放和平移
导出工作流
复制以下 JSON 配置到 n8n 导入,即可使用此工作流
{
  "id": "RAYoeKNp3GoyEDxJ",
  "meta": {
    "instanceId": "b8a5093b5456db9e25d3dfee5ac3b3b01627b82a51b5b4c92c46527b44088cc7"
  },
  "name": "WhatsApp 文本助手",
  "tags": [],
  "nodes": [
    {
      "id": "25be2a63-0499-4041-9b82-d91095595210",
      "name": "当由另一个工作流执行时",
      "type": "n8n-nodes-base.executeWorkflowTrigger",
      "position": [
        -1120,
        -32
      ],
      "parameters": {
        "inputSource": "passthrough"
      },
      "typeVersion": 1.1
    },
    {
      "id": "1416d456-079a-477f-afd1-dafcb248f6df",
      "name": "OpenAI 聊天模型",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "position": [
        -1024,
        192
      ],
      "parameters": {
        "model": {
          "__rl": true,
          "mode": "list",
          "value": "gpt-4.1-mini"
        },
        "options": {}
      },
      "credentials": {
        "openAiApi": {
          "id": "I91cpgp1xdieYw6j",
          "name": "OpenAi account"
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "cf766459-4da1-44d7-b5e2-d1abeb2013f2",
      "name": "在 Google Calendar 中获取多个事件",
      "type": "n8n-nodes-base.googleCalendarTool",
      "position": [
        -896,
        272
      ],
      "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": "a521bf39-d14d-4dd6-8b35-a1eb2b1d7c38",
      "name": "在 Google Calendar 中创建事件",
      "type": "n8n-nodes-base.googleCalendarTool",
      "position": [
        -736,
        192
      ],
      "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": "4f35b0fa-4eee-4ad5-a31a-9e13ebb6ded3",
      "name": "删除 Google Calendar 中的事件",
      "type": "n8n-nodes-base.googleCalendarTool",
      "position": [
        -608,
        272
      ],
      "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": "7f05ff63-9ffe-40f2-b9bf-e07f3a6eeeeb",
      "name": "在 Google Calendar 中创建事件",
      "type": "n8n-nodes-base.googleCalendarTool",
      "position": [
        -448,
        192
      ],
      "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": "1b80156f-009f-4175-8d6a-b51a88a8e8be",
      "name": "日历工具",
      "type": "@n8n/n8n-nodes-langchain.toolWorkflow",
      "position": [
        464,
        240
      ],
      "parameters": {
        "workflowId": {
          "__rl": true,
          "mode": "list",
          "value": "ZnQPXmxkpwVly7Ag",
          "cachedResultName": "Calendar Sub Agent"
        },
        "description": "使用此助手检查日历可用性、预订预约,并有效管理会话日程,如更新和删除事件。",
        "workflowInputs": {
          "value": {},
          "schema": [],
          "mappingMode": "defineBelow",
          "matchingColumns": [],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        }
      },
      "typeVersion": 2.2
    },
    {
      "id": "2e4e7009-35b3-49dd-a3c2-8d7aefa45525",
      "name": "知识库工具",
      "type": "@n8n/n8n-nodes-langchain.toolWorkflow",
      "position": [
        592,
        240
      ],
      "parameters": {
        "workflowId": {
          "__rl": true,
          "mode": "list",
          "value": "VzMwnIb1MrJgCvNb",
          "cachedResultName": "Knowledge Base Agent (FAQ) (Sub Agent)"
        },
        "description": "当客户请求有关诊断、定价、报价或一般常见问题解答的详细信息时触发。",
        "workflowInputs": {
          "value": {},
          "schema": [],
          "mappingMode": "defineBelow",
          "matchingColumns": [],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        }
      },
      "typeVersion": 2.2
    },
    {
      "id": "5df9b2b3-5d98-4df4-b1a3-92f7029fac13",
      "name": "邮件工具",
      "type": "@n8n/n8n-nodes-langchain.toolWorkflow",
      "position": [
        720,
        240
      ],
      "parameters": {
        "workflowId": {
          "__rl": true,
          "mode": "list",
          "value": "asdMM8Ip0p1BpgKo",
          "cachedResultName": "Email Sub Agent"
        },
        "description": "使用此工具向客户发送邮件,例如确认、更新或跟进邮件。",
        "workflowInputs": {
          "value": {},
          "schema": [],
          "mappingMode": "defineBelow",
          "matchingColumns": [],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        }
      },
      "typeVersion": 2.2
    },
    {
      "id": "6010798b-5cf4-44e2-9308-c7a6095371af",
      "name": "OpenAI 聊天模型1",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "position": [
        176,
        240
      ],
      "parameters": {
        "model": {
          "__rl": true,
          "mode": "list",
          "value": "gpt-4.1-mini"
        },
        "options": {}
      },
      "credentials": {
        "openAiApi": {
          "id": "I91cpgp1xdieYw6j",
          "name": "OpenAi account"
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "6865c276-9b78-4c9f-ad60-681fd6ac6361",
      "name": "Supabase 向量存储",
      "type": "@n8n/n8n-nodes-langchain.vectorStoreSupabase",
      "position": [
        832,
        640
      ],
      "parameters": {
        "mode": "retrieve-as-tool",
        "options": {},
        "tableName": {
          "__rl": true,
          "mode": "list",
          "value": "documents",
          "cachedResultName": "documents"
        },
        "toolDescription": "Call this tool to fetch data for diagnosis, pricing quotes or any other general inquiries."
      },
      "credentials": {
        "supabaseApi": {
          "id": "Q4GZ3W6mxCehoH23",
          "name": "Supabase account"
        }
      },
      "typeVersion": 1.3
    },
    {
      "id": "65751620-a0b2-4761-a8c5-72f6c0b587c2",
      "name": "OpenAI 嵌入",
      "type": "@n8n/n8n-nodes-langchain.embeddingsOpenAi",
      "position": [
        848,
        784
      ],
      "parameters": {
        "options": {}
      },
      "credentials": {
        "openAiApi": {
          "id": "I91cpgp1xdieYw6j",
          "name": "OpenAi account"
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "f60f9ec2-7b02-42e4-b7e5-4f06b497cb56",
      "name": "OpenAI 聊天模型2",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "position": [
        736,
        624
      ],
      "parameters": {
        "model": {
          "__rl": true,
          "mode": "list",
          "value": "gpt-4.1-mini"
        },
        "options": {}
      },
      "credentials": {
        "openAiApi": {
          "id": "I91cpgp1xdieYw6j",
          "name": "OpenAi account"
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "d5b5f5c1-d7d5-4d23-8f2e-5890fdd286c6",
      "name": "在 Gmail 中发送消息",
      "type": "n8n-nodes-base.gmailTool",
      "position": [
        -256,
        720
      ],
      "webhookId": "a22a1862-c2d8-49e5-914e-95d95a6743ff",
      "parameters": {
        "sendTo": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('To', ``, 'string') }}",
        "message": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('Message', ``, 'string') }}",
        "options": {
          "appendAttribution": false
        },
        "subject": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('Subject', ``, 'string') }}",
        "emailType": "text"
      },
      "credentials": {
        "gmailOAuth2": {
          "id": "n8VNOucmPCeP3LOO",
          "name": "Gmail account"
        }
      },
      "typeVersion": 2.1
    },
    {
      "id": "861243df-9215-436d-bfed-2eca7626bfe8",
      "name": "OpenAI聊天模型3",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "position": [
        -432,
        720
      ],
      "parameters": {
        "model": {
          "__rl": true,
          "mode": "list",
          "value": "gpt-4.1-mini"
        },
        "options": {}
      },
      "credentials": {
        "openAiApi": {
          "id": "I91cpgp1xdieYw6j",
          "name": "OpenAi account"
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "bfe4d075-18f0-4ba6-a85c-ddfb09437d73",
      "name": "WhatsApp AI 支持助手",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        384,
        16
      ],
      "parameters": {
        "text": "={{ $json.usersMessage }}",
        "options": {
          "systemMessage": "=#Role\nYou are the Primary Assistant Agent for Nabin AI Solutions, operating on WhatsApp.\n\nYour role is to interact naturally with customers, understand their requests, and delegate tasks to specialized sub-agents (Calendar Tool, Knowledge Base Tool, Email Tool).\n\nYou never perform tool tasks yourself. Instead, you:\nRoute queries to the correct sub-agent with structured inputs.\n\nReceive outputs from sub-agents.\nRephrase results into clear, conversational responses for the user.\n\nSub-Agents & When to Use Them\n\n##Calendar Tool\nFor creating, retrieving, updating, or deleting events.\nAlways confirm details before creation, update, or deletion.\nUse Get Events first before modifying or deleting.\nThe Duration of meeting would always be 30 minutes.\nDo not engage with customer too much make it only 1 or 2 conversation at max.\nOnce the meeting is booked ask the email adress with the user and once the email is received, send the email automatically to the user\n\n##Knowledge Base Tool\nFor retrieving FAQs, pricing, or diagnostic information.\nOnly provide structured results from the knowledge base never invent answers.\nIf safety-critical issues appear, highlight them clearly.\nDo not output all the details, summarixe the data and only output specific details the user is asking.\n\n##Email Tool\nFor sending confirmation emails, pricing emails, or updates.\nConfirm recipient and content with the user before sending.\nAlways output a full draft before marking STATUS: Email Sent ✅.\n\n#Workflow\nUnderstand the customer’s request.\nSelect the correct sub-agent.\nFormat the query according to the sub-agent’s input format.\nSend the request to the sub-agent.\nReceive the response and rephrase it for the customer (clear, concise, professional).\nIf multiple tools are required (e.g., Knowledge Base + Email), orchestrate them in sequence.\n\n#Example Conversations\n\n##Example 1 – Booking\nUser: “Book me a meeting on Friday at 11 AM.”\nAssistant: “Okay, booking you for Friday at 11 AM for 1 hour. Confirm?”\n→ On confirmation → Call Calendar Tool → Create Event\n→ Reply: “✅ Appointment booked successfully!”\n\n##Example 2 – Diagnostic → Booking\nUser: I would like to know more about your services? \nCall Knowledge Base Tool with user details and reply to the customer\n\nWould you like me to book you an Appointment?\n→ If yes → Call Calendar Tool → Get Many Events in Google Calendar →If Available → Create an Event\n\n##Example 3 – Email Confirmation\nUser: Email me the price range for a chatbot.\nAssistant:\nCall Knowledge Base Tool for chatbot.\nConfirm recipient email with user.\nCall Email subagent with subject: “Information regarding chatbot”\nReply: “📧 Price details have been sent to your email.”\n\n\n#Rules\n\nAlways confirm unclear details.\n\nNever guess or fabricate responses — rely only on sub-agents.\n\nKeep tone polite, clear, and professional.\n\nWhen using sub-agents, stick to their exact input/output formats.\n\nAlways present sub-agent outputs in a user-friendly WhatsApp message style.\n\n"
        },
        "promptType": "define"
      },
      "typeVersion": 2.2
    },
    {
      "id": "de959068-b936-4518-aecb-3d5af8342144",
      "name": "知识库助手",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        768,
        432
      ],
      "parameters": {
        "text": "={{ $json.query }}",
        "options": {
          "systemMessage": "=You are the RAG Knowledge Retrieval Sub-Agent for Nabin AI Solution.\nPurpose\nYour only responsibility is to query the knowledge base (see below) and return structured, relevant data.\nYou do not interact with customers directly.\nYou only respond to the main delegate agent’s requests.\nYou must provide only fact-based answers from the knowledge base—never invent data.\n\nInput Format\nYou will receive customer case details in the following format:\nName: [Customer Name]  \nIssue Description: [Customer’s problem or service request]  \n\n\nOutput Format\nYou must always return results in exactly this format:\n-LIKELY_FAULTS: [1–3 likely issues based on symptoms/service requested]  \n-DIAGNOSTIC_FEE: £45 (or £75 if complex electrical/advanced integration work)  \n-PRICE_RANGE: £[min]–£[max] (typical setup/customization cost range)  \n-SAFETY_CRITICAL: Yes/No  \n-ADDITIONAL_INFO: [Notes on add-ons, API integration, part availability, complexity, or special considerations]  \n\n\nRetrieval Guidelines\nMatch the customer’s issue/service to the Nabin AI Solution Knowledge Base (provided below).\nUse Pricing Model data to calculate cost ranges (plan fees, per-minute usage, and add-ons).\nMark SAFETY_CRITICAL: Yes if the issue involves failures that could cause major business disruption (e.g., call routing failures, escalation breakdowns, data sync loss).\nAlways phrase results as “likely,” “commonly,” or “typically” (never definitive).\nApply diagnostic fee:\n£45 standard (basic troubleshooting, configuration).\n£75 advanced (complex integrations, electrical/telecom layer, API debugging).\nInclude add-ons or complexity notes under ADDITIONAL_INFO.\n"
        },
        "promptType": "define"
      },
      "typeVersion": 2.2
    },
    {
      "id": "f3c7499a-c6c0-4260-8ecb-c7c8d012381c",
      "name": "对话记忆 (Postgres)",
      "type": "@n8n/n8n-nodes-langchain.memoryPostgresChat",
      "position": [
        336,
        240
      ],
      "parameters": {
        "sessionKey": "={{ $json.usersMobileNumber }}",
        "sessionIdType": "customKey",
        "contextWindowLength": 50
      },
      "credentials": {
        "postgres": {
          "id": "9D4HR2YjH923hykD",
          "name": "Postgres account"
        }
      },
      "typeVersion": 1.3
    },
    {
      "id": "3c2bac28-e8e4-422f-864f-0cf22382643b",
      "name": "日历助手",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        -848,
        -32
      ],
      "parameters": {
        "text": "={{ $json.query }}",
        "options": {
          "systemMessage": "=# Role\nYou are a Calendar Assistant.\nYour job is to create, retrieve, update, and delete events in the user's calendar with complete accuracy.\n\n# Calendar Management Tools\n-Create Event → Use for adding new events\n-Get Events → Use to retrieve the user's calendar schedule\n-Delete Event → First call Get Events to obtain the event ID, then delete it\n-Update Event → First call Get Events to obtain the event ID, then update it\n\n# Rules\n-Convert each incoming query into the correct calendar action\n-Always collect and use exact event details: title, date, time, and any notes\n-The current date/time is: {{ $now.toString() }}\n-The duration of the event is always 30 minutes\n-Always confirm event details before creation, update, or deletion\n-IDs for update or delete actions must always come from a Get Events call to avoid errors\n\n# Accuracy Requirements\n-Event times and dates must match exactly what the user provides no approximations\n-Never assume repeated events unless explicitly stated\n-Always check for conflicts using Get Events before creating a new event\n\n# Once Booking is confirmed with the user Always Input this in google calendar.\n-Task: Create Event\n-Title: [Event Title]\n-Date: [YYYY-MM-DD]\n-Time: [HH:mm]\n-Notes: [Optional]\n\n# Output\nRespond only with concise confirmation or error information for the given action.\n\n#Example\nExample 1 – Create Event\nUser: Book a meeting at 5 September at 2 PM.\nAssistant:\n Confirming event: Meeting on 2025-09-05 at 14:00\nTask for AI:\n ✅ Task: Create Event\nTitle: Meeting with { User’s Name }\n\n\nDate: 2025-09-05\n\n\nTime: 14:00\n\n\nNotes: Quarterly report\n\n\n\nExample 2 – Update Event\nUser: Move my meeting on 5 September at 2 PM to 6 September at 3 PM.\nAssistant:\n Found event on 2025-09-05 at 14:00. Updating to 2025-09-06 at 15:00.\nTask for AI:\n ✅ Task: Update Event\nID: { Event ID }\n\n\nTitle: Meeting with {User’s Name }\n\n\nDate: 2025-09-06\n\n\nTime: 15:00\n\n\nNotes: Updated schedule\n\n\n\nExample 3 – Delete Event\nUser: Cancel my meeting on 7 September at 10:30 AM.\nAssistant:\n Found event on 2025-09-07 at 10:30. Deleting.\nTask for AI:\n ✅ Task: Delete Event\nID: { Event ID }\n\n\n\nExample 4 – Conflict\nUser: Book a call on 7 September at 10:30 AM.\nAssistant:\n ❌ Error: You already have an event on 2025-09-07 at 10:30.\nTask for AI:\n No action\n"
        },
        "promptType": "define"
      },
      "typeVersion": 2.2
    },
    {
      "id": "337be5f1-64d6-41d7-927f-be3897607d80",
      "name": "邮件助手",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        -432,
        496
      ],
      "parameters": {
        "text": "={{ $json.query }}",
        "options": {
          "systemMessage": "=\n#Role\n\nYou are the Email Agent for Nabin AI solutions.\nYour job is to send professional emails based on given instructions. \n\nYou do not create content outside the provided context — only generate and send structured emails.\n\n#Input Format\nYou will receive email request data in this format:\nSender: [Business/Agent Name]\nRecipient: [Recipient Name + Email Address]\nSubject: [Email Subject]\nContext: [Details, purpose, or conversation history]\nTone: [Formal / Friendly / Concise / Apologetic / Promotional]\nAction: [Send]\n\n\n#Task\n\nBased on the input:\n\nIf Action = Send,  then mark as:\nSTATUS: Email Sent ✅\n[Include full sent email for record keeping]\n\n#Guidelines\nAlways start with a polite greeting (e.g., Dear {Name}, Hi {Name}\nMatch the Tone input (formal, friendly, concise, apologetic, promotional)\nKeep the structure: Greeting → Main Content → Closing → Signature\nEnsure grammar, clarity, and professionalism\nFor complaints → acknowledge issue + offer solution\nFor promotions → highlight value + clear CTA (Call To Action)\nUse placeholders {Name}, {Date}, {Offer} if information is missing\nDo not include personal opinions or unverified details\n\n#Response Rules\nDo not invent context outside provided input\nAlways output a full draft email before sending\nRespect Action: only “send” when explicitly instructed\nKeep formatting consistent with professional email standards\n\nConfirm STATUS: Email Sent ✅ after sending\n\n\n"
        },
        "promptType": "define"
      },
      "typeVersion": 2.2
    },
    {
      "id": "965d09f8-afff-4081-9fa7-c51d1c619686",
      "name": "发送 WhatsApp 回复",
      "type": "n8n-nodes-base.twilio",
      "position": [
        800,
        16
      ],
      "parameters": {
        "to": "={{ $('Format Incoming Message').item.json.usersMobileNumber }}",
        "from": "={{ $('Format Incoming Message').item.json.WhatsappAiAgentNumber }}",
        "message": "={{ $json.output }}",
        "options": {},
        "toWhatsapp": true
      },
      "credentials": {
        "twilioApi": {
          "id": "V3HbhWaYE0DiMZYM",
          "name": "Twilio account"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "98e1f102-4329-461f-8580-101f21cd847f",
      "name": "传入 WhatsApp 消息",
      "type": "n8n-nodes-base.twilioTrigger",
      "position": [
        -144,
        16
      ],
      "webhookId": "2983ca40-cad7-45de-b9d9-13698a65fe09",
      "parameters": {
        "updates": [
          "com.twilio.messaging.inbound-message.received"
        ]
      },
      "credentials": {
        "twilioApi": {
          "id": "V3HbhWaYE0DiMZYM",
          "name": "Twilio account"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "ae42acee-aa3e-428b-9c95-e762ff83cbd3",
      "name": "格式化传入消息",
      "type": "n8n-nodes-base.set",
      "position": [
        96,
        16
      ],
      "parameters": {
        "options": {},
        "assignments": {
          "assignments": [
            {
              "id": "9053a9fd-1998-4cd5-9b5d-2913db07f978",
              "name": "usersMessage",
              "type": "string",
              "value": "={{ $json.data.body }}"
            },
            {
              "id": "2577d8f1-c8ba-4bfe-989c-6182531ac4e8",
              "name": "usersMobileNumber",
              "type": "string",
              "value": "={{ $json.data.from.replaceAll('whatsapp:', '') }}"
            },
            {
              "id": "01a58a24-7ea5-487d-8ca2-aad875125657",
              "name": "WhatsappAiAgentNumber",
              "type": "string",
              "value": "={{ $json.data.to.replaceAll('whatsapp:', '') }}"
            }
          ]
        }
      },
      "typeVersion": 3.4
    },
    {
      "id": "3e2b758e-e180-406f-955f-3e7ca65c03c2",
      "name": "便签",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -240,
        -224
      ],
      "parameters": {
        "color": 4,
        "width": 1264,
        "height": 608,
        "content": "🤖 **主 WhatsApp AI 助手**"
      },
      "typeVersion": 1
    },
    {
      "id": "4da17b9c-aba3-479f-bf74-a82b3910663c",
      "name": "便签1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1152,
        -288
      ],
      "parameters": {
        "color": 3,
        "width": 848,
        "height": 720,
        "content": "📅 **日历助手**"
      },
      "typeVersion": 1
    },
    {
      "id": "89696739-72bf-4369-8b19-92798fc7d7de",
      "name": "便签2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        16,
        400
      ],
      "parameters": {
        "color": 5,
        "width": 1056,
        "height": 496,
        "content": "📚 **知识库助手**"
      },
      "typeVersion": 1
    },
    {
      "id": "d9e5fc2a-233c-45ac-b830-e4587f710d0d",
      "name": "便签3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -896,
        464
      ],
      "parameters": {
        "color": 6,
        "width": 816,
        "height": 448,
        "content": "📧 **邮件助手**"
      },
      "typeVersion": 1
    }
  ],
  "active": false,
  "pinData": {},
  "settings": {
    "executionOrder": "v1"
  },
  "versionId": "6ae9047d-5473-4216-8565-6ae9129a24b6",
  "connections": {
    "Email Tool": {
      "ai_tool": [
        [
          {
            "node": "WhatsApp AI Support Agent",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "Calendar Tool": {
      "ai_tool": [
        [
          {
            "node": "WhatsApp AI Support Agent",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "Embeddings OpenAI": {
      "ai_embedding": [
        [
          {
            "node": "Supabase Vector Store",
            "type": "ai_embedding",
            "index": 0
          }
        ]
      ]
    },
    "OpenAI Chat Model": {
      "ai_languageModel": [
        [
          {
            "node": "Calendar Agent",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "OpenAI Chat Model1": {
      "ai_languageModel": [
        [
          {
            "node": "WhatsApp AI Support Agent",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "OpenAI Chat Model2": {
      "ai_languageModel": [
        [
          {
            "node": "Knowledge Base Agent",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "OpenAI Chat Model3": {
      "ai_languageModel": [
        [
          {
            "node": "Email Agent",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Knowledge Base Tool": {
      "ai_tool": [
        [
          {
            "node": "WhatsApp AI Support Agent",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "Supabase Vector Store": {
      "ai_tool": [
        [
          {
            "node": "Knowledge Base Agent",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "Format Incoming Message": {
      "main": [
        [
          {
            "node": "WhatsApp AI Support Agent",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Send a message in Gmail": {
      "ai_tool": [
        [
          {
            "node": "Email Agent",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "Incoming WhatsApp Message": {
      "main": [
        [
          {
            "node": "Format Incoming Message",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "WhatsApp AI Support Agent": {
      "main": [
        [
          {
            "node": "Send WhatsApp Reply",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Conversation Memory (Postgres)": {
      "ai_memory": [
        [
          {
            "node": "WhatsApp AI Support Agent",
            "type": "ai_memory",
            "index": 0
          }
        ]
      ]
    },
    "When Executed by Another Workflow": {
      "main": [
        [
          {
            "node": "Calendar Agent",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Create an event in Google Calendar": {
      "ai_tool": [
        [
          {
            "node": "Calendar Agent",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "Delete an event in Google Calendar": {
      "ai_tool": [
        [
          {
            "node": "Calendar Agent",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "Get many events in Google Calendar": {
      "ai_tool": [
        [
          {
            "node": "Calendar Agent",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "Create an event in Google Calendar1": {
      "ai_tool": [
        [
          {
            "node": "Calendar Agent",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    }
  }
}
常见问题

如何使用这个工作流?

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

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

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

需要付费吗?

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

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

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

外部链接
在 n8n.io 查看

分享此工作流