وكيل ذكي يرافق الموظفين الجدد على تيليجرام

يسأل الموظف الجديد الوكيل عن أي شيء في أسابيعه الأولى، ويرى قائمة مهامه، ويعلّمها كمنجزة.

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

تعمل مع n8n · Make · Zapier

كيف تعمل

المشغّل: تيليجرام — موظف جديد يراسل البوت
  1. يسأل الموظف الجديد سؤالًا أو "إيه التالي؟".
  2. يجيب الوكيل من دليل الاستقبال.
  3. يعرض قائمة مهامه هو ويعلّم المهام منجزة عند إنهائها.
  4. ينبّه الموارد البشرية عندما يتعطل أحدهم.

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

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

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

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

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

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

المخطط

TIncoming messageTelegram Trigger{ }Get messageCodeOnboarding agentAI AgentClaude modelAnthropic Chat Mo…◷MemorySimple MemoryGOnboarding gui…Google Sheets ToolGMy checklistGoogle Sheets ToolGMark task doneGoogle Sheets ToolTNotify HRTelegram ToolTReply on TelegramTelegram
مشغّل تطبيق كود ذكاء اصطناعي أداة للوكيل

الكود

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

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

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

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

نصائح

  • أعطِ كل صف في القائمة task_id فريدًا، مثل رقم تيليجرام مع اسم مختصر للمهمة.

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