وكيل ذكي لتحليل آراء العملاء أسبوعيًا

كل إثنين، يقرأ الوكيل آراء الأسبوع الماضي ويجد المحاور وينشر تقريرًا بثلاث مهام للتنفيذ.

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

تعمل مع n8n · Make · Zapier

كيف تعمل

المشغّل: جدول زمني — كل إثنين الساعة 9:00
  1. اقرأ جدول Feedback واحتفظ بآخر 7 أيام.
  2. يجمع الوكيل التعليقات في محاور ويعدّها.
  3. يحفظ أهم 3 مشاكل مع حل مقترح كمهام.
  4. ينشر تقريرًا قصيرًا على Slack.

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

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

  • يفهم الآراء بالعربية والإنجليزية
  • يحدد المحاور ومتوسط التقييم
  • يقترح حلولًا عملية
  • يتابع المهام في جدول

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

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

التعليمات (System prompt)
You analyse customer feedback for YOUR_BUSINESS every week. You get the last 7 days of feedback (date, channel, rating 1–5, comment), in Arabic and English.

Do this:
1. Count the feedback and work out the average rating.
2. Group the comments into 3–6 themes (e.g. delivery speed, product quality, staff, price, app). For each: how many mentions, positive or negative, and one short example quote (translated to English if needed).
3. Pick the 3 most important problems and suggest one practical fix for each.
4. Use "Save action item" once for each of those 3 problems.
5. Use "Post report" once, at the end, with the full report: totals, themes, top problems, and 2 things customers loved.

Rules:
- Use only the feedback you were given. Never invent numbers or quotes.
- Don't include customers' names, phone numbers or emails in the report.
- Keep the report under 250 words.

قواعد الأمان

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

  • يستخدم فقط الآراء التي أُعطيت له
  • لا يضع أسماء العملاء أو أرقامهم في التقرير

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

المخطط

trueMondays 9:00Schedule TriggerGRead feedbackGoogle Sheets{ }Last 7 daysCode⑂Any feedback?IfInsights agentAI AgentClaude modelAnthropic Chat Mo…GSave action it…Google Sheets ToolSPost reportSlack Tool
مشغّل تطبيق منطق كود ذكاء اصطناعي أداة للوكيل

الكود

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

Last 7 days · عقدة Code
// Feedback sheet columns: date (YYYY-MM-DD) | customer | channel | rating (1-5) | comment
// Collects the last 7 days of feedback into one list for the agent.
const since = new Date(Date.now() - 7 * 24 * 60 * 60 * 1000).toISOString().slice(0, 10);

const items = $input.all()
  .map((item) => item.json)
  .filter((f) => String(f.date).slice(0, 10) >= since && (f.comment || f.rating))
  .map((f) => ({ date: f.date, channel: f.channel, rating: Number(f.rating) || null, comment: f.comment }));

return [{ json: { count: items.length, feedback: items } }];

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

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

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

ملف Workflow JSON
عرض الكود (289 سطر)
{
  "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": "2799f66d-51be-489b-a647-55f3c16eff14",
      "name": "Setup notes",
      "type": "n8n-nodes-base.stickyNote",
      "typeVersion": 1,
      "position": [
        -420,
        -60
      ]
    },
    {
      "parameters": {
        "rule": {
          "interval": [
            {
              "field": "cronExpression",
              "expression": "0 9 * * 1"
            }
          ]
        }
      },
      "id": "2799f66d-51be-489b-a647-55f3c16eff14",
      "name": "Mondays 9:00",
      "type": "n8n-nodes-base.scheduleTrigger",
      "typeVersion": 1.2,
      "position": [
        0,
        0
      ]
    },
    {
      "parameters": {
        "operation": "read",
        "documentId": {
          "__rl": true,
          "value": "YOUR_SPREADSHEET_ID",
          "mode": "id"
        },
        "sheetName": {
          "__rl": true,
          "value": "Feedback",
          "mode": "name"
        },
        "options": {}
      },
      "id": "2799f66d-51be-489b-a647-55f3c16eff14",
      "name": "Read feedback",
      "type": "n8n-nodes-base.googleSheets",
      "typeVersion": 4.5,
      "position": [
        300,
        0
      ]
    },
    {
      "parameters": {
        "jsCode": "// Feedback sheet columns: date (YYYY-MM-DD) | customer | channel | rating (1-5) | comment\n// Collects the last 7 days of feedback into one list for the agent.\nconst since = new Date(Date.now() - 7 * 24 * 60 * 60 * 1000).toISOString().slice(0, 10);\n\nconst items = $input.all()\n  .map((item) => item.json)\n  .filter((f) => String(f.date).slice(0, 10) >= since && (f.comment || f.rating))\n  .map((f) => ({ date: f.date, channel: f.channel, rating: Number(f.rating) || null, comment: f.comment }));\n\nreturn [{ json: { count: items.length, feedback: items } }];"
      },
      "id": "2799f66d-51be-489b-a647-55f3c16eff14",
      "name": "Last 7 days",
      "type": "n8n-nodes-base.code",
      "typeVersion": 2,
      "position": [
        600,
        0
      ]
    },
    {
      "parameters": {
        "conditions": {
          "options": {
            "caseSensitive": true,
            "leftValue": "",
            "typeValidation": "loose"
          },
          "conditions": [
            {
              "id": "c1",
              "leftValue": "={{ $json.count }}",
              "rightValue": 0,
              "operator": {
                "type": "number",
                "operation": "gt"
              }
            }
          ],
          "combinator": "and"
        },
        "options": {}
      },
      "id": "2799f66d-51be-489b-a647-55f3c16eff14",
      "name": "Any feedback?",
      "type": "n8n-nodes-base.if",
      "typeVersion": 2.2,
      "position": [
        900,
        0
      ]
    },
    {
      "parameters": {
        "promptType": "define",
        "text": "=This week's feedback ({{ $json.count }} items):\n{{ JSON.stringify($json.feedback, null, 2) }}",
        "options": {
          "systemMessage": "=You analyse customer feedback for YOUR_BUSINESS every week. You get the last 7 days of feedback (date, channel, rating 1–5, comment), in Arabic and English.\n\nDo this:\n1. Count the feedback and work out the average rating.\n2. Group the comments into 3–6 themes (e.g. delivery speed, product quality, staff, price, app). For each: how many mentions, positive or negative, and one short example quote (translated to English if needed).\n3. Pick the 3 most important problems and suggest one practical fix for each.\n4. Use \"Save action item\" once for each of those 3 problems.\n5. Use \"Post report\" once, at the end, with the full report: totals, themes, top problems, and 2 things customers loved.\n\nRules:\n- Use only the feedback you were given. Never invent numbers or quotes.\n- Don't include customers' names, phone numbers or emails in the report.\n- Keep the report under 250 words."
        }
      },
      "id": "2799f66d-51be-489b-a647-55f3c16eff14",
      "name": "Insights agent",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "typeVersion": 1.9,
      "position": [
        1200,
        0
      ]
    },
    {
      "parameters": {
        "model": {
          "__rl": true,
          "value": "claude-sonnet-5",
          "mode": "list"
        },
        "options": {}
      },
      "id": "2799f66d-51be-489b-a647-55f3c16eff14",
      "name": "Claude model",
      "type": "@n8n/n8n-nodes-langchain.lmChatAnthropic",
      "typeVersion": 1.3,
      "position": [
        1030,
        220
      ]
    },
    {
      "parameters": {
        "descriptionType": "manual",
        "toolDescription": "Saves one problem and its suggested fix to the Action items sheet.",
        "operation": "append",
        "documentId": {
          "__rl": true,
          "value": "YOUR_SPREADSHEET_ID",
          "mode": "id"
        },
        "sheetName": {
          "__rl": true,
          "value": "Action items",
          "mode": "name"
        },
        "columns": {
          "mappingMode": "defineBelow",
          "value": {
            "week": "={{ $now.toISODate() }}",
            "problem": "={{ $fromAI('problem', \"The problem customers mentioned\", 'string') }}",
            "mentions": "={{ $fromAI('mentions', \"How many times it was mentioned\", 'number') }}",
            "suggested_fix": "={{ $fromAI('fix', \"One practical fix\", 'string') }}",
            "status": "open"
          }
        },
        "options": {}
      },
      "id": "2799f66d-51be-489b-a647-55f3c16eff14",
      "name": "Save action item",
      "type": "n8n-nodes-base.googleSheetsTool",
      "typeVersion": 4.5,
      "position": [
        1200,
        220
      ]
    },
    {
      "parameters": {
        "descriptionType": "manual",
        "toolDescription": "Posts the weekly feedback report.",
        "select": "channel",
        "channelId": {
          "__rl": true,
          "value": "#customer-feedback",
          "mode": "name"
        },
        "text": "={{ $fromAI('report', \"The full weekly report\", 'string') }}",
        "otherOptions": {}
      },
      "id": "2799f66d-51be-489b-a647-55f3c16eff14",
      "name": "Post report",
      "type": "n8n-nodes-base.slackTool",
      "typeVersion": 2.2,
      "position": [
        1370,
        220
      ]
    }
  ],
  "connections": {
    "Mondays 9:00": {
      "main": [
        [
          {
            "node": "Read feedback",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Read feedback": {
      "main": [
        [
          {
            "node": "Last 7 days",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Last 7 days": {
      "main": [
        [
          {
            "node": "Any feedback?",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Any feedback?": {
      "main": [
        [
          {
            "node": "Insights agent",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Claude model": {
      "ai_languageModel": [
        [
          {
            "node": "Insights agent",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Save action item": {
      "ai_tool": [
        [
          {
            "node": "Insights agent",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "Post report": {
      "ai_tool": [
        [
          {
            "node": "Insights agent",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    }
  },
  "pinData": {},
  "settings": {
    "executionOrder": "v1"
  },
  "meta": {
    "templateCredsSetupCompleted": false
  },
  "tags": []
}

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

نصائح

  • اجمع كل الآراء (النماذج، التقييمات، واتساب) في جدول Feedback واحد ليرى الوكيل كل شيء.

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