وكيل ذكي لتسجيل الطلاب في الكورسات على واتساب

يجيب عن أسئلة الكورسات والمواعيد والأسعار على واتساب، ويسجل الطلاب في المجموعة القادمة.

وكيل ذكيمتقدم توفّر ~20 ساعة شهريًا وكلاء الذكاء الاصطناعيبواسطة فريق Flowngn

تعمل مع n8n · Make · Zapier

كيف تعمل

المشغّل: واتساب — طالب يرسل رسالة
  1. يسأل الطالب عن كورس على واتساب.
  2. يراجع الوكيل جدول الكورسات للمواعيد والسعر والمقاعد المتبقية.
  3. يأخذ اسم الطالب ومستواه والمجموعة المناسبة له، ثم يسجله.
  4. يرسل له طريقة الدفع وينبّه فريقك على تيليجرام.

ماذا يستطيع أن يفعل

على عكس الأتمتة الثابتة، يقرر الوكيل أي أدواته يستخدم وبأي ترتيب — ويتذكر المحادثة.

  • يجيب باللهجات العربية أو بالإنجليزية من قائمة كورساتك المحدّثة
  • يقترح المستوى والمجموعة المناسبين
  • يسجل الطلاب بالاسم والرقم والكورس والمجموعة
  • يرسل طريقة الدفع بعد التسجيل

التعليمات (System prompt)

التعليمات التي تشكّل سلوك الوكيل. موجودة بالفعل داخل قالب n8n — انسخها إلى Make أو Zapier، وعدّل أجزاء YOUR_….

التعليمات (System prompt)
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 أو غيرهما). التكلفة تعتمد على النموذج وطول المحادثة — والنموذج الصغير السريع يجعل معظم المحادثات بجزء من السنت.

المخطط

WIncoming messageWhatsApp Trigger{ }Get questionCodeEnrollment agentAI AgentClaude modelAnthropic Chat Mo…◷MemorySimple MemoryGCoursesGoogle Sheets ToolGRegister stude…Google Sheets ToolTNotify teamTelegram ToolWReply on WhatsAppWhatsApp Business Cloud
مشغّل تطبيق كود ذكاء اصطناعي أداة للوكيل

الكود

كود JavaScript المستخدم في خطوات Code، وهو مضمَّن بالفعل في القالب بالأسفل.

Get question · عقدة 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.

ملف Workflow JSON
عرض الكود (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": []
}

← افتحها في ساحة التجربة لتعديلها

نصائح

  • حدّث عمود seats_left بعد كل دفعة حتى لا تُعرض مجموعات مكتملة.

أتمتات مشابهة