Weekly customer feedback insights AI agent

Every Monday, the agent reads last week's feedback, finds the themes, and posts a report with three action items.

AI agentMedium Saves ~6 hours/month AI AgentsBy Flowngn team

Works with n8n · Make · Zapier

How it works

Trigger: Schedule — Mondays at 9:00
  1. Read the Feedback sheet and keep the last 7 days.
  2. The agent groups comments into themes and counts them.
  3. It saves the top 3 problems with a suggested fix as action items.
  4. It posts a short report to Slack.

What it can do

Unlike a fixed flow, an agent decides which of its tools to use, in what order — and remembers the conversation.

  • Understands Arabic and English feedback
  • Finds themes and average rating
  • Suggests practical fixes
  • Tracks action items in a sheet

System prompt

The instructions that shape the agent. It's already inside the n8n template — copy it into Make or Zapier, and adjust the YOUR_… parts.

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.

Safety rules

Built into the prompt and the tools:

  • Uses only the feedback it was given
  • Leaves customers' names and numbers out of the report

Uses your own AI key (Claude, OpenAI or another model). Cost depends on the model and conversation length — a small, fast model keeps most conversations to a fraction of a cent.

Diagram

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
Trigger App Logic Code AI Agent tool

Code

JavaScript used in the Code step — already included in the template below.

Last 7 days · Code node
// 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 } }];

Build it

Pick your tool — same automation, step by step.

Copy and paste straight into an n8n canvas (Ctrl+V), or download and use Import from File. Then connect your own credentials and replace every YOUR_… placeholder. AI steps use a Claude model node — swap it for OpenAI, Gemini or Ollama if you prefer.

Workflow JSON
Show code (289 lines)
{
  "name": "Weekly customer feedback insights AI agent (Flowngn)",
  "nodes": [
    {
      "parameters": {
        "content": "## Weekly customer feedback insights AI agent\nEvery Monday, the agent reads last week's feedback, finds the themes, and posts a report with three action items.\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": []
}

Open in the playground to edit →

Tips

  • Send all feedback (forms, reviews, WhatsApp) into one Feedback sheet so the agent sees everything.

Related flows