وكيل ذكي لتسجيل الطلاب في الكورسات على واتساب
يجيب عن أسئلة الكورسات والمواعيد والأسعار على واتساب، ويسجل الطلاب في المجموعة القادمة.
كيف تعمل
- يسأل الطالب عن كورس على واتساب.
- يراجع الوكيل جدول الكورسات للمواعيد والسعر والمقاعد المتبقية.
- يأخذ اسم الطالب ومستواه والمجموعة المناسبة له، ثم يسجله.
- يرسل له طريقة الدفع وينبّه فريقك على تيليجرام.
ماذا يستطيع أن يفعل
على عكس الأتمتة الثابتة، يقرر الوكيل أي أدواته يستخدم وبأي ترتيب — ويتذكر المحادثة.
- يجيب باللهجات العربية أو بالإنجليزية من قائمة كورساتك المحدّثة
- يقترح المستوى والمجموعة المناسبين
- يسجل الطلاب بالاسم والرقم والكورس والمجموعة
- يرسل طريقة الدفع بعد التسجيل
التعليمات (System prompt)
التعليمات التي تشكّل سلوك الوكيل. موجودة بالفعل داخل قالب n8n — انسخها إلى Make أو Zapier، وعدّل أجزاء YOUR_….
You are the WhatsApp enrollment assistant for YOUR_ACADEMY. 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 d LLLL yyyy') }}. Payment instructions: YOUR_PAYMENT_INSTRUCTIONS.
Tools:
- "Courses": our course list (course, level, group, days, time, start date, price, seats_left, online or in person). Always check it before answering about dates, prices or seats.
- "Register student": saves a registration. Use only after the student confirms the course, group, their full name and level (and the parent's name if the student is under 18).
- "Notify team": alerts our team about every registration, and any question you can't answer (refunds, certificates, special prices, complaints).
Rules:
- Never invent courses, dates, prices, discounts or certificates.
- Only offer groups with seats_left above 0. If a group is full, offer the next one.
- If they're unsure of their level, ask 2–3 short questions about what they already know, then suggest a level.
- After registering, share the payment instructions and say the team will confirm their seat once payment arrives.قواعد الأمان
مدمجة في التعليمات والأدوات:
- لا يخترع كورسات أو مواعيد أو أسعارًا أو خصومات
- لا يعد بشهادات أو نتائج لا تقدمها
- يحوّل أسئلة أولياء الأمور والدفع التي لا يعرف إجابتها للفريق
يستخدم مفتاح الذكاء الاصطناعي الخاص بك (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.
عرض الكود (297 سطر)
{
"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": "2c527986-f663-44a2-ab4f-9b3f13e4bf18",
"name": "Setup notes",
"type": "n8n-nodes-base.stickyNote",
"typeVersion": 1,
"position": [
-420,
-60
]
},
{
"parameters": {
"updates": [
"messages"
]
},
"id": "2c527986-f663-44a2-ab4f-9b3f13e4bf18",
"name": "Incoming message",
"type": "n8n-nodes-base.whatsAppTrigger",
"typeVersion": 1,
"position": [
0,
0
],
"webhookId": "2c527986-f663-44a2-ab4f-9b3f13e4bf18"
},
{
"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": "2c527986-f663-44a2-ab4f-9b3f13e4bf18",
"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 enrollment assistant for YOUR_ACADEMY. 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 d LLLL yyyy') }}. Payment instructions: YOUR_PAYMENT_INSTRUCTIONS.\n\nTools:\n- \"Courses\": our course list (course, level, group, days, time, start date, price, seats_left, online or in person). Always check it before answering about dates, prices or seats.\n- \"Register student\": saves a registration. Use only after the student confirms the course, group, their full name and level (and the parent's name if the student is under 18).\n- \"Notify team\": alerts our team about every registration, and any question you can't answer (refunds, certificates, special prices, complaints).\n\nRules:\n- Never invent courses, dates, prices, discounts or certificates.\n- Only offer groups with seats_left above 0. If a group is full, offer the next one.\n- If they're unsure of their level, ask 2–3 short questions about what they already know, then suggest a level.\n- After registering, share the payment instructions and say the team will confirm their seat once payment arrives."
}
},
"id": "2c527986-f663-44a2-ab4f-9b3f13e4bf18",
"name": "Enrollment 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": "2c527986-f663-44a2-ab4f-9b3f13e4bf18",
"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": "2c527986-f663-44a2-ab4f-9b3f13e4bf18",
"name": "Memory",
"type": "@n8n/n8n-nodes-langchain.memoryBufferWindow",
"typeVersion": 1.3,
"position": [
430,
220
]
},
{
"parameters": {
"descriptionType": "manual",
"toolDescription": "Returns our courses: course, level, group, days, time, start date, price, seats_left, format.",
"operation": "read",
"documentId": {
"__rl": true,
"value": "YOUR_SPREADSHEET_ID",
"mode": "id"
},
"sheetName": {
"__rl": true,
"value": "Courses",
"mode": "name"
},
"options": {}
},
"id": "2c527986-f663-44a2-ab4f-9b3f13e4bf18",
"name": "Courses",
"type": "n8n-nodes-base.googleSheetsTool",
"typeVersion": 4.5,
"position": [
600,
220
]
},
{
"parameters": {
"descriptionType": "manual",
"toolDescription": "Saves a confirmed registration.",
"operation": "append",
"documentId": {
"__rl": true,
"value": "YOUR_SPREADSHEET_ID",
"mode": "id"
},
"sheetName": {
"__rl": true,
"value": "Registrations",
"mode": "name"
},
"columns": {
"mappingMode": "defineBelow",
"value": {
"date": "={{ $now.toISO() }}",
"phone": "={{ $('Get question').item.json.from }}",
"student": "={{ $fromAI('student', \"Student's full name\", 'string') }}",
"parent": "={{ $fromAI('parent', \"Parent's name if the student is under 18, otherwise empty\", 'string') }}",
"course": "={{ $fromAI('course', \"Course name\", 'string') }}",
"group": "={{ $fromAI('group', \"Group or start date\", 'string') }}",
"level": "={{ $fromAI('level', \"Student's level\", 'string') }}",
"status": "awaiting payment"
}
},
"options": {}
},
"id": "2c527986-f663-44a2-ab4f-9b3f13e4bf18",
"name": "Register student",
"type": "n8n-nodes-base.googleSheetsTool",
"typeVersion": 4.5,
"position": [
770,
220
]
},
{
"parameters": {
"descriptionType": "manual",
"toolDescription": "Alerts our team about every registration, and 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": "2c527986-f663-44a2-ab4f-9b3f13e4bf18",
"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": "2c527986-f663-44a2-ab4f-9b3f13e4bf18",
"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": "Enrollment agent",
"type": "main",
"index": 0
}
]
]
},
"Enrollment agent": {
"main": [
[
{
"node": "Reply on WhatsApp",
"type": "main",
"index": 0
}
]
]
},
"Claude model": {
"ai_languageModel": [
[
{
"node": "Enrollment agent",
"type": "ai_languageModel",
"index": 0
}
]
]
},
"Memory": {
"ai_memory": [
[
{
"node": "Enrollment agent",
"type": "ai_memory",
"index": 0
}
]
]
},
"Courses": {
"ai_tool": [
[
{
"node": "Enrollment agent",
"type": "ai_tool",
"index": 0
}
]
]
},
"Register student": {
"ai_tool": [
[
{
"node": "Enrollment agent",
"type": "ai_tool",
"index": 0
}
]
]
},
"Notify team": {
"ai_tool": [
[
{
"node": "Enrollment 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: “Courses” (Google Sheets), “Register student” (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: “Courses” (Google Sheets), “Register student” (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 لتطبيقاتهما.
نصائح
- حدّث عمود seats_left بعد كل دفعة حتى لا تُعرض مجموعات مكتملة.
أتمتات مشابهة
وكيل مبيعات ذكي على واتساب (بالعربية)
يبيع على واتساب بلهجة العميل: يراجع منتجاتك، ويجيب الأسئلة، ويأخذ طلبات الدفع عند الاستلام.
وكيل ذكي للطلبات والمرتجعات على واتساب (بالعربية)
يجيب عن "طلبي فين؟"، ويعطي تحديثات التوصيل، ويسجل المرتجعات والاستبدال — بلهجة العميل.
وكيل ذكي للعقارات على واتساب
يفهم ما يريده العميل، ويقترح وحدات مناسبة، ويحجز المعاينات — بالعربية أو الإنجليزية.