WhatsApp sales AI agent (Arabic)
Sells on WhatsApp in the customer's own dialect: checks your catalog, answers questions and takes cash-on-delivery orders.
How it works
- A customer messages your WhatsApp Business number.
- The agent replies in their dialect and checks your product sheet for prices, sizes and stock.
- When the customer is ready, it confirms every detail and the total, then saves the order.
- It alerts your team on Telegram about new orders or when a person is needed.
What it can do
Unlike a fixed flow, an agent decides which of its tools to use, in what order — and remembers the conversation.
- Chats in Egyptian, Gulf or Standard Arabic — or English
- Checks your catalog before quoting any price or availability
- Suggests alternatives when something is out of stock
- Takes cash-on-delivery orders and saves them to your Orders sheet
- Remembers each customer's conversation by phone number
- Alerts your team on Telegram for new orders and hand-overs
System prompt
The instructions that shape the agent. It's already inside the n8n template — copy it into Make or Zapier, and adjust the YOUR_… parts.
You are the WhatsApp sales assistant for YOUR_STORE, an online store in Egypt.
Reply in the customer's language and dialect (Egyptian Arabic, Gulf Arabic, Modern Standard Arabic or English). Be warm, short and helpful, like a good shop assistant. Use at most one emoji per message.
Tools:
- "Search products": our catalog (name, price, sizes, colors, stock). Always check it before quoting a price or availability.
- "Create order": saves a confirmed order. Use it ONLY after the customer has confirmed product, size, quantity, full name, phone, city and address, and you have repeated the total back to them.
- "Notify team": alerts our team. Use it for every new order, and when the customer asks for a person or asks something you can't answer.
Rules:
- Never invent products, prices, discounts or delivery times.
- Payment is cash on delivery. Never ask for card details in chat.
- If a product is out of stock, suggest the closest alternative from the catalog.
- If the customer asks for a human, use "Notify team" and tell them someone will reply soon.Safety rules
Built into the prompt and the tools:
- Never invents products, prices or discounts
- Repeats the order and total for confirmation before saving
- Never asks for card details — cash on delivery only
Uses your own AI key (Claude, OpenAI or another model). Cost depends on the model and conversation length — a small, fast model keeps most conversations to a fraction of a cent.
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 (297 lines)
{
"name": "WhatsApp sales AI agent (Arabic) (Flowngn)",
"nodes": [
{
"parameters": {
"content": "## WhatsApp sales AI agent (Arabic)\nSells on WhatsApp in the customer's own dialect: checks your catalog, answers questions and takes cash-on-delivery orders.\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": "={{ $json.question }}",
"options": {
"systemMessage": "=You are the WhatsApp sales assistant for YOUR_STORE, an online store in Egypt.\n\nReply in the customer's language and dialect (Egyptian Arabic, Gulf Arabic, Modern Standard Arabic or English). Be warm, short and helpful, like a good shop assistant. Use at most one emoji per message.\n\nTools:\n- \"Search products\": our catalog (name, price, sizes, colors, stock). Always check it before quoting a price or availability.\n- \"Create order\": saves a confirmed order. Use it ONLY after the customer has confirmed product, size, quantity, full name, phone, city and address, and you have repeated the total back to them.\n- \"Notify team\": alerts our team. Use it for every new order, and when the customer asks for a person or asks something you can't answer.\n\nRules:\n- Never invent products, prices, discounts or delivery times.\n- Payment is cash on delivery. Never ask for card details in chat.\n- If a product is out of stock, suggest the closest alternative from the catalog.\n- If the customer asks for a human, use \"Notify team\" and tell them someone will reply soon."
}
},
"id": "3f36c28d-dcaa-4fe7-afb0-dde2cffcb7d1",
"name": "Sales agent",
"type": "@n8n/n8n-nodes-langchain.agent",
"typeVersion": 1.9,
"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": [
260,
220
]
},
{
"parameters": {
"sessionIdType": "customKey",
"sessionKey": "={{ $('Get question').item.json.from }}",
"contextWindowLength": 10
},
"id": "3f36c28d-dcaa-4fe7-afb0-dde2cffcb7d1",
"name": "Memory",
"type": "@n8n/n8n-nodes-langchain.memoryBufferWindow",
"typeVersion": 1.3,
"position": [
430,
220
]
},
{
"parameters": {
"descriptionType": "manual",
"toolDescription": "Returns our product catalog (name, price, sizes, colors, stock). Check it before quoting any price or availability.",
"operation": "read",
"documentId": {
"__rl": true,
"value": "YOUR_SPREADSHEET_ID",
"mode": "id"
},
"sheetName": {
"__rl": true,
"value": "Products",
"mode": "name"
},
"options": {}
},
"id": "3f36c28d-dcaa-4fe7-afb0-dde2cffcb7d1",
"name": "Search products",
"type": "n8n-nodes-base.googleSheetsTool",
"typeVersion": 4.5,
"position": [
600,
220
]
},
{
"parameters": {
"descriptionType": "manual",
"toolDescription": "Saves a confirmed cash-on-delivery order. Only call after the customer confirmed every detail and the total.",
"operation": "append",
"documentId": {
"__rl": true,
"value": "YOUR_SPREADSHEET_ID",
"mode": "id"
},
"sheetName": {
"__rl": true,
"value": "Orders",
"mode": "name"
},
"columns": {
"mappingMode": "defineBelow",
"value": {
"date": "={{ $now.toISO() }}",
"phone": "={{ $('Get question').item.json.from }}",
"name": "={{ $fromAI('name', \"Customer's full name\", 'string') }}",
"product": "={{ $fromAI('product', \"Product name, size and color\", 'string') }}",
"quantity": "={{ $fromAI('quantity', \"Quantity\", 'number') }}",
"total": "={{ $fromAI('total', \"Order total in EGP\", 'number') }}",
"city": "={{ $fromAI('city', \"Delivery city\", 'string') }}",
"address": "={{ $fromAI('address', \"Full delivery address\", 'string') }}"
}
},
"options": {}
},
"id": "3f36c28d-dcaa-4fe7-afb0-dde2cffcb7d1",
"name": "Create order",
"type": "n8n-nodes-base.googleSheetsTool",
"typeVersion": 4.5,
"position": [
770,
220
]
},
{
"parameters": {
"descriptionType": "manual",
"toolDescription": "Sends a message to our team's Telegram group: new orders, requests for a human, or questions you can't answer.",
"chatId": "YOUR_TEAM_CHAT_ID",
"text": "={{ $fromAI('message', \"What the team needs to know, including the customer's phone\", 'string') }}",
"additionalFields": {
"appendAttribution": false
}
},
"id": "3f36c28d-dcaa-4fe7-afb0-dde2cffcb7d1",
"name": "Notify team",
"type": "n8n-nodes-base.telegramTool",
"typeVersion": 1.2,
"position": [
940,
220
]
},
{
"parameters": {
"operation": "send",
"phoneNumberId": "YOUR_PHONE_NUMBER_ID",
"recipientPhoneNumber": "={{ $('Get question').item.json.from }}",
"textBody": "={{ $json.output }}"
},
"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": "Sales agent",
"type": "main",
"index": 0
}
]
]
},
"Sales agent": {
"main": [
[
{
"node": "Reply on WhatsApp",
"type": "main",
"index": 0
}
]
]
},
"Claude model": {
"ai_languageModel": [
[
{
"node": "Sales agent",
"type": "ai_languageModel",
"index": 0
}
]
]
},
"Memory": {
"ai_memory": [
[
{
"node": "Sales agent",
"type": "ai_memory",
"index": 0
}
]
]
},
"Search products": {
"ai_tool": [
[
{
"node": "Sales agent",
"type": "ai_tool",
"index": 0
}
]
]
},
"Create order": {
"ai_tool": [
[
{
"node": "Sales agent",
"type": "ai_tool",
"index": 0
}
]
]
},
"Notify team": {
"ai_tool": [
[
{
"node": "Sales agent",
"type": "ai_tool",
"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)
- Make AI Agents › Run an agent — give it these tools: “Search products” (Google Sheets), “Create order” (Google Sheets), “Notify team” (Telegram Bot); paste the system prompt as the agent's instructions
- 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)
- Zapier Agents — create an agent (or AI by Zapier for a single step) — give it these tools: “Search products” (Google Sheets), “Create order” (Google Sheets), “Notify team” (Telegram); paste the system prompt as the agent's instructions
- 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
- Replies within 24 hours of the customer's message are free-form; later messages need approved templates.
- Keep the Products sheet up to date — the agent trusts it completely.
Related flows
Order & returns AI agent on WhatsApp (Arabic)
Answers "where's my order?", gives delivery updates and logs returns and exchanges — in the customer's dialect.
Real-estate AI agent on WhatsApp
Understands what clients want, suggests matching listings and books viewings — in Arabic or English.
Restaurant ordering AI agent on WhatsApp
Takes delivery orders on WhatsApp from your menu, confirms the total and sends the order to the kitchen.