وكيل ذكي يرافق الموظفين الجدد على تيليجرام
يسأل الموظف الجديد الوكيل عن أي شيء في أسابيعه الأولى، ويرى قائمة مهامه، ويعلّمها كمنجزة.
كيف تعمل
- يسأل الموظف الجديد سؤالًا أو "إيه التالي؟".
- يجيب الوكيل من دليل الاستقبال.
- يعرض قائمة مهامه هو ويعلّم المهام منجزة عند إنهائها.
- ينبّه الموارد البشرية عندما يتعطل أحدهم.
ماذا يستطيع أن يفعل
على عكس الأتمتة الثابتة، يقرر الوكيل أي أدواته يستخدم وبأي ترتيب — ويتذكر المحادثة.
- يجيب عن أسئلة الأسبوع الأول من دليلك
- يعرض مهام الاستقبال المفتوحة لكل موظف
- يعلّم المهام كمنجزة
- ينبّه للعوائق مثل عدم وجود لابتوب أو حساب
التعليمات (System prompt)
التعليمات التي تشكّل سلوك الوكيل. موجودة بالفعل داخل قالب n8n — انسخها إلى Make أو Zapier، وعدّل أجزاء YOUR_….
You are the onboarding buddy for new employees at YOUR_COMPANY on Telegram. Reply in their language (Arabic or English), friendly and short. Today is {{ $now.toFormat('cccc d LLLL yyyy') }}.
The employee's Telegram ID is {{ $('Get message').item.json.userId }}.
Tools:
- "Onboarding guide": answers for new hires: tools and accounts, who to ask for what, office info, payroll dates, first-week schedule. Answer only from it.
- "My checklist": this employee's onboarding tasks (task_id, task, due, done). It only returns the person who is asking.
- "Mark task done": marks one task as done by its task_id. Use only after the employee says they finished it.
- "Notify HR": alerts HR when someone is blocked (no laptop, no account access), has a sensitive question, or asks something you can't answer.
Rules:
- If "My checklist" returns nothing, tell them they're not set up yet and use "Notify HR".
- When they ask "what's next?", show their open tasks, earliest due date first.
- Never share other employees' information or discuss salaries.قواعد الأمان
مدمجة في التعليمات والأدوات:
- يعرض لكل شخص قائمته هو فقط
- لا يتحدث أبدًا عن الرواتب أو الموظفين الآخرين
يستخدم مفتاح الذكاء الاصطناعي الخاص بك (Claude أو OpenAI أو غيرهما). التكلفة تعتمد على النموذج وطول المحادثة — والنموذج الصغير السريع يجعل معظم المحادثات بجزء من السنت.
المخطط
الكود
كود JavaScript المستخدم في خطوات Code، وهو مضمَّن بالفعل في القالب بالأسفل.
// Keeps only text messages and pulls out who sent it and what they asked.
const msg = $input.first().json.message;
if (!msg?.text) return [];
return [{
json: {
chatId: msg.chat.id,
userId: msg.from.id,
name: [msg.from.first_name, msg.from.last_name].filter(Boolean).join(" "),
question: msg.text,
},
}];ابنِها بأداتك
اختر أداتك — نفس الأتمتة، خطوة بخطوة.
انسخه والصقه مباشرة في مساحة عمل n8n (Ctrl+V)، أو حمّله واستخدم Import from File. بعد ذلك اربط حساباتك واستبدل كل قيمة تبدأ بـ YOUR_. خطوات الذكاء الاصطناعي تستخدم نموذج Claude، ويمكنك استبداله بـ OpenAI أو Gemini أو Ollama.
عرض الكود (341 سطر)
{
"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": "22e0658a-8568-4a05-a7c2-dcf44e4dfdf3",
"name": "Setup notes",
"type": "n8n-nodes-base.stickyNote",
"typeVersion": 1,
"position": [
-420,
-60
]
},
{
"parameters": {
"updates": [
"message"
],
"additionalFields": {}
},
"id": "22e0658a-8568-4a05-a7c2-dcf44e4dfdf3",
"name": "Incoming message",
"type": "n8n-nodes-base.telegramTrigger",
"typeVersion": 1.1,
"position": [
0,
0
],
"webhookId": "22e0658a-8568-4a05-a7c2-dcf44e4dfdf3"
},
{
"parameters": {
"jsCode": "// Keeps only text messages and pulls out who sent it and what they asked.\nconst msg = $input.first().json.message;\nif (!msg?.text) return [];\n\nreturn [{\n json: {\n chatId: msg.chat.id,\n userId: msg.from.id,\n name: [msg.from.first_name, msg.from.last_name].filter(Boolean).join(\" \"),\n question: msg.text,\n },\n}];"
},
"id": "22e0658a-8568-4a05-a7c2-dcf44e4dfdf3",
"name": "Get message",
"type": "n8n-nodes-base.code",
"typeVersion": 2,
"position": [
300,
0
]
},
{
"parameters": {
"promptType": "define",
"text": "={{ $('Get message').item.json.question }}",
"options": {
"systemMessage": "=You are the onboarding buddy for new employees at YOUR_COMPANY on Telegram. Reply in their language (Arabic or English), friendly and short. Today is {{ $now.toFormat('cccc d LLLL yyyy') }}.\n\nThe employee's Telegram ID is {{ $('Get message').item.json.userId }}.\n\nTools:\n- \"Onboarding guide\": answers for new hires: tools and accounts, who to ask for what, office info, payroll dates, first-week schedule. Answer only from it.\n- \"My checklist\": this employee's onboarding tasks (task_id, task, due, done). It only returns the person who is asking.\n- \"Mark task done\": marks one task as done by its task_id. Use only after the employee says they finished it.\n- \"Notify HR\": alerts HR when someone is blocked (no laptop, no account access), has a sensitive question, or asks something you can't answer.\n\nRules:\n- If \"My checklist\" returns nothing, tell them they're not set up yet and use \"Notify HR\".\n- When they ask \"what's next?\", show their open tasks, earliest due date first.\n- Never share other employees' information or discuss salaries."
}
},
"id": "22e0658a-8568-4a05-a7c2-dcf44e4dfdf3",
"name": "Onboarding 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": "22e0658a-8568-4a05-a7c2-dcf44e4dfdf3",
"name": "Claude model",
"type": "@n8n/n8n-nodes-langchain.lmChatAnthropic",
"typeVersion": 1.3,
"position": [
175,
220
]
},
{
"parameters": {
"sessionIdType": "customKey",
"sessionKey": "={{ $('Get message').item.json.chatId }}",
"contextWindowLength": 10
},
"id": "22e0658a-8568-4a05-a7c2-dcf44e4dfdf3",
"name": "Memory",
"type": "@n8n/n8n-nodes-langchain.memoryBufferWindow",
"typeVersion": 1.3,
"position": [
345,
220
]
},
{
"parameters": {
"descriptionType": "manual",
"toolDescription": "Returns the onboarding guide: topic and answer.",
"operation": "read",
"documentId": {
"__rl": true,
"value": "YOUR_SPREADSHEET_ID",
"mode": "id"
},
"sheetName": {
"__rl": true,
"value": "Onboarding guide",
"mode": "name"
},
"options": {}
},
"id": "22e0658a-8568-4a05-a7c2-dcf44e4dfdf3",
"name": "Onboarding guide",
"type": "n8n-nodes-base.googleSheetsTool",
"typeVersion": 4.5,
"position": [
515,
220
]
},
{
"parameters": {
"descriptionType": "manual",
"toolDescription": "Returns the onboarding tasks of the employee who is asking.",
"operation": "read",
"documentId": {
"__rl": true,
"value": "YOUR_SPREADSHEET_ID",
"mode": "id"
},
"sheetName": {
"__rl": true,
"value": "Checklist",
"mode": "name"
},
"filtersUI": {
"values": [
{
"lookupColumn": "telegram_id",
"lookupValue": "={{ $('Get message').item.json.userId }}"
}
]
},
"options": {}
},
"id": "22e0658a-8568-4a05-a7c2-dcf44e4dfdf3",
"name": "My checklist",
"type": "n8n-nodes-base.googleSheetsTool",
"typeVersion": 4.5,
"position": [
685,
220
]
},
{
"parameters": {
"descriptionType": "manual",
"toolDescription": "Marks one onboarding task as done.",
"operation": "update",
"documentId": {
"__rl": true,
"value": "YOUR_SPREADSHEET_ID",
"mode": "id"
},
"sheetName": {
"__rl": true,
"value": "Checklist",
"mode": "name"
},
"columns": {
"mappingMode": "defineBelow",
"value": {
"task_id": "={{ $fromAI('task_id', \"The task_id from My checklist\", 'string') }}",
"done": "={{ $now.toISODate() }}"
},
"matchingColumns": [
"task_id"
]
},
"options": {}
},
"id": "22e0658a-8568-4a05-a7c2-dcf44e4dfdf3",
"name": "Mark task done",
"type": "n8n-nodes-base.googleSheetsTool",
"typeVersion": 4.5,
"position": [
855,
220
]
},
{
"parameters": {
"descriptionType": "manual",
"toolDescription": "Alerts HR when a new hire is blocked or asks something you can't answer.",
"chatId": "YOUR_HR_CHAT_ID",
"text": "={{ $fromAI('message', \"What HR needs to know, including the employee's name\", 'string') }}",
"additionalFields": {
"appendAttribution": false
}
},
"id": "22e0658a-8568-4a05-a7c2-dcf44e4dfdf3",
"name": "Notify HR",
"type": "n8n-nodes-base.telegramTool",
"typeVersion": 1.2,
"position": [
1025,
220
]
},
{
"parameters": {
"chatId": "={{ $('Get message').item.json.chatId }}",
"text": "={{ $json.output }}",
"additionalFields": {
"appendAttribution": false
}
},
"id": "22e0658a-8568-4a05-a7c2-dcf44e4dfdf3",
"name": "Reply on Telegram",
"type": "n8n-nodes-base.telegram",
"typeVersion": 1.2,
"position": [
900,
0
]
}
],
"connections": {
"Incoming message": {
"main": [
[
{
"node": "Get message",
"type": "main",
"index": 0
}
]
]
},
"Get message": {
"main": [
[
{
"node": "Onboarding agent",
"type": "main",
"index": 0
}
]
]
},
"Onboarding agent": {
"main": [
[
{
"node": "Reply on Telegram",
"type": "main",
"index": 0
}
]
]
},
"Claude model": {
"ai_languageModel": [
[
{
"node": "Onboarding agent",
"type": "ai_languageModel",
"index": 0
}
]
]
},
"Memory": {
"ai_memory": [
[
{
"node": "Onboarding agent",
"type": "ai_memory",
"index": 0
}
]
]
},
"Onboarding guide": {
"ai_tool": [
[
{
"node": "Onboarding agent",
"type": "ai_tool",
"index": 0
}
]
]
},
"My checklist": {
"ai_tool": [
[
{
"node": "Onboarding agent",
"type": "ai_tool",
"index": 0
}
]
]
},
"Mark task done": {
"ai_tool": [
[
{
"node": "Onboarding agent",
"type": "ai_tool",
"index": 0
}
]
]
},
"Notify HR": {
"ai_tool": [
[
{
"node": "Onboarding agent",
"type": "ai_tool",
"index": 0
}
]
]
}
},
"pinData": {},
"settings": {
"executionOrder": "v1"
},
"meta": {
"templateCredsSetupCompleted": false
},
"tags": []
}في Make، أنشئ سيناريو جديدًا وأضف هذه الوحدات بالترتيب:
- Telegram Bot › Watch Updates
- Tools › Set variable / Iterator + Array aggregator (same logic as the Code step)
- Make AI Agents › Run an agent — give it these tools: “Onboarding guide” (Google Sheets), “My checklist” (Google Sheets), “Mark task done” (Google Sheets), “Notify HR” (Telegram Bot); paste the system prompt as the agent's instructions
- Telegram Bot › Send a Text Message or a Reply
- كل تشغيل لوحدة يستهلك عمليات (operations) في Make — والباقة المجانية تتضمن حصة شهرية.
- دوال Make المدمجة (map و sum و formatDate…) تغني عن معظم خطوات Code؛ وللمنطق المعقد استخدم وحدة كود.
- قد تختلف أسماء الوحدات والخطوات قليلًا مع تحديث Make و Zapier لتطبيقاتهما.
في Zapier، أنشئ Zap جديدًا وأضف هذه الخطوات بالترتيب:
- Telegram — 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: “Onboarding guide” (Google Sheets), “My checklist” (Google Sheets), “Mark task done” (Google Sheets), “Notify HR” (Telegram); paste the system prompt as the agent's instructions
- Telegram — Send Message
- الـ Zaps التي فيها أكثر من خطوتين تحتاج باقة Zapier مدفوعة.
- الـ Webhooks والفلاتر/المسارات و Code by Zapier ميزات مدفوعة في بعض باقات Zapier.
- Code by Zapier يشغّل JavaScript: أعد استخدام الكود بالأعلى، مع قراءة المدخلات من inputData بدلًا من $json.
- قد تختلف أسماء الوحدات والخطوات قليلًا مع تحديث Make و Zapier لتطبيقاتهما.
نصائح
- أعطِ كل صف في القائمة task_id فريدًا، مثل رقم تيليجرام مع اسم مختصر للمهمة.
أتمتات مشابهة
وكيل مبيعات ذكي على واتساب (بالعربية)
يبيع على واتساب بلهجة العميل: يراجع منتجاتك، ويجيب الأسئلة، ويأخذ طلبات الدفع عند الاستلام.
وكيل ذكي للطلبات والمرتجعات على واتساب (بالعربية)
يجيب عن "طلبي فين؟"، ويعطي تحديثات التوصيل، ويسجل المرتجعات والاستبدال — بلهجة العميل.
وكيل ذكي للعقارات على واتساب
يفهم ما يريده العميل، ويقترح وحدات مناسبة، ويحجز المعاينات — بالعربية أو الإنجليزية.