WhatsApp FAQ assistant
Answer common customer questions on WhatsApp 24/7 using your own FAQ.
How it works
- Receive the customer's message through the WhatsApp Business Cloud API.
- Give an AI agent your FAQ text and the customer's question.
- Reply with the answer, or hand over to a human if it's not covered.
Diagram
Code
JavaScript used in the Code step — already included in the template below.
// Keeps only text messages and pulls out who sent it and what they asked.
const msg = $input.first().json.messages?.[0];
if (!msg || msg.type !== "text") return [];
return [{ json: { from: msg.from, question: msg.text.body } }];Build it
Pick your tool — same automation, step by step.
Copy and paste straight into an n8n canvas (Ctrl+V), or download and use Import from File. Then connect your own credentials and replace every YOUR_… placeholder. AI steps use a Claude model node — swap it for OpenAI, Gemini or Ollama if you prefer.
Show code (151 lines)
{
"name": "WhatsApp FAQ assistant (Flowngn)",
"nodes": [
{
"parameters": {
"content": "## WhatsApp FAQ assistant\nAnswer common customer questions on WhatsApp 24/7 using your own FAQ.\n\n**Setup**\n1. Open each node and connect your own credentials.\n2. Replace every YOUR_… placeholder.\n3. Test once, then activate.\n\nFree template from Flowngn",
"height": 260,
"width": 340
},
"id": "3f36c28d-dcaa-4fe7-afb0-dde2cffcb7d1",
"name": "Setup notes",
"type": "n8n-nodes-base.stickyNote",
"typeVersion": 1,
"position": [
-420,
-60
]
},
{
"parameters": {
"updates": [
"messages"
]
},
"id": "3f36c28d-dcaa-4fe7-afb0-dde2cffcb7d1",
"name": "Incoming message",
"type": "n8n-nodes-base.whatsAppTrigger",
"typeVersion": 1,
"position": [
0,
0
],
"webhookId": "3f36c28d-dcaa-4fe7-afb0-dde2cffcb7d1"
},
{
"parameters": {
"jsCode": "// Keeps only text messages and pulls out who sent it and what they asked.\nconst msg = $input.first().json.messages?.[0];\nif (!msg || msg.type !== \"text\") return [];\n\nreturn [{ json: { from: msg.from, question: msg.text.body } }];"
},
"id": "3f36c28d-dcaa-4fe7-afb0-dde2cffcb7d1",
"name": "Get question",
"type": "n8n-nodes-base.code",
"typeVersion": 2,
"position": [
300,
0
]
},
{
"parameters": {
"promptType": "define",
"text": "=You are the WhatsApp assistant for YOUR_BUSINESS. Answer ONLY using the FAQ below, in the customer's language, in 1–3 short sentences. If the answer is not in the FAQ, reply exactly: \"Good question! Let me connect you with a team member.\"\n\nFAQ:\nYOUR_FAQ_TEXT\n\nCustomer: {{ $json.question }}"
},
"id": "3f36c28d-dcaa-4fe7-afb0-dde2cffcb7d1",
"name": "Answer from FAQ",
"type": "@n8n/n8n-nodes-langchain.chainLlm",
"typeVersion": 1.5,
"position": [
600,
0
]
},
{
"parameters": {
"model": {
"__rl": true,
"value": "claude-sonnet-5",
"mode": "list"
},
"options": {}
},
"id": "3f36c28d-dcaa-4fe7-afb0-dde2cffcb7d1",
"name": "Claude model",
"type": "@n8n/n8n-nodes-langchain.lmChatAnthropic",
"typeVersion": 1.3,
"position": [
600,
220
]
},
{
"parameters": {
"operation": "send",
"phoneNumberId": "YOUR_PHONE_NUMBER_ID",
"recipientPhoneNumber": "={{ $('Get question').item.json.from }}",
"textBody": "={{ $json.text }}"
},
"id": "3f36c28d-dcaa-4fe7-afb0-dde2cffcb7d1",
"name": "Reply on WhatsApp",
"type": "n8n-nodes-base.whatsApp",
"typeVersion": 1,
"position": [
900,
0
]
}
],
"connections": {
"Incoming message": {
"main": [
[
{
"node": "Get question",
"type": "main",
"index": 0
}
]
]
},
"Get question": {
"main": [
[
{
"node": "Answer from FAQ",
"type": "main",
"index": 0
}
]
]
},
"Answer from FAQ": {
"main": [
[
{
"node": "Reply on WhatsApp",
"type": "main",
"index": 0
}
]
]
},
"Claude model": {
"ai_languageModel": [
[
{
"node": "Answer from FAQ",
"type": "ai_languageModel",
"index": 0
}
]
]
}
},
"pinData": {},
"settings": {
"executionOrder": "v1"
},
"meta": {
"templateCredsSetupCompleted": false
},
"tags": []
}In Make, create a new scenario and add these modules in order:
- WhatsApp Business Cloud › Watch Events (messages)
- Tools › Set variable / Iterator + Array aggregator (same logic as the Code step)
- Anthropic Claude › Create a Prompt (or OpenAI › Create a Completion)
- WhatsApp Business Cloud › Send a Message
- Every module run uses Make operations — the free plan includes a monthly quota.
- Make's built-in functions (map, sum, formatDate…) can replace most Code steps; for complex logic use a code module.
- Module and step names can differ slightly as Make and Zapier update their apps.
In Zapier, create a new Zap and add these steps in order:
- WhatsApp — New Message
- Code by Zapier — Run JavaScript (paste the code from the Code section)
- Anthropic (Claude) — Send Message (or ChatGPT — Conversation)
- WhatsApp — Send Message
- Zaps with more than two steps need a paid Zapier plan.
- Webhooks, Filters/Paths and Code by Zapier are premium features on some Zapier plans.
- Code by Zapier runs JavaScript: reuse the code shown above, reading inputs from inputData instead of $json.
- Module and step names can differ slightly as Make and Zapier update their apps.
Tips
- Only use the official WhatsApp API — unofficial tools get numbers banned.
- Tell customers they're chatting with an assistant.
Related flows
AI triage for support emails
AI labels every support email (billing, bug, question) and routes it to the right place.
Catch unhappy customers from feedback forms
AI reads every feedback response and alerts you instantly when it's negative.
Translate foreign-language support emails
AI translates non-English support emails and posts the translation to Slack.