وكيل ذكي لتحليل بيانات المبيعات

اسأل عن مبيعاتك بكلام عادي: أفضل المنتجات والمدن والشهور والهوامش، وتأتيك الإجابة بأرقام حقيقية.

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

تعمل مع n8n · Make · Zapier

كيف تعمل

المشغّل: محادثة — تسأل سؤالًا
  1. تسأل مثلًا "أي مدينة نمت أكثر هذا الشهر؟".
  2. يقرأ الوكيل جدول Sales ويحسب.
  3. يجيب بالأرقام الرئيسية وملاحظة واحدة مفيدة.
  4. يمكنه نشر الملخص على Slack.

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

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

  • الإجماليات والمتوسطات والنمو وقوائم الأفضل
  • الهوامش حسب المنتج أو المدينة أو القناة
  • جداول نصية قصيرة للمقارنة

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

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

التعليمات (System prompt)
You are a data analyst for YOUR_BUSINESS. You answer questions about our sales data with numbers. Today is {{ $now.toFormat('d LLLL yyyy') }}. Currency: YOUR_CURRENCY.

Tools:
- "Read sales": every order (date, order_id, customer, city, channel, product, quantity, revenue, cost).
- "Post to Slack": posts a finished summary to the team channel. Use only when the user asks to share.

How to answer:
1. Always read the data first. State the period you used.
2. Do the arithmetic carefully: totals, averages, growth vs the previous period, top 5 lists.
3. Answer in 3–6 lines with the key numbers, then one practical insight or question to dig into.
4. Show a small text table when comparing more than 3 items.

Rules:
- Never guess numbers. If the data doesn't answer the question, say what's missing.
- Gross margin = (revenue − cost) / revenue.
- Don't share individual customers' personal details in Slack posts.

قواعد الأمان

مدمجة في التعليمات والأدوات:

  • لا يخمّن الأرقام؛ يوضح البيانات الناقصة
  • لا يضع بيانات العملاء في منشورات Slack

يستخدم مفتاح الذكاء الاصطناعي الخاص بك (Claude أو OpenAI أو غيرهما). التكلفة تعتمد على النموذج وطول المحادثة — والنموذج الصغير السريع يجعل معظم المحادثات بجزء من السنت.

المخطط

Analyst chatChat TriggerAnalyst agentAI AgentClaude modelAnthropic Chat Mo…◷MemorySimple MemoryGRead salesGoogle Sheets ToolSPost to SlackSlack Tool
مشغّل ذكاء اصطناعي أداة للوكيل

ابنِها بأداتك

اختر أداتك — نفس الأتمتة، خطوة بخطوة.

انسخه والصقه مباشرة في مساحة عمل n8n (Ctrl+V)، أو حمّله واستخدم Import from File. بعد ذلك اربط حساباتك واستبدل كل قيمة تبدأ بـ YOUR_. خطوات الذكاء الاصطناعي تستخدم نموذج Claude، ويمكنك استبداله بـ OpenAI أو Gemini أو Ollama.

ملف Workflow JSON
عرض الكود (198 سطر)
{
  "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": "2473c6c3-ceef-44d1-aca0-1bb2b8b2ff2e",
      "name": "Setup notes",
      "type": "n8n-nodes-base.stickyNote",
      "typeVersion": 1,
      "position": [
        -420,
        -60
      ]
    },
    {
      "parameters": {
        "public": true,
        "mode": "hostedChat",
        "initialMessages": "Ask me anything about your sales: best products, cities, months, margins…",
        "options": {
          "responseMode": "lastNode"
        }
      },
      "id": "2473c6c3-ceef-44d1-aca0-1bb2b8b2ff2e",
      "name": "Analyst chat",
      "type": "@n8n/n8n-nodes-langchain.chatTrigger",
      "typeVersion": 1.1,
      "position": [
        0,
        0
      ],
      "webhookId": "2473c6c3-ceef-44d1-aca0-1bb2b8b2ff2e"
    },
    {
      "parameters": {
        "options": {
          "systemMessage": "=You are a data analyst for YOUR_BUSINESS. You answer questions about our sales data with numbers. Today is {{ $now.toFormat('d LLLL yyyy') }}. Currency: YOUR_CURRENCY.\n\nTools:\n- \"Read sales\": every order (date, order_id, customer, city, channel, product, quantity, revenue, cost).\n- \"Post to Slack\": posts a finished summary to the team channel. Use only when the user asks to share.\n\nHow to answer:\n1. Always read the data first. State the period you used.\n2. Do the arithmetic carefully: totals, averages, growth vs the previous period, top 5 lists.\n3. Answer in 3–6 lines with the key numbers, then one practical insight or question to dig into.\n4. Show a small text table when comparing more than 3 items.\n\nRules:\n- Never guess numbers. If the data doesn't answer the question, say what's missing.\n- Gross margin = (revenue − cost) / revenue.\n- Don't share individual customers' personal details in Slack posts."
        }
      },
      "id": "2473c6c3-ceef-44d1-aca0-1bb2b8b2ff2e",
      "name": "Analyst agent",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "typeVersion": 1.9,
      "position": [
        300,
        0
      ]
    },
    {
      "parameters": {
        "model": {
          "__rl": true,
          "value": "claude-sonnet-5",
          "mode": "list"
        },
        "options": {}
      },
      "id": "2473c6c3-ceef-44d1-aca0-1bb2b8b2ff2e",
      "name": "Claude model",
      "type": "@n8n/n8n-nodes-langchain.lmChatAnthropic",
      "typeVersion": 1.3,
      "position": [
        45,
        220
      ]
    },
    {
      "parameters": {
        "contextWindowLength": 10
      },
      "id": "2473c6c3-ceef-44d1-aca0-1bb2b8b2ff2e",
      "name": "Memory",
      "type": "@n8n/n8n-nodes-langchain.memoryBufferWindow",
      "typeVersion": 1.3,
      "position": [
        215,
        220
      ]
    },
    {
      "parameters": {
        "descriptionType": "manual",
        "toolDescription": "Returns every order: date, order_id, customer, city, channel, product, quantity, revenue, cost.",
        "operation": "read",
        "documentId": {
          "__rl": true,
          "value": "YOUR_SPREADSHEET_ID",
          "mode": "id"
        },
        "sheetName": {
          "__rl": true,
          "value": "Sales",
          "mode": "name"
        },
        "options": {}
      },
      "id": "2473c6c3-ceef-44d1-aca0-1bb2b8b2ff2e",
      "name": "Read sales",
      "type": "n8n-nodes-base.googleSheetsTool",
      "typeVersion": 4.5,
      "position": [
        385,
        220
      ]
    },
    {
      "parameters": {
        "descriptionType": "manual",
        "toolDescription": "Posts a finished summary to the team channel.",
        "select": "channel",
        "channelId": {
          "__rl": true,
          "value": "#numbers",
          "mode": "name"
        },
        "text": "={{ $fromAI('summary', \"The summary to share\", 'string') }}",
        "otherOptions": {}
      },
      "id": "2473c6c3-ceef-44d1-aca0-1bb2b8b2ff2e",
      "name": "Post to Slack",
      "type": "n8n-nodes-base.slackTool",
      "typeVersion": 2.2,
      "position": [
        555,
        220
      ]
    }
  ],
  "connections": {
    "Analyst chat": {
      "main": [
        [
          {
            "node": "Analyst agent",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Claude model": {
      "ai_languageModel": [
        [
          {
            "node": "Analyst agent",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Memory": {
      "ai_memory": [
        [
          {
            "node": "Analyst agent",
            "type": "ai_memory",
            "index": 0
          }
        ]
      ]
    },
    "Read sales": {
      "ai_tool": [
        [
          {
            "node": "Analyst agent",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "Post to Slack": {
      "ai_tool": [
        [
          {
            "node": "Analyst agent",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    }
  },
  "pinData": {},
  "settings": {
    "executionOrder": "v1"
  },
  "meta": {
    "templateCredsSetupCompleted": false
  },
  "tags": []
}

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

نصائح

  • الجداول الكبيرة تبطئه؛ احتفظ بآخر 12 شهرًا في ورقة Sales وأرشف الباقي.

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