This workflow corresponds to n8n.io template #8178 — we link there as the canonical source.
This workflow follows the Agent → OpenAI Chat 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": "rZrahxUGdtPKSOoc",
"name": "Keyword Routing (Mini FAQ)",
"tags": [],
"nodes": [
{
"id": "edd3186f-8cf8-489f-9103-165d9759d32b",
"name": "Check Greeting",
"type": "n8n-nodes-base.if",
"position": [
-768,
112
],
"parameters": {
"options": {
"ignoreCase": "={{ true }}"
},
"conditions": {
"options": {
"version": 1,
"leftValue": "",
"caseSensitive": false,
"typeValidation": "strict"
},
"combinator": "or",
"conditions": [
{
"id": "c1e1e2e3-4f5f-6g6g-7h7h-8i8i9j9j0k0k",
"operator": {
"type": "string",
"operation": "contains"
},
"leftValue": "={{ $json.messages[0].text.body.toLowerCase() }}\n",
"rightValue": "=hi"
},
{
"id": "1e3267d4-2e3d-4995-b705-2c8c59b590a1",
"operator": {
"type": "string",
"operation": "contains"
},
"leftValue": "={{ $json.messages[0].text.body.toLowerCase() }}",
"rightValue": "hello"
}
]
}
},
"typeVersion": 2
},
{
"id": "af5b0f4c-ce14-43d3-881a-c95072d6f70f",
"name": "Send Greeting Response",
"type": "n8n-nodes-base.whatsApp",
"position": [
-544,
-96
],
"parameters": {
"textBody": "Hello! \ud83d\udc4b Welcome to our support bot. I can help you with the following: \ud83d\udce6 *Pricing* \u2022 Get details of our plans and offers \ud83d\udee0 *Support* \u2022 Resolve technical issues \u2022 Get contact details for our team \u2139\ufe0f *Other* \u2022 Company information \u2022 Product details What would you like to know?",
"operation": "send",
"phoneNumberId": "817103004812479",
"additionalFields": {},
"recipientPhoneNumber": "={{ $('WhatsApp Trigger1').item.json.contacts[0].wa_id }}"
},
"credentials": {
"whatsAppApi": {
"name": "<your credential>"
}
},
"typeVersion": 1
},
{
"id": "a7a50d6d-938b-4138-b720-4aa2f5aa52c8",
"name": "WhatsApp Trigger1",
"type": "n8n-nodes-base.whatsAppTrigger",
"position": [
-1040,
112
],
"parameters": {
"options": {},
"updates": [
"messages"
]
},
"credentials": {
"whatsAppTriggerApi": {
"name": "<your credential>"
}
},
"typeVersion": 1
},
{
"id": "a54b4ad2-4a5b-41d2-ae9a-9b2f6910d5da",
"name": "Send message1",
"type": "n8n-nodes-base.whatsApp",
"position": [
368,
480
],
"parameters": {
"textBody": "={{ $json.output }}",
"operation": "send",
"phoneNumberId": "=817103004812479",
"additionalFields": {},
"recipientPhoneNumber": "={{ $('WhatsApp Trigger1').item.json.contacts[0].wa_id }}"
},
"credentials": {
"whatsAppApi": {
"name": "<your credential>"
}
},
"typeVersion": 1
},
{
"id": "31321d99-1aa5-4f9f-ac7f-f8936d3d12c9",
"name": "OpenAI Chat Model",
"type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
"position": [
-208,
688
],
"parameters": {
"model": {
"__rl": true,
"mode": "list",
"value": "gpt-4.1-mini"
},
"options": {}
},
"credentials": {
"openAiApi": {
"name": "<your credential>"
}
},
"typeVersion": 1.2
},
{
"id": "3c25549a-078b-47ef-a19c-4bc994004e37",
"name": "AI Agent",
"type": "@n8n/n8n-nodes-langchain.agent",
"position": [
-160,
480
],
"parameters": {
"text": "={{ $json.messages[0].text }}",
"options": {},
"promptType": "define"
},
"typeVersion": 2.1
},
{
"id": "35c31bbf-ac6a-4184-8f95-a23d4e0c4566",
"name": "If",
"type": "n8n-nodes-base.if",
"position": [
-576,
288
],
"parameters": {
"options": {},
"conditions": {
"options": {
"version": 2,
"leftValue": "",
"caseSensitive": true,
"typeValidation": "strict"
},
"combinator": "or",
"conditions": [
{
"id": "cc59a3a2-03fa-408b-a2cf-3ec70b478b16",
"operator": {
"type": "string",
"operation": "contains"
},
"leftValue": "={{ $json.messages[0].text.body.toLowerCase() }}",
"rightValue": "price"
}
]
}
},
"typeVersion": 2.2
},
{
"id": "404e5e11-7299-4a4c-aea6-d69efe927bc3",
"name": "Send Greeting Response1",
"type": "n8n-nodes-base.whatsApp",
"position": [
-368,
112
],
"parameters": {
"textBody": "\ud83d\udce6 *Pricing Details* Our basic package starts at $50/month. Premium plans are also available with additional features. Would you like me to share the full pricing list?",
"operation": "send",
"phoneNumberId": "817103004812479",
"additionalFields": {},
"recipientPhoneNumber": "={{ $('WhatsApp Trigger1').item.json.contacts[0].wa_id }}"
},
"credentials": {
"whatsAppApi": {
"name": "<your credential>"
}
},
"typeVersion": 1
},
{
"id": "2f70d9d8-d5d5-4105-8cea-6b1a9cf57503",
"name": "Send Greeting Response2",
"type": "n8n-nodes-base.whatsApp",
"position": [
-112,
224
],
"parameters": {
"textBody": "\ud83d\udee0 *Support Assistance* For technical help or queries, you can reach us: - \ud83d\udce7 Email: user@example.com - \ud83d\udcde Phone: +1234567890 We\u2019re here 24/7 to help you out!",
"operation": "send",
"phoneNumberId": "817103004812479",
"additionalFields": {},
"recipientPhoneNumber": "={{ $('WhatsApp Trigger1').item.json.contacts[0].wa_id }}"
},
"credentials": {
"whatsAppApi": {
"name": "<your credential>"
}
},
"typeVersion": 1
},
{
"id": "993c1f44-a249-44f9-aaf3-66c5df3ff2e5",
"name": "If1",
"type": "n8n-nodes-base.if",
"position": [
-352,
416
],
"parameters": {
"options": {},
"conditions": {
"options": {
"version": 2,
"leftValue": "",
"caseSensitive": true,
"typeValidation": "strict"
},
"combinator": "and",
"conditions": [
{
"id": "cc388d8e-8f83-4353-b23d-8ac3158a86b2",
"operator": {
"name": "filter.operator.equals",
"type": "string",
"operation": "equals"
},
"leftValue": "={{ $json.messages[0].text.body.toLowerCase() }}",
"rightValue": "support"
}
]
}
},
"typeVersion": 2.2
},
{
"id": "d24ad1c7-ce41-40e2-9b60-a1efc76f121b",
"name": "Sticky Note",
"type": "n8n-nodes-base.stickyNote",
"position": [
-1072,
-64
],
"parameters": {
"width": 176,
"height": 96,
"content": "WhatsApp Trigger: Entry point that captures incoming messages\n"
},
"typeVersion": 1
},
{
"id": "cda0e59a-4229-4df7-90ca-7068f41f7c20",
"name": "Sticky Note1",
"type": "n8n-nodes-base.stickyNote",
"position": [
-816,
-48
],
"parameters": {
"color": 3,
"width": 176,
"height": 96,
"content": "IF Conditions: Sequential checks for predefined responses\n"
},
"typeVersion": 1
},
{
"id": "2f092d5d-dfff-498f-a3ef-cb34a18867f7",
"name": "Sticky Note2",
"type": "n8n-nodes-base.stickyNote",
"position": [
-560,
-208
],
"parameters": {
"color": 6,
"height": 80,
"content": "Response Types: Different greeting responses for various scenarios\n"
},
"typeVersion": 1
},
{
"id": "acda6c71-791c-434c-b8a7-4f58e67563cd",
"name": "Sticky Note3",
"type": "n8n-nodes-base.stickyNote",
"position": [
-368,
0
],
"parameters": {
"color": 2,
"height": 80,
"content": "Response Types: Different greeting responses for various scenarios\n"
},
"typeVersion": 1
},
{
"id": "341e75cf-5630-4dce-8f12-750c17a18596",
"name": "Sticky Note4",
"type": "n8n-nodes-base.stickyNote",
"position": [
-112,
112
],
"parameters": {
"color": 5,
"height": 80,
"content": "Response Types: Different greeting responses for various scenarios\n"
},
"typeVersion": 1
},
{
"id": "b80e1f0a-ba7a-4f28-881d-ee4357f99307",
"name": "Sticky Note5",
"type": "n8n-nodes-base.stickyNote",
"position": [
-656,
432
],
"parameters": {
"color": 4,
"width": 176,
"height": 96,
"content": "IF Conditions: Sequential checks for predefined responses\n"
},
"typeVersion": 1
},
{
"id": "f9d867c5-9bbe-4060-be69-ccecee74f70b",
"name": "Sticky Note6",
"type": "n8n-nodes-base.stickyNote",
"position": [
-416,
576
],
"parameters": {
"color": 3,
"width": 176,
"height": 96,
"content": "IF Conditions: Sequential checks for predefined responses\n"
},
"typeVersion": 1
},
{
"id": "2c33e230-fe81-42a8-81dc-3bec68fcd205",
"name": "Sticky Note7",
"type": "n8n-nodes-base.stickyNote",
"position": [
-48,
720
],
"parameters": {
"color": 7,
"width": 208,
"height": 96,
"content": "AI Agent: LLM processing for complex/dynamic questions\n"
},
"typeVersion": 1
},
{
"id": "8bf74cb4-92f1-418f-b625-0b8a28f30bac",
"name": "Sticky Note8",
"type": "n8n-nodes-base.stickyNote",
"position": [
336,
352
],
"parameters": {
"color": 3,
"width": 192,
"height": 80,
"content": "Final Send Action: Delivers AI-generated responses\n\n"
},
"typeVersion": 1
}
],
"active": false,
"settings": {
"executionOrder": "v1"
},
"versionId": "3e5acb98-a221-47bc-a31b-244bc3ad067b",
"connections": {
"If": {
"main": [
[
{
"node": "Send Greeting Response1",
"type": "main",
"index": 0
}
],
[
{
"node": "If1",
"type": "main",
"index": 0
}
]
]
},
"If1": {
"main": [
[
{
"node": "Send Greeting Response2",
"type": "main",
"index": 0
}
],
[
{
"node": "AI Agent",
"type": "main",
"index": 0
}
]
]
},
"AI Agent": {
"main": [
[
{
"node": "Send message1",
"type": "main",
"index": 0
}
]
]
},
"Check Greeting": {
"main": [
[
{
"node": "Send Greeting Response",
"type": "main",
"index": 0
}
],
[
{
"node": "If",
"type": "main",
"index": 0
}
]
]
},
"OpenAI Chat Model": {
"ai_languageModel": [
[
{
"node": "AI Agent",
"type": "ai_languageModel",
"index": 0
}
]
]
},
"WhatsApp Trigger1": {
"main": [
[
{
"node": "Check Greeting",
"type": "main",
"index": 0
}
]
]
},
"Send Greeting Response1": {
"main": [
[]
]
}
}
}
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.
openAiApiwhatsAppApiwhatsAppTriggerApi
For the full experience including quality scoring and batch install features for each workflow upgrade to Pro
About this workflow
Description:
Source: https://n8n.io/workflows/8178/ — 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.
Transform your salon/service business with this streamlined WhatsApp automation system featuring Claude integration, zero-setup database management, and intelligent conversation handling. Claude MCP I
CashMate – Your AI-Powered WhatsApp Finance Agent Turn WhatsApp into a smart finance assistant that auto-registers you, logs transactions in natural language, extracts data from receipts and voice not
48_WAgentEnhancement. Uses whatsAppTrigger, whatsApp, openAi, httpRequest. Event-driven trigger; 56 nodes.
This workflow creates a complete AI-powered restaurant ordering system through WhatsApp. It receives customer messages, processes multimedia content (text, voice, images, PDFs, location), uses GPT-4 t
This template is designed for anyone who wants to use WhatsApp as a personal AI assistant hub. If you often juggle tasks, emails, calendars, and expenses across multiple tools, this workflow consolida