AutomationFlowsAI & RAG › Create a Whatsapp Customer Support Bot with Openai, Calendar & Email Integration

Create a Whatsapp Customer Support Bot with Openai, Calendar & Email Integration

ByNabin Bhandari @knabinbhandari on n8n.io

This template is for businesses, customer support teams, and professionals who want to deliver AI-powered WhatsApp assistance. It helps automate conversations, schedule meetings, answer FAQs, and send follow-up emails — all from WhatsApp. A customer sends a WhatsApp message,…

Event trigger★★★★☆ complexityAI-powered27 nodesExecute Workflow TriggerOpenAI ChatGoogle Calendar ToolTool WorkflowSupabase Vector StoreOpenAI EmbeddingsGmail ToolAgent
AI & RAG Trigger: Event Nodes: 27 Complexity: ★★★★☆ AI nodes: yes Added:

This workflow corresponds to n8n.io template #8287 — we link there as the canonical source.

This workflow follows the Agent → OpenAI Embeddings recipe pattern — see all workflows that pair these two integrations.

The workflow JSON

Copy or download the full n8n JSON below. Paste it into a new n8n workflow, add your credentials, activate. Full import guide →

Download .json
{
  "id": "RAYoeKNp3GoyEDxJ",
  "name": "Whatsapp Text Agent",
  "tags": [],
  "nodes": [
    {
      "id": "25be2a63-0499-4041-9b82-d91095595210",
      "name": "When Executed by Another Workflow",
      "type": "n8n-nodes-base.executeWorkflowTrigger",
      "position": [
        -1120,
        -32
      ],
      "parameters": {
        "inputSource": "passthrough"
      },
      "typeVersion": 1.1
    },
    {
      "id": "1416d456-079a-477f-afd1-dafcb248f6df",
      "name": "OpenAI Chat Model",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "position": [
        -1024,
        192
      ],
      "parameters": {
        "model": {
          "__rl": true,
          "mode": "list",
          "value": "gpt-4.1-mini"
        },
        "options": {}
      },
      "credentials": {
        "openAiApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "cf766459-4da1-44d7-b5e2-d1abeb2013f2",
      "name": "Get many events in 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": "user@example.com",
          "cachedResultName": "user@example.com"
        },
        "operation": "getAll"
      },
      "credentials": {
        "googleCalendarOAuth2Api": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1.3
    },
    {
      "id": "a521bf39-d14d-4dd6-8b35-a1eb2b1d7c38",
      "name": "Create an event in 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": "user@example.com",
          "cachedResultName": "user@example.com"
        },
        "additionalFields": {}
      },
      "credentials": {
        "googleCalendarOAuth2Api": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1.3
    },
    {
      "id": "4f35b0fa-4eee-4ad5-a31a-9e13ebb6ded3",
      "name": "Delete an event in 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": "user@example.com",
          "cachedResultName": "user@example.com"
        },
        "operation": "delete"
      },
      "credentials": {
        "googleCalendarOAuth2Api": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1.3
    },
    {
      "id": "7f05ff63-9ffe-40f2-b9bf-e07f3a6eeeeb",
      "name": "Create an event in Google Calendar1",
      "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": "user@example.com",
          "cachedResultName": "user@example.com"
        },
        "additionalFields": {}
      },
      "credentials": {
        "googleCalendarOAuth2Api": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1.3
    },
    {
      "id": "1b80156f-009f-4175-8d6a-b51a88a8e8be",
      "name": "Calendar Tool",
      "type": "@n8n/n8n-nodes-langchain.toolWorkflow",
      "position": [
        464,
        240
      ],
      "parameters": {
        "workflowId": {
          "__rl": true,
          "mode": "list",
          "value": "ZnQPXmxkpwVly7Ag",
          "cachedResultName": "Calendar Sub Agent"
        },
        "description": "Use this Agent to Check Calendar availability, book appointments, and effectively manage session schedules like updatinf and deleting event.",
        "workflowInputs": {
          "value": {},
          "schema": [],
          "mappingMode": "defineBelow",
          "matchingColumns": [],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        }
      },
      "typeVersion": 2.2
    },
    {
      "id": "2e4e7009-35b3-49dd-a3c2-8d7aefa45525",
      "name": "Knowledge Base Tool",
      "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": "Trigger when customer requests details on diagnosis, Pricing, Quotes or general FAQ.",
        "workflowInputs": {
          "value": {},
          "schema": [],
          "mappingMode": "defineBelow",
          "matchingColumns": [],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        }
      },
      "typeVersion": 2.2
    },
    {
      "id": "5df9b2b3-5d98-4df4-b1a3-92f7029fac13",
      "name": "Email Tool",
      "type": "@n8n/n8n-nodes-langchain.toolWorkflow",
      "position": [
        720,
        240
      ],
      "parameters": {
        "workflowId": {
          "__rl": true,
          "mode": "list",
          "value": "asdMM8Ip0p1BpgKo",
          "cachedResultName": "Email Sub Agent"
        },
        "description": "Use this tool to send email to clients such as confirmation, updates or Follow ups to clients.",
        "workflowInputs": {
          "value": {},
          "schema": [],
          "mappingMode": "defineBelow",
          "matchingColumns": [],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        }
      },
      "typeVersion": 2.2
    },
    {
      "id": "6010798b-5cf4-44e2-9308-c7a6095371af",
      "name": "OpenAI Chat Model1",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "position": [
        176,
        240
      ],
      "parameters": {
        "model": {
          "__rl": true,
          "mode": "list",
          "value": "gpt-4.1-mini"
        },
        "options": {}
      },
      "credentials": {
        "openAiApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "6865c276-9b78-4c9f-ad60-681fd6ac6361",
      "name": "Supabase Vector Store",
      "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": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1.3
    },
    {
      "id": "65751620-a0b2-4761-a8c5-72f6c0b587c2",
      "name": "Embeddings OpenAI",
      "type": "@n8n/n8n-nodes-langchain.embeddingsOpenAi",
      "position": [
        848,
        784
      ],
      "parameters": {
        "options": {}
      },
      "credentials": {
        "openAiApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "f60f9ec2-7b02-42e4-b7e5-4f06b497cb56",
      "name": "OpenAI Chat Model2",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "position": [
        736,
        624
      ],
      "parameters": {
        "model": {
          "__rl": true,
          "mode": "list",
          "value": "gpt-4.1-mini"
        },
        "options": {}
      },
      "credentials": {
        "openAiApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "d5b5f5c1-d7d5-4d23-8f2e-5890fdd286c6",
      "name": "Send a message in Gmail",
      "type": "n8n-nodes-base.gmailTool",
      "position": [
        -256,
        720
      ],
      "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": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 2.1
    },
    {
      "id": "861243df-9215-436d-bfed-2eca7626bfe8",
      "name": "OpenAI Chat Model3",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "position": [
        -432,
        720
      ],
      "parameters": {
        "model": {
          "__rl": true,
          "mode": "list",
          "value": "gpt-4.1-mini"
        },
        "options": {}
      },
      "credentials": {
        "openAiApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "bfe4d075-18f0-4ba6-a85c-ddfb09437d73",
      "name": "WhatsApp AI Support Agent",
      "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 \u2705.\n\n#Workflow\nUnderstand the customer\u2019s request.\nSelect the correct sub-agent.\nFormat the query according to the sub-agent\u2019s 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 \u2013 Booking\nUser: \u201cBook me a meeting on Friday at 11 AM.\u201d\nAssistant: \u201cOkay, booking you for Friday at 11 AM for 1 hour. Confirm?\u201d\n\u2192 On confirmation \u2192 Call Calendar Tool \u2192 Create Event\n\u2192 Reply: \u201c\u2705 Appointment booked successfully!\u201d\n\n##Example 2 \u2013 Diagnostic \u2192 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\u2192 If yes \u2192 Call Calendar Tool \u2192 Get Many Events in Google Calendar \u2192If Available \u2192 Create an Event\n\n##Example 3 \u2013 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: \u201cInformation regarding chatbot\u201d\nReply: \u201c\ud83d\udce7 Price details have been sent to your email.\u201d\n\n\n#Rules\n\nAlways confirm unclear details.\n\nNever guess or fabricate responses \u2014 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": "Knowledge Base Agent",
      "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\u2019s requests.\nYou must provide only fact-based answers from the knowledge base\u2014never invent data.\n\nInput Format\nYou will receive customer case details in the following format:\nName: [Customer Name]  \nIssue Description: [Customer\u2019s problem or service request]  \n\n\nOutput Format\nYou must always return results in exactly this format:\n-LIKELY_FAULTS: [1\u20133 likely issues based on symptoms/service requested]  \n-DIAGNOSTIC_FEE: \u00a345 (or \u00a375 if complex electrical/advanced integration work)  \n-PRICE_RANGE: \u00a3[min]\u2013\u00a3[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\u2019s 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 \u201clikely,\u201d \u201ccommonly,\u201d or \u201ctypically\u201d (never definitive).\nApply diagnostic fee:\n\u00a345 standard (basic troubleshooting, configuration).\n\u00a375 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": "Conversation Memory (Postgres)",
      "type": "@n8n/n8n-nodes-langchain.memoryPostgresChat",
      "position": [
        336,
        240
      ],
      "parameters": {
        "sessionKey": "={{ $json.usersMobileNumber }}",
        "sessionIdType": "customKey",
        "contextWindowLength": 50
      },
      "credentials": {
        "postgres": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1.3
    },
    {
      "id": "3c2bac28-e8e4-422f-864f-0cf22382643b",
      "name": "Calendar Agent",
      "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 \u2192 Use for adding new events\n-Get Events \u2192 Use to retrieve the user's calendar schedule\n-Delete Event \u2192 First call Get Events to obtain the event ID, then delete it\n-Update Event \u2192 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 \u2013 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 \u2705 Task: Create Event\nTitle: Meeting with { User\u2019s Name }\n\n\nDate: 2025-09-05\n\n\nTime: 14:00\n\n\nNotes: Quarterly report\n\n\n\nExample 2 \u2013 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 \u2705 Task: Update Event\nID: { Event ID }\n\n\nTitle: Meeting with {User\u2019s Name }\n\n\nDate: 2025-09-06\n\n\nTime: 15:00\n\n\nNotes: Updated schedule\n\n\n\nExample 3 \u2013 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 \u2705 Task: Delete Event\nID: { Event ID }\n\n\n\nExample 4 \u2013 Conflict\nUser: Book a call on 7 September at 10:30 AM.\nAssistant:\n \u274c 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": "Email Agent",
      "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 \u2014 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 \u2705\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 \u2192 Main Content \u2192 Closing \u2192 Signature\nEnsure grammar, clarity, and professionalism\nFor complaints \u2192 acknowledge issue + offer solution\nFor promotions \u2192 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 \u201csend\u201d when explicitly instructed\nKeep formatting consistent with professional email standards\n\nConfirm STATUS: Email Sent \u2705 after sending\n\n\n"
        },
        "promptType": "define"
      },
      "typeVersion": 2.2
    },
    {
      "id": "965d09f8-afff-4081-9fa7-c51d1c619686",
      "name": "Send WhatsApp Reply",
      "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": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "98e1f102-4329-461f-8580-101f21cd847f",
      "name": "Incoming WhatsApp Message",
      "type": "n8n-nodes-base.twilioTrigger",
      "position": [
        -144,
        16
      ],
      "parameters": {
        "updates": [
          "com.twilio.messaging.inbound-message.received"
        ]
      },
      "credentials": {
        "twilioApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "ae42acee-aa3e-428b-9c95-e762ff83cbd3",
      "name": "Format Incoming Message",
      "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": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -240,
        -224
      ],
      "parameters": {
        "color": 4,
        "width": 1264,
        "height": 608,
        "content": "\ud83e\udd16 **Main WhatsApp AI Agent**  \nThis is the core assistant that handles incoming WhatsApp messages (via Twilio).  \nIt uses memory + connected tools to understand the request and decide the right action.  \n\nCapabilities:  \n- Understand natural language queries.  \n- Decide whether to use Calendar, Knowledge Base, or Email.  \n- Keep track of the conversation context.  \n- Reply back to the customer on WhatsApp.  \n\nThink of this agent as the **orchestrator** \u2014 it routes tasks to other specialised agents or tools.  \n"
      },
      "typeVersion": 1
    },
    {
      "id": "4da17b9c-aba3-479f-bf74-a82b3910663c",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1152,
        -288
      ],
      "parameters": {
        "color": 3,
        "width": 848,
        "height": 720,
        "content": "\ud83d\udcc5 **Calendar Agent**  \nThis agent connects with Google Calendar to manage scheduling.  \n\nCapabilities:  \n- Check availability (get all events).  \n- Create new events.  \n- Delete existing events.  \n\nUse case examples:  \n- \"Book me a meeting with John tomorrow at 3 PM.\"  \n- \"What\u2019s on my schedule next Friday?\"  \n"
      },
      "typeVersion": 1
    },
    {
      "id": "89696739-72bf-4369-8b19-92798fc7d7de",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        16,
        400
      ],
      "parameters": {
        "color": 5,
        "width": 1056,
        "height": 496,
        "content": "\ud83d\udcda **Knowledge Base Agent**  \nThis agent answers FAQs and retrieves information from your Supabase Vector Store.  \n\nHow it works:  \n- User asks a question \u2192 embeddings are created with OpenAI \u2192 best matches are pulled from Supabase.  \n- The AI uses those results to give an accurate answer.  \n\nUse case examples:  \n- \"What is your refund policy?\"  \n- \"How do I reset my company email password?\"  \n"
      },
      "typeVersion": 1
    },
    {
      "id": "d9e5fc2a-233c-45ac-b830-e4587f710d0d",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -896,
        464
      ],
      "parameters": {
        "color": 6,
        "width": 816,
        "height": 448,
        "content": "\ud83d\udce7 **Email Agent**  \nThis agent drafts and sends professional emails using Gmail.  \n\nCapabilities:  \n- Generate AI-written emails based on WhatsApp requests.  \n- Send messages through your connected Gmail account.  \n\nUse case examples:  \n- \"Send a follow-up email to Sarah confirming our meeting.\"  \n- \"Email the client the latest project update.\"  \n"
      },
      "typeVersion": 1
    }
  ],
  "active": false,
  "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
          }
        ]
      ]
    }
  }
}

Credentials you'll need

Each integration node will prompt for credentials when you import. We strip credential IDs before publishing — you'll add your own.

Pro

For the full experience including quality scoring and batch install features for each workflow upgrade to Pro

About this workflow

This template is for businesses, customer support teams, and professionals who want to deliver AI-powered WhatsApp assistance. It helps automate conversations, schedule meetings, answer FAQs, and send follow-up emails — all from WhatsApp. A customer sends a WhatsApp message,…

Source: https://n8n.io/workflows/8287/ — original creator credit. Request a take-down →

More AI & RAG workflows → · Browse all categories →

Related workflows

Workflows that share integrations, category, or trigger type with this one. All free to copy and import.

AI & RAG

This workflow implements an advanced AI automation agent (OpenClaw Agent) that interacts with users through Telegram and integrates multiple AI models, external tools, and cloud services to automate c

Telegram Trigger, Telegram, OpenAI +21
AI & RAG

Your AI workforce is ready. Are you?

Google Sheets Tool, Mcp Trigger, Google Drive +29
AI & RAG

Who is this for? This workflow is ideal for HR teams, startups, and enterprises that want to handle employee interactions through WhatsApp and automate responses using LLM (OpenAI) and intelligent rou

WhatsApp Trigger, OpenAI, OpenAI Chat +13
AI & RAG

Unleash the full potential of your HighLevel CRM by adding an intelligent GPT-5 Agent that does more than just follow commands — it understands context, retrieves the right data, and executes actions

High Level Tool, Mcp Trigger, Chat Trigger +21
AI & RAG

BambooHR AI-Powered Company Policies and Benefits Chatbot. Uses manualTrigger, documentDefaultDataLoader, embeddingsOpenAi, textSplitterRecursiveCharacterTextSplitter. Event-driven trigger; 50 nodes.

Document Default Data Loader, OpenAI Embeddings, Text Splitter Recursive Character Text Splitter +14