This workflow corresponds to n8n.io template #5516 — we link there as the canonical source.
This workflow follows the WhatsApp → WhatsApp Trigger 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 →
{
"id": "AJtSW2QeCg45qtIh",
"meta": {
"templateCredsSetupCompleted": true
},
"name": "Support bot",
"tags": [],
"nodes": [
{
"id": "c9cbc315-75dd-4ca4-875c-b9a22fba03d7",
"name": "Incoming WhatsApp Messages",
"type": "n8n-nodes-base.whatsAppTrigger",
"position": [
-1820,
120
],
"parameters": {
"options": {},
"updates": [
"messages"
]
},
"typeVersion": 1
},
{
"id": "b1a466e1-3d1b-4494-a7d9-0cc2ee1e8202",
"name": "Filter Text Messages Only",
"type": "n8n-nodes-base.if",
"position": [
-1520,
120
],
"parameters": {
"options": {},
"conditions": {
"options": {
"version": 2,
"leftValue": "",
"caseSensitive": true,
"typeValidation": "strict"
},
"combinator": "and",
"conditions": [
{
"operator": {
"type": "string",
"operation": "equals"
},
"leftValue": "={{ $json.messages[0].type }}",
"rightValue": "text"
}
]
}
},
"typeVersion": 2
},
{
"id": "298eccc9-0b1a-477f-a153-074972098072",
"name": "Extract Message Content",
"type": "n8n-nodes-base.set",
"position": [
-1260,
20
],
"parameters": {
"options": {},
"assignments": {
"assignments": [
{
"id": "message-text",
"name": "message_text",
"type": "string",
"value": "={{ $json.messages[0].text.body.toLowerCase().trim() }}"
},
{
"id": "sender-phone",
"name": "sender_phone",
"type": "string",
"value": "={{ $json.messages[0].from }}"
},
{
"id": "message-id",
"name": "message_id",
"type": "string",
"value": "={{ $json.messages[0].id }}"
}
]
}
},
"typeVersion": 3.4
},
{
"id": "8ac8d5d8-d328-4809-b85e-dd954a1bf307",
"name": "FAQ Keyword Detection",
"type": "n8n-nodes-base.switch",
"position": [
-1020,
20
],
"parameters": {
"rules": {
"values": [
{
"outputKey": "Business Hours",
"conditions": {
"options": {
"version": 2,
"leftValue": "",
"caseSensitive": false,
"typeValidation": "strict"
},
"combinator": "or",
"conditions": [
{
"operator": {
"type": "string",
"operation": "contains"
},
"leftValue": "={{ $json.message_text }}",
"rightValue": "hours"
},
{
"operator": {
"type": "string",
"operation": "contains"
},
"leftValue": "={{ $json.message_text }}",
"rightValue": "open"
},
{
"operator": {
"type": "string",
"operation": "contains"
},
"leftValue": "={{ $json.message_text }}",
"rightValue": "close"
},
{
"operator": {
"type": "string",
"operation": "contains"
},
"leftValue": "={{ $json.message_text }}",
"rightValue": "time"
}
]
},
"renameOutput": true
},
{
"outputKey": "Pricing",
"conditions": {
"options": {
"version": 2,
"leftValue": "",
"caseSensitive": false,
"typeValidation": "strict"
},
"combinator": "or",
"conditions": [
{
"operator": {
"type": "string",
"operation": "contains"
},
"leftValue": "={{ $json.message_text }}",
"rightValue": "price"
},
{
"operator": {
"type": "string",
"operation": "contains"
},
"leftValue": "={{ $json.message_text }}",
"rightValue": "cost"
},
{
"operator": {
"type": "string",
"operation": "contains"
},
"leftValue": "={{ $json.message_text }}",
"rightValue": "fee"
},
{
"operator": {
"type": "string",
"operation": "contains"
},
"leftValue": "={{ $json.message_text }}",
"rightValue": "money"
}
]
},
"renameOutput": true
},
{
"outputKey": "Location",
"conditions": {
"options": {
"version": 2,
"leftValue": "",
"caseSensitive": false,
"typeValidation": "strict"
},
"combinator": "or",
"conditions": [
{
"operator": {
"type": "string",
"operation": "contains"
},
"leftValue": "={{ $json.message_text }}",
"rightValue": "address"
},
{
"operator": {
"type": "string",
"operation": "contains"
},
"leftValue": "={{ $json.message_text }}",
"rightValue": "location"
},
{
"operator": {
"type": "string",
"operation": "contains"
},
"leftValue": "={{ $json.message_text }}",
"rightValue": "where"
},
{
"operator": {
"type": "string",
"operation": "contains"
},
"leftValue": "={{ $json.message_text }}",
"rightValue": "find"
}
]
},
"renameOutput": true
},
{
"outputKey": "Contact",
"conditions": {
"options": {
"version": 2,
"leftValue": "",
"caseSensitive": false,
"typeValidation": "strict"
},
"combinator": "or",
"conditions": [
{
"operator": {
"type": "string",
"operation": "contains"
},
"leftValue": "={{ $json.message_text }}",
"rightValue": "contact"
},
{
"operator": {
"type": "string",
"operation": "contains"
},
"leftValue": "={{ $json.message_text }}",
"rightValue": "phone"
},
{
"operator": {
"type": "string",
"operation": "contains"
},
"leftValue": "={{ $json.message_text }}",
"rightValue": "email"
},
{
"operator": {
"type": "string",
"operation": "contains"
},
"leftValue": "={{ $json.message_text }}",
"rightValue": "support"
}
]
},
"renameOutput": true
},
{
"outputKey": "Greeting",
"conditions": {
"options": {
"version": 2,
"leftValue": "",
"caseSensitive": false,
"typeValidation": "strict"
},
"combinator": "or",
"conditions": [
{
"operator": {
"type": "string",
"operation": "contains"
},
"leftValue": "={{ $json.message_text }}",
"rightValue": "hello"
},
{
"operator": {
"type": "string",
"operation": "contains"
},
"leftValue": "={{ $json.message_text }}",
"rightValue": "hi"
},
{
"operator": {
"type": "string",
"operation": "contains"
},
"leftValue": "={{ $json.message_text }}",
"rightValue": "hey"
},
{
"operator": {
"type": "string",
"operation": "contains"
},
"leftValue": "={{ $json.message_text }}",
"rightValue": "start"
}
]
},
"renameOutput": true
}
]
},
"options": {}
},
"typeVersion": 3.2
},
{
"id": "2463ba09-2047-4f09-bd95-9fd22e18d6c6",
"name": "Business Hours Response",
"type": "n8n-nodes-base.set",
"position": [
-720,
-200
],
"parameters": {
"options": {},
"assignments": {
"assignments": [
{
"id": "response-text",
"name": "response_text",
"type": "string",
"value": "\ud83d\udd50 *Business Hours*\n\nMonday - Friday: 9:00 AM - 6:00 PM\nSaturday: 10:00 AM - 4:00 PM\nSunday: Closed\n\nWe're currently {{ new Date().getHours() >= 9 && new Date().getHours() < 18 ? 'OPEN' : 'CLOSED' }} \ud83d\udfe2\n\nNeed immediate help? Type 'contact' for our support details!"
}
]
}
},
"typeVersion": 3.4
},
{
"id": "a6d20145-ed74-40b4-bb4d-f51c1d9e8d79",
"name": "Pricing Information Response",
"type": "n8n-nodes-base.set",
"position": [
-720,
-100
],
"parameters": {
"options": {},
"assignments": {
"assignments": [
{
"id": "response-text",
"name": "response_text",
"type": "string",
"value": "\ud83d\udcb0 *Our Pricing Plans*\n\n\u2022 **Basic Package**: $29/month\n\u2022 **Pro Package**: $59/month \n\u2022 **Enterprise**: $99/month\n\n\u2728 All packages include:\n\u2705 24/7 support\n\u2705 Free setup\n\u2705 30-day money-back guarantee\n\nWant a custom quote? Type 'contact' to speak with our team!"
}
]
}
},
"typeVersion": 3.4
},
{
"id": "44f08566-7f73-4596-b51e-4b877a18b283",
"name": "Location Information Response",
"type": "n8n-nodes-base.set",
"position": [
-720,
20
],
"parameters": {
"options": {},
"assignments": {
"assignments": [
{
"id": "response-text",
"name": "response_text",
"type": "string",
"value": "\ud83d\udccd *Find Our Office*\n\n\ud83c\udfe2 **Main Office:**\n123 Business Street\nNew York, NY 10001\nUSA\n\n\ud83d\ude87 Nearest Metro: Times Square\n\ud83c\udd7f\ufe0f Parking: Available on-site\n\n\ud83d\udcf1 Want directions? \nGoogle Maps: bit.ly/ouroffice\n\nPlanning a visit? Type 'hours' to check if we're open!"
}
]
}
},
"typeVersion": 3.4
},
{
"id": "ab28d851-6e0f-482b-8588-ddebddc232d7",
"name": "Contact Information Response",
"type": "n8n-nodes-base.set",
"position": [
-720,
120
],
"parameters": {
"options": {},
"assignments": {
"assignments": [
{
"id": "response-text",
"name": "response_text",
"type": "string",
"value": "\ud83d\udcde *Contact Information*\n\n\ud83d\udd25 **Priority Support:**\n\u2022 Phone: +1234567890\n\u2022 Email: user@example.com\n\u2022 Live Chat: Available on our website\n\n\ud83d\udcac **Social Media:**\n\u2022 Twitter: @company\n\u2022 LinkedIn: /company/ourcompany\n\n\u26a1 **Response Times:**\n\u2022 Phone: Immediate\n\u2022 Email: Within 2 hours\n\u2022 WhatsApp: You're already here! \ud83d\ude0a"
}
]
}
},
"typeVersion": 3.4
},
{
"id": "d0544cdd-210a-4041-9955-cfb421e80a8b",
"name": "Welcome Menu Response",
"type": "n8n-nodes-base.set",
"position": [
-720,
220
],
"parameters": {
"options": {},
"assignments": {
"assignments": [
{
"id": "response-text",
"name": "response_text",
"type": "string",
"value": "\ud83d\udc4b *Welcome to our support!*\n\nI'm here to help you 24/7. What can I assist you with today?\n\n\ud83d\udccb **Quick Menu:**\n\u2022 Type 'hours' - Business hours\n\u2022 Type 'pricing' - Our packages\n\u2022 Type 'location' - Find our office\n\u2022 Type 'contact' - Support details\n\n\ud83d\udca1 **Pro tip:** Just type what you need, and I'll understand! \n\nExample: \"What are your prices?\" or \"When are you open?\""
}
]
}
},
"typeVersion": 3.4
},
{
"id": "e08b7a63-c334-44cb-bf93-f876fe0dfe2e",
"name": "Helpful Fallback Response",
"type": "n8n-nodes-base.set",
"position": [
-720,
320
],
"parameters": {
"options": {},
"assignments": {
"assignments": [
{
"id": "response-text",
"name": "response_text",
"type": "string",
"value": "\ud83e\udd14 *I didn't quite understand that...*\n\nNo worries! Here's what I can help you with:\n\n\ud83d\udccb **Available Commands:**\n\u2022 'hours' - Business hours\n\u2022 'pricing' - Package information \n\u2022 'location' - Office address\n\u2022 'contact' - Support details\n\u2022 'hello' - Show main menu\n\n\ud83d\udd0d **Or simply ask:**\n\u2022 \"When are you open?\"\n\u2022 \"How much does it cost?\"\n\u2022 \"Where are you located?\"\n\n\ud83d\udc68\u200d\ud83d\udcbc Need to speak with a human? Type 'contact' for our support team!"
}
]
}
},
"typeVersion": 3.4
},
{
"id": "5c1d8fdc-df5d-4f7e-97f6-357538b6080d",
"name": "Send WhatsApp Reply",
"type": "n8n-nodes-base.whatsApp",
"position": [
-420,
60
],
"parameters": {
"textBody": "={{ $json.response_text }}",
"operation": "send",
"phoneNumberId": "REPLACE_WITH_YOUR_PHONE_NUMBER_ID",
"additionalFields": {
"previewUrl": false
},
"recipientPhoneNumber": "={{ $('Extract Message Content').item.json.sender_phone }}"
},
"typeVersion": 1
},
{
"id": "240af2fb-c864-4d2e-883b-57a5a04c9589",
"name": "Handle Unsupported Message Types",
"type": "n8n-nodes-base.whatsApp",
"position": [
-1260,
220
],
"parameters": {
"textBody": "\ud83d\udcdd I can only process text messages at the moment.\n\nPlease send your question as a text message, and I'll be happy to help! \ud83d\ude0a\n\nType 'hello' to see what I can help you with.",
"operation": "send",
"phoneNumberId": "REPLACE_WITH_YOUR_PHONE_NUMBER_ID",
"additionalFields": {
"previewUrl": false
},
"recipientPhoneNumber": "={{ $json.messages[0].from }}"
},
"typeVersion": 1
},
{
"id": "ce073ef5-4d57-4601-863a-542f489da17e",
"name": "Main Workflow Explanation",
"type": "n8n-nodes-base.stickyNote",
"position": [
-2320,
-160
],
"parameters": {
"color": 4,
"width": 450,
"height": 1140,
"content": "# \ud83d\udcf1 WhatsApp Customer Support Bot\n\n## What This Workflow Does\nAutomated WhatsApp chatbot that provides instant customer support by responding to common questions with pre-defined answers based on keyword detection.\n\n## How It Works\n1. **WhatsApp Listener**: Receives incoming messages 24/7\n2. **Message Filtering**: Processes only text messages\n3. **Keyword Detection**: Analyzes message content for FAQ topics\n4. **Smart Responses**: Sends appropriate pre-written responses\n5. **Fallback Handling**: Provides helpful guidance for unknown queries\n\n## Supported Topics\n\ud83d\udd50 **Business Hours** - Hours, open/close times\n\ud83d\udcb0 **Pricing** - Packages, costs, fees\n\ud83d\udccd **Location** - Address, directions, office info\n\ud83d\udcde **Contact** - Phone, email, support details\n\ud83d\udc4b **Greetings** - Welcome message with menu\n\n## Smart Features\n\u2705 Case-insensitive keyword matching\n\u2705 Natural language understanding\n\u2705 Professional formatted responses\n\u2705 Menu-driven navigation\n\u2705 Graceful fallback for unknown queries\n\n## Setup Required\n1. WhatsApp Business API account\n2. Phone Number ID from Meta\n3. Configure webhook URLs\n4. Customize responses for your business\n5. Activate workflow\n\n## Perfect For\n\u2022 Small businesses needing 24/7 support\n\u2022 FAQ automation\n\u2022 Reducing support team workload\n\u2022 Instant customer responses\n\n**Handles 80% of common customer questions automatically.**"
},
"typeVersion": 1
},
{
"id": "00ea9ba6-8b6e-4535-bc96-3d4900849a36",
"name": "Step 1 - Message Reception",
"type": "n8n-nodes-base.stickyNote",
"position": [
-2120,
-500
],
"parameters": {
"color": 7,
"width": 300,
"height": 300,
"content": "## Step 1: Message Reception\n\n**WhatsApp Trigger** receives all incoming messages from customers 24/7\n\n**Setup**: Requires WhatsApp Business API\n**Webhook**: Automatically configured\n\n*Listens constantly for customer messages*"
},
"typeVersion": 1
},
{
"id": "cac18dfa-16c6-4db6-996c-c0823981d15a",
"name": "Step 2 - Message Type Filter",
"type": "n8n-nodes-base.stickyNote",
"position": [
-1740,
-500
],
"parameters": {
"color": 7,
"width": 300,
"height": 300,
"content": "## Step 2: Message Type Filter\n\n**IF Node** ensures we only process text messages\n\n\u2705 **Text Messages**: Continue to processing\n\u274c **Other Types**: Send friendly error message\n\n*Keeps bot focused and reliable*"
},
"typeVersion": 1
},
{
"id": "ffc8672d-1bb8-445b-9a45-6f856a0e532b",
"name": "Step 3 - Data Extraction",
"type": "n8n-nodes-base.stickyNote",
"position": [
-1360,
-480
],
"parameters": {
"color": 7,
"width": 300,
"height": 240,
"content": "## Step 3: Data Extraction\n\n**Set Node** extracts and cleans message data:\n\u2022 Message text (lowercase, trimmed)\n\u2022 Sender phone number\n\u2022 Message ID\n\n*Prepares data for keyword matching*"
},
"typeVersion": 1
},
{
"id": "1aedc060-7858-4a40-910e-c779c6cd9363",
"name": "Step 4 - Keyword Detection",
"type": "n8n-nodes-base.stickyNote",
"position": [
-1020,
-480
],
"parameters": {
"color": 7,
"width": 300,
"height": 260,
"content": "## Step 4: Keyword Detection\n\n**Switch Node** analyzes message content:\n\u2022 Multiple keywords per category\n\u2022 Case-insensitive matching\n\u2022 Natural language friendly\n\u2022 Fallback for unknown queries\n\n*Intelligent message routing*"
},
"typeVersion": 1
},
{
"id": "4a0bd23c-4e6d-4bda-b985-86e970107632",
"name": "Step 5 - Response Generation",
"type": "n8n-nodes-base.stickyNote",
"position": [
-600,
-480
],
"parameters": {
"color": 7,
"width": 350,
"height": 300,
"content": "## Step 5: Response Generation\n\n**Set Nodes** create professional responses:\n\u2022 Business hours with real-time status\n\u2022 Detailed pricing information\n\u2022 Complete location details\n\u2022 Contact information\n\u2022 Welcome menu for navigation\n\u2022 Helpful fallback messages\n\n*Consistent, professional communication*"
},
"typeVersion": 1
},
{
"id": "01fe32eb-6a51-4837-9323-9ec4d86579e5",
"name": "Step 6 - Message Delivery",
"type": "n8n-nodes-base.stickyNote",
"position": [
-200,
-120
],
"parameters": {
"color": 7,
"width": 300,
"height": 280,
"content": "## Step 6: Message Delivery\n\n**WhatsApp Node** sends formatted response back to customer\n\n\u2022 Instant delivery\n\u2022 Professional formatting\n\u2022 Emoji enhancement\n\n*Complete the customer service loop*"
},
"typeVersion": 1
}
],
"active": false,
"settings": {
"executionOrder": "v1"
},
"versionId": "f1942fbc-84ed-45d8-b613-147cb9c87a05",
"connections": {
"FAQ Keyword Detection": {
"main": [
[
{
"node": "Business Hours Response",
"type": "main",
"index": 0
}
],
[
{
"node": "Pricing Information Response",
"type": "main",
"index": 0
}
],
[
{
"node": "Location Information Response",
"type": "main",
"index": 0
}
],
[
{
"node": "Contact Information Response",
"type": "main",
"index": 0
}
],
[
{
"node": "Welcome Menu Response",
"type": "main",
"index": 0
}
]
]
},
"Welcome Menu Response": {
"main": [
[
{
"node": "Send WhatsApp Reply",
"type": "main",
"index": 0
}
]
]
},
"Business Hours Response": {
"main": [
[
{
"node": "Send WhatsApp Reply",
"type": "main",
"index": 0
}
]
]
},
"Extract Message Content": {
"main": [
[
{
"node": "FAQ Keyword Detection",
"type": "main",
"index": 0
}
]
]
},
"Filter Text Messages Only": {
"main": [
[
{
"node": "Extract Message Content",
"type": "main",
"index": 0
}
],
[
{
"node": "Handle Unsupported Message Types",
"type": "main",
"index": 0
}
]
]
},
"Helpful Fallback Response": {
"main": [
[
{
"node": "Send WhatsApp Reply",
"type": "main",
"index": 0
}
]
]
},
"Incoming WhatsApp Messages": {
"main": [
[
{
"node": "Filter Text Messages Only",
"type": "main",
"index": 0
}
]
]
},
"Contact Information Response": {
"main": [
[
{
"node": "Send WhatsApp Reply",
"type": "main",
"index": 0
}
]
]
},
"Pricing Information Response": {
"main": [
[
{
"node": "Send WhatsApp Reply",
"type": "main",
"index": 0
}
]
]
},
"Location Information Response": {
"main": [
[
{
"node": "Send WhatsApp Reply",
"type": "main",
"index": 0
}
]
]
}
}
}
For the full experience including quality scoring and batch install features for each workflow upgrade to Pro
About this workflow
How it works: This bot operates in a continuous WhatsApp monitoring loop. It analyzes messages to detect keywords in common questions (like hours, prices, and location) and sends automatic replies with predefined information. For unrecognized questions, it directs the user to…
Source: https://n8n.io/workflows/5516/ — original creator credit. Request a take-down →
Related workflows
Workflows that share integrations, category, or trigger type with this one. All free to copy and import.
This workflow is designed for businesses or organizations looking to collect and store user responses from questionnaires via a WhatsApp bot, with data saved in a Postgres database.
Create viral TikTok videos effortlessly — no editing skills required!
Splitout Googlecalendar. Uses gmail, googleCalendar, lmChatOpenAi, informationExtractor. Event-driven trigger; 61 nodes.
Loan eligibility workflow. Uses formTrigger, googleSheets, gmail. Event-driven trigger; 53 nodes.
spy tool. Uses gmailTool, httpRequest, formTrigger, stopAndError. Event-driven trigger; 52 nodes.