Arabic AI assistant on WhatsApp
Answer customer questions on WhatsApp in friendly Arabic using your own FAQ.
How it works
- Receive the customer's message through the WhatsApp Business Cloud API.
- Give the AI your FAQ and the question, and ask for a short reply in the customer's dialect.
- Reply on WhatsApp, or hand over to a team member if the answer isn't in the FAQ.
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": "Arabic AI assistant on WhatsApp (Flowngn)",
"nodes": [
{
"parameters": {
"content": "## Arabic AI assistant on WhatsApp\nAnswer customer questions on WhatsApp in friendly Arabic 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": "=أنت مساعد واتساب لشركة YOUR_BUSINESS. أجب فقط من الأسئلة الشائعة بالأسفل، بنفس لهجة العميل (مصرية أو خليجية أو فصحى)، في جملة إلى ثلاث جمل قصيرة وبأسلوب ودود. إذا لم تكن الإجابة موجودة، رد بالضبط: \"سؤال ممتاز! هحوّلك لحد من الفريق حالًا.\"\n\nالأسئلة الشائعة:\nYOUR_FAQ_TEXT\n\nالعميل: {{ $json.question }}"
},
"id": "3f36c28d-dcaa-4fe7-afb0-dde2cffcb7d1",
"name": "Answer in Arabic",
"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 in Arabic",
"type": "main",
"index": 0
}
]
]
},
"Answer in Arabic": {
"main": [
[
{
"node": "Reply on WhatsApp",
"type": "main",
"index": 0
}
]
]
},
"Claude model": {
"ai_languageModel": [
[
{
"node": "Answer in Arabic",
"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
- Write your FAQ in simple Arabic — prices, delivery times, return policy, working hours.
- Tell customers they're chatting with an assistant.
Related flows
WhatsApp receipt for Paymob payments
When a Paymob payment succeeds, the customer gets a WhatsApp receipt instantly.
WhatsApp order confirmation for Salla
Customers of your Salla store get a WhatsApp message the moment they order.
Confirm cash-on-delivery orders on WhatsApp
Ask COD customers to confirm their order on WhatsApp before you ship — fewer fake orders.