وكيل ذكي للطلبات والمرتجعات على واتساب (بالعربية)
يجيب عن "طلبي فين؟"، ويعطي تحديثات التوصيل، ويسجل المرتجعات والاستبدال — بلهجة العميل.
كيف تعمل
- يسأل العميل عن طلبه على واتساب.
- يجد الوكيل الطلب برقمه أو برقم هاتف العميل.
- يشارك الحالة ورقم التتبع، أو يسجل طلب مرتجع أو استبدال بعد تأكيد التفاصيل.
- ينبّه فريقك على تيليجرام للمرتجعات وأي شيء لا يستطيع حله.
ماذا يستطيع أن يفعل
على عكس الأتمتة الثابتة، يقرر الوكيل أي أدواته يستخدم وبأي ترتيب — ويتذكر المحادثة.
- يجد الطلبات برقم الطلب — أو تلقائيًا برقم هاتف العميل
- يشارك الحالة وشركة الشحن ورقم التتبع
- يسجل طلبات المرتجع والاستبدال بالمنتج والسبب واختيار الاسترداد أو الاستبدال
- يشرح سياسة الاسترجاع الخاصة بك
- ينبّه فريقك للمرتجعات والمنتجات التالفة والتحويل لموظف
التعليمات (System prompt)
التعليمات التي تشكّل سلوك الوكيل. موجودة بالفعل داخل قالب n8n — انسخها إلى Make أو Zapier، وعدّل أجزاء YOUR_….
You are the after-sales assistant for YOUR_STORE on WhatsApp. Reply in the customer's language and dialect (Egyptian Arabic, Gulf Arabic, Modern Standard Arabic or English). Be warm and brief.
You handle: "where is my order?", delivery updates, returns and exchanges.
Tools:
- "Look up order": finds orders by order number or by the customer's phone. Returns status, items, total, courier and tracking number.
- "Create return request": logs a return or exchange request. Use only after the customer confirms which item, the reason, and whether they want a refund or an exchange.
- "Notify team": alerts our team for every return request, damaged item, or anything you can't solve.
Our policy: YOUR_RETURN_POLICY (e.g. returns within 14 days, unused, with tags).
Rules:
- The customer's phone is {{ $('Get question').item.json.from }} — try it first if they don't give an order number.
- Never promise refunds, dates or compensation. Say the team will confirm.
- Never invent order details; if you can't find the order, ask for the order number.قواعد الأمان
مدمجة في التعليمات والأدوات:
- لا يعد باسترداد أو مواعيد أو تعويضات — الفريق هو من يؤكد
- لا يخترع تفاصيل الطلبات أبدًا
- يؤكد تفاصيل المرتجع قبل تسجيله
يستخدم مفتاح الذكاء الاصطناعي الخاص بك (Claude أو OpenAI أو غيرهما). التكلفة تعتمد على النموذج وطول المحادثة — والنموذج الصغير السريع يجعل معظم المحادثات بجزء من السنت.
المخطط
الكود
كود JavaScript المستخدم في خطوات Code، وهو مضمَّن بالفعل في القالب بالأسفل.
// 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 } }];ابنِها بأداتك
اختر أداتك — نفس الأتمتة، خطوة بخطوة.
انسخه والصقه مباشرة في مساحة عمل n8n (Ctrl+V)، أو حمّله واستخدم Import from File. بعد ذلك اربط حساباتك واستبدل كل قيمة تبدأ بـ YOUR_. خطوات الذكاء الاصطناعي تستخدم نموذج Claude، ويمكنك استبداله بـ OpenAI أو Gemini أو Ollama.
عرض الكود (304 سطر)
{
"name": "وكيل ذكي للطلبات والمرتجعات على واتساب (بالعربية) (Flowngn)",
"nodes": [
{
"parameters": {
"content": "## وكيل ذكي للطلبات والمرتجعات على واتساب (بالعربية)\nيجيب عن \"طلبي فين؟\"، ويعطي تحديثات التوصيل، ويسجل المرتجعات والاستبدال — بلهجة العميل.\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": "329e2b17-62e3-40d1-a6e5-e475fee4c948",
"name": "Setup notes",
"type": "n8n-nodes-base.stickyNote",
"typeVersion": 1,
"position": [
-420,
-60
]
},
{
"parameters": {
"updates": [
"messages"
]
},
"id": "329e2b17-62e3-40d1-a6e5-e475fee4c948",
"name": "Incoming message",
"type": "n8n-nodes-base.whatsAppTrigger",
"typeVersion": 1,
"position": [
0,
0
],
"webhookId": "329e2b17-62e3-40d1-a6e5-e475fee4c948"
},
{
"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": "329e2b17-62e3-40d1-a6e5-e475fee4c948",
"name": "Get question",
"type": "n8n-nodes-base.code",
"typeVersion": 2,
"position": [
300,
0
]
},
{
"parameters": {
"promptType": "define",
"text": "={{ $json.question }}",
"options": {
"systemMessage": "=You are the after-sales assistant for YOUR_STORE on WhatsApp. Reply in the customer's language and dialect (Egyptian Arabic, Gulf Arabic, Modern Standard Arabic or English). Be warm and brief.\n\nYou handle: \"where is my order?\", delivery updates, returns and exchanges.\n\nTools:\n- \"Look up order\": finds orders by order number or by the customer's phone. Returns status, items, total, courier and tracking number.\n- \"Create return request\": logs a return or exchange request. Use only after the customer confirms which item, the reason, and whether they want a refund or an exchange.\n- \"Notify team\": alerts our team for every return request, damaged item, or anything you can't solve.\n\nOur policy: YOUR_RETURN_POLICY (e.g. returns within 14 days, unused, with tags).\n\nRules:\n- The customer's phone is {{ $('Get question').item.json.from }} — try it first if they don't give an order number.\n- Never promise refunds, dates or compensation. Say the team will confirm.\n- Never invent order details; if you can't find the order, ask for the order number."
}
},
"id": "329e2b17-62e3-40d1-a6e5-e475fee4c948",
"name": "After-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": "329e2b17-62e3-40d1-a6e5-e475fee4c948",
"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": "329e2b17-62e3-40d1-a6e5-e475fee4c948",
"name": "Memory",
"type": "@n8n/n8n-nodes-langchain.memoryBufferWindow",
"typeVersion": 1.3,
"position": [
430,
220
]
},
{
"parameters": {
"descriptionType": "manual",
"toolDescription": "Finds orders by order number or phone. Returns status, items, total, courier and tracking number.",
"operation": "read",
"documentId": {
"__rl": true,
"value": "YOUR_SPREADSHEET_ID",
"mode": "id"
},
"sheetName": {
"__rl": true,
"value": "Orders",
"mode": "name"
},
"filtersUI": {
"values": [
{
"lookupColumn": "={{ $fromAI('column', \"Which column to search: order_id or phone\", 'string') }}",
"lookupValue": "={{ $fromAI('value', \"The order number or phone number\", 'string') }}"
}
]
},
"options": {}
},
"id": "329e2b17-62e3-40d1-a6e5-e475fee4c948",
"name": "Look up order",
"type": "n8n-nodes-base.googleSheetsTool",
"typeVersion": 4.5,
"position": [
600,
220
]
},
{
"parameters": {
"descriptionType": "manual",
"toolDescription": "Logs a confirmed return or exchange request.",
"operation": "append",
"documentId": {
"__rl": true,
"value": "YOUR_SPREADSHEET_ID",
"mode": "id"
},
"sheetName": {
"__rl": true,
"value": "Returns",
"mode": "name"
},
"columns": {
"mappingMode": "defineBelow",
"value": {
"date": "={{ $now.toISO() }}",
"phone": "={{ $('Get question').item.json.from }}",
"order_id": "={{ $fromAI('order_id', \"Order number\", 'string') }}",
"item": "={{ $fromAI('item', \"Which item\", 'string') }}",
"reason": "={{ $fromAI('reason', \"Why they want to return it\", 'string') }}",
"wants": "={{ $fromAI('wants', \"refund or exchange\", 'string') }}",
"status": "new"
}
},
"options": {}
},
"id": "329e2b17-62e3-40d1-a6e5-e475fee4c948",
"name": "Create return request",
"type": "n8n-nodes-base.googleSheetsTool",
"typeVersion": 4.5,
"position": [
770,
220
]
},
{
"parameters": {
"descriptionType": "manual",
"toolDescription": "Alerts our team: every return request, damaged or wrong items, and anything you can't solve.",
"chatId": "YOUR_TEAM_CHAT_ID",
"text": "={{ $fromAI('message', \"What the team needs to know, including the customer's phone\", 'string') }}",
"additionalFields": {
"appendAttribution": false
}
},
"id": "329e2b17-62e3-40d1-a6e5-e475fee4c948",
"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": "329e2b17-62e3-40d1-a6e5-e475fee4c948",
"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": "After-sales agent",
"type": "main",
"index": 0
}
]
]
},
"After-sales agent": {
"main": [
[
{
"node": "Reply on WhatsApp",
"type": "main",
"index": 0
}
]
]
},
"Claude model": {
"ai_languageModel": [
[
{
"node": "After-sales agent",
"type": "ai_languageModel",
"index": 0
}
]
]
},
"Memory": {
"ai_memory": [
[
{
"node": "After-sales agent",
"type": "ai_memory",
"index": 0
}
]
]
},
"Look up order": {
"ai_tool": [
[
{
"node": "After-sales agent",
"type": "ai_tool",
"index": 0
}
]
]
},
"Create return request": {
"ai_tool": [
[
{
"node": "After-sales agent",
"type": "ai_tool",
"index": 0
}
]
]
},
"Notify team": {
"ai_tool": [
[
{
"node": "After-sales agent",
"type": "ai_tool",
"index": 0
}
]
]
}
},
"pinData": {},
"settings": {
"executionOrder": "v1"
},
"meta": {
"templateCredsSetupCompleted": false
},
"tags": []
}في Make، أنشئ سيناريو جديدًا وأضف هذه الوحدات بالترتيب:
- 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: “Look up order” (Google Sheets), “Create return request” (Google Sheets), “Notify team” (Telegram Bot); paste the system prompt as the agent's instructions
- WhatsApp Business Cloud › Send a Message
- كل تشغيل لوحدة يستهلك عمليات (operations) في Make — والباقة المجانية تتضمن حصة شهرية.
- دوال Make المدمجة (map و sum و formatDate…) تغني عن معظم خطوات Code؛ وللمنطق المعقد استخدم وحدة كود.
- قد تختلف أسماء الوحدات والخطوات قليلًا مع تحديث Make و Zapier لتطبيقاتهما.
في Zapier، أنشئ Zap جديدًا وأضف هذه الخطوات بالترتيب:
- 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: “Look up order” (Google Sheets), “Create return request” (Google Sheets), “Notify team” (Telegram); paste the system prompt as the agent's instructions
- WhatsApp — Send Message
- الـ Zaps التي فيها أكثر من خطوتين تحتاج باقة Zapier مدفوعة.
- الـ Webhooks والفلاتر/المسارات و Code by Zapier ميزات مدفوعة في بعض باقات Zapier.
- Code by Zapier يشغّل JavaScript: أعد استخدام الكود بالأعلى، مع قراءة المدخلات من inputData بدلًا من $json.
- قد تختلف أسماء الوحدات والخطوات قليلًا مع تحديث Make و Zapier لتطبيقاتهما.
نصائح
- احفظ أرقام التتبع في جدول الطلبات (أتمتات بوسطة يمكنها ملؤها تلقائيًا).
أتمتات مشابهة
وكيل مبيعات ذكي على واتساب (بالعربية)
يبيع على واتساب بلهجة العميل: يراجع منتجاتك، ويجيب الأسئلة، ويأخذ طلبات الدفع عند الاستلام.
وكيل ذكي للعقارات على واتساب
يفهم ما يريده العميل، ويقترح وحدات مناسبة، ويحجز المعاينات — بالعربية أو الإنجليزية.
وكيل ذكي لطلبات المطعم على واتساب
يأخذ طلبات التوصيل على واتساب من قائمتك، ويؤكد الإجمالي، ويرسل الطلب للمطبخ.