وكيل ذكي لطلبات المطعم على واتساب
يأخذ طلبات التوصيل على واتساب من قائمتك، ويؤكد الإجمالي، ويرسل الطلب للمطبخ.
كيف تعمل
- يطلب العميل على واتساب.
- يراجع الوكيل القائمة للأصناف والأحجام والأسعار والتوفر.
- يكرر الطلب كاملًا والعنوان والإجمالي، ثم يحفظه.
- يرسل الطلب لمجموعة المطبخ على تيليجرام.
ماذا يستطيع أن يفعل
على عكس الأتمتة الثابتة، يقرر الوكيل أي أدواته يستخدم وبأي ترتيب — ويتذكر المحادثة.
- يأخذ الطلبات بالعربية أو الإنجليزية من قائمتك المحدّثة
- يقترح بدائل عندما يكون صنف غير متاح
- يضيف رسوم التوصيل حسب المنطقة ويؤكد الإجمالي
- يرسل الطلبات المؤكدة مباشرة للمطبخ
التعليمات (System prompt)
التعليمات التي تشكّل سلوك الوكيل. موجودة بالفعل داخل قالب n8n — انسخها إلى Make أو Zapier، وعدّل أجزاء YOUR_….
You are the WhatsApp ordering assistant for YOUR_RESTAURANT. Reply in the customer's language and dialect (Egyptian Arabic, Gulf Arabic, Modern Standard Arabic or English). Be warm and brief.
Today is {{ $now.toFormat('cccc HH:mm') }}. Opening hours: YOUR_HOURS. Delivery areas and fees: YOUR_DELIVERY_AREAS.
Tools:
- "Menu": our menu (item, size, price, available). Always check it for items and prices.
- "Place order": saves the confirmed order. Use only after the customer confirms items, quantities, address, phone and total.
- "Send to kitchen": sends the confirmed order to the kitchen group.
Rules:
- Never invent dishes, prices, offers or delivery times. If an item is unavailable, suggest a similar one from the menu.
- Repeat the full order with prices and the total (including delivery fee) before placing it.
- Payment is cash on delivery or YOUR_PAYMENT_METHODS — never ask for card details in chat.
- Ask about allergies only if the customer mentions them; never make health claims.قواعد الأمان
مدمجة في التعليمات والأدوات:
- لا يخترع أصنافًا أو أسعارًا أو عروضًا
- يكرر الطلب كاملًا قبل تسجيله
- لا يطلب بيانات البطاقة؛ ولا يقدم ادعاءات صحية
يستخدم مفتاح الذكاء الاصطناعي الخاص بك (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.
عرض الكود (296 سطر)
{
"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": "47157a09-d134-4c79-a014-3d2a8816de5a",
"name": "Setup notes",
"type": "n8n-nodes-base.stickyNote",
"typeVersion": 1,
"position": [
-420,
-60
]
},
{
"parameters": {
"updates": [
"messages"
]
},
"id": "47157a09-d134-4c79-a014-3d2a8816de5a",
"name": "Incoming message",
"type": "n8n-nodes-base.whatsAppTrigger",
"typeVersion": 1,
"position": [
0,
0
],
"webhookId": "47157a09-d134-4c79-a014-3d2a8816de5a"
},
{
"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": "47157a09-d134-4c79-a014-3d2a8816de5a",
"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 ordering assistant for YOUR_RESTAURANT. Reply in the customer's language and dialect (Egyptian Arabic, Gulf Arabic, Modern Standard Arabic or English). Be warm and brief.\n\nToday is {{ $now.toFormat('cccc HH:mm') }}. Opening hours: YOUR_HOURS. Delivery areas and fees: YOUR_DELIVERY_AREAS.\n\nTools:\n- \"Menu\": our menu (item, size, price, available). Always check it for items and prices.\n- \"Place order\": saves the confirmed order. Use only after the customer confirms items, quantities, address, phone and total.\n- \"Send to kitchen\": sends the confirmed order to the kitchen group.\n\nRules:\n- Never invent dishes, prices, offers or delivery times. If an item is unavailable, suggest a similar one from the menu.\n- Repeat the full order with prices and the total (including delivery fee) before placing it.\n- Payment is cash on delivery or YOUR_PAYMENT_METHODS — never ask for card details in chat.\n- Ask about allergies only if the customer mentions them; never make health claims."
}
},
"id": "47157a09-d134-4c79-a014-3d2a8816de5a",
"name": "Ordering 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": "47157a09-d134-4c79-a014-3d2a8816de5a",
"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": "47157a09-d134-4c79-a014-3d2a8816de5a",
"name": "Memory",
"type": "@n8n/n8n-nodes-langchain.memoryBufferWindow",
"typeVersion": 1.3,
"position": [
430,
220
]
},
{
"parameters": {
"descriptionType": "manual",
"toolDescription": "Returns our menu: item, size, price, available.",
"operation": "read",
"documentId": {
"__rl": true,
"value": "YOUR_SPREADSHEET_ID",
"mode": "id"
},
"sheetName": {
"__rl": true,
"value": "Menu",
"mode": "name"
},
"options": {}
},
"id": "47157a09-d134-4c79-a014-3d2a8816de5a",
"name": "Menu",
"type": "n8n-nodes-base.googleSheetsTool",
"typeVersion": 4.5,
"position": [
600,
220
]
},
{
"parameters": {
"descriptionType": "manual",
"toolDescription": "Saves a confirmed order.",
"operation": "append",
"documentId": {
"__rl": true,
"value": "YOUR_SPREADSHEET_ID",
"mode": "id"
},
"sheetName": {
"__rl": true,
"value": "Orders",
"mode": "name"
},
"columns": {
"mappingMode": "defineBelow",
"value": {
"time": "={{ $now.toISO() }}",
"phone": "={{ $('Get question').item.json.from }}",
"items": "={{ $fromAI('items', \"Items with sizes and quantities\", 'string') }}",
"total": "={{ $fromAI('total', \"Total including delivery fee\", 'number') }}",
"address": "={{ $fromAI('address', \"Delivery address\", 'string') }}",
"notes": "={{ $fromAI('notes', \"Special requests, or empty\", 'string') }}",
"status": "new"
}
},
"options": {}
},
"id": "47157a09-d134-4c79-a014-3d2a8816de5a",
"name": "Place order",
"type": "n8n-nodes-base.googleSheetsTool",
"typeVersion": 4.5,
"position": [
770,
220
]
},
{
"parameters": {
"descriptionType": "manual",
"toolDescription": "Sends the confirmed order to the kitchen's Telegram group.",
"chatId": "YOUR_KITCHEN_CHAT_ID",
"text": "={{ $fromAI('order', \"The full order: items, quantities, address, phone, total, notes\", 'string') }}",
"additionalFields": {
"appendAttribution": false
}
},
"id": "47157a09-d134-4c79-a014-3d2a8816de5a",
"name": "Send to kitchen",
"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": "47157a09-d134-4c79-a014-3d2a8816de5a",
"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": "Ordering agent",
"type": "main",
"index": 0
}
]
]
},
"Ordering agent": {
"main": [
[
{
"node": "Reply on WhatsApp",
"type": "main",
"index": 0
}
]
]
},
"Claude model": {
"ai_languageModel": [
[
{
"node": "Ordering agent",
"type": "ai_languageModel",
"index": 0
}
]
]
},
"Memory": {
"ai_memory": [
[
{
"node": "Ordering agent",
"type": "ai_memory",
"index": 0
}
]
]
},
"Menu": {
"ai_tool": [
[
{
"node": "Ordering agent",
"type": "ai_tool",
"index": 0
}
]
]
},
"Place order": {
"ai_tool": [
[
{
"node": "Ordering agent",
"type": "ai_tool",
"index": 0
}
]
]
},
"Send to kitchen": {
"ai_tool": [
[
{
"node": "Ordering 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: “Menu” (Google Sheets), “Place order” (Google Sheets), “Send to kitchen” (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: “Menu” (Google Sheets), “Place order” (Google Sheets), “Send to kitchen” (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 لتطبيقاتهما.
نصائح
- علّم الأصناف المنتهية كغير متاحة في جدول القائمة أثناء العمل.
أتمتات مشابهة
وكيل مبيعات ذكي على واتساب (بالعربية)
يبيع على واتساب بلهجة العميل: يراجع منتجاتك، ويجيب الأسئلة، ويأخذ طلبات الدفع عند الاستلام.
وكيل ذكي للطلبات والمرتجعات على واتساب (بالعربية)
يجيب عن "طلبي فين؟"، ويعطي تحديثات التوصيل، ويسجل المرتجعات والاستبدال — بلهجة العميل.
وكيل ذكي للعقارات على واتساب
يفهم ما يريده العميل، ويقترح وحدات مناسبة، ويحجز المعاينات — بالعربية أو الإنجليزية.