Skip to content

Latest commit

 

History

24 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

AI-Powered Client Feedback Routing System

An n8n automation that pulls in client feedback from a Google Form, runs it through an AI model to determine sentiment, risk level, and next steps, then sorts it automatically into separate Google Sheets — with a live dashboard that updates itself.

Built with n8n · Google Forms · Google Sheets · Mistral AI · Google Apps Script

Project Assets

Workflow note: workflow.json is a scrubbed public export. Replace the YOUR_... placeholders with your own Sheet ID, tab ID, and credentials inside n8n after importing.


Who This Works For

Any business that collects customer or client feedback and needs to act on it quickly — without manually reading every response.

Sector Why It Fits
E-commerce & Retail High feedback volume; urgent complaints need fast response
SaaS & Software Churn risk detection from dissatisfied users is critical
Education & E-learning Student satisfaction directly affects retention and referrals
Hospitality (Hotels, Restaurants) Reviews and ratings drive reputation — negative ones need immediate action
Healthcare & Clinics Patient feedback affects trust, compliance, and care quality
Professional Services (Consulting, Law, Finance) Client satisfaction is the core of repeat business
Real Estate Long sales cycles make client sentiment tracking essential
Fitness & Wellness Member retention depends on catching dissatisfaction early
Event Management Post-event feedback must be triaged fast for future improvement
Automotive Services Repeat customers rely on trust — complaints must not be missed
Food Delivery & Restaurants Rating drops signal operational issues that need urgent fixes
Customer Support Teams Automates the first-pass triage that agents currently do manually

If your business uses a feedback form and someone has to read through it manually — this workflow automates that first step.


Note: This is a portfolio project, not real client work. Names, emails, and feedback are all made up ("Alladi" is a placeholder brand name). Data rows in screenshots are blurred to avoid publishing anything that looks like real client data.


What Problem Does This Solve?

When a company collects feedback through a Google Form, someone eventually has to read through it and decide what matters. That works at small scale — but once you're getting dozens or hundreds of responses, it becomes slow and inconsistent. One person might flag something as urgent; another might miss it entirely.

This workflow handles that first pass automatically. When someone submits the form:

  1. It picks up the new response immediately — no manual checking needed
  2. It reads the star rating and routes the feedback into a positive or negative branch
  3. It sends the comment to an AI model, which reads it like a junior analyst — extracting sentiment, the actual problem, a suggested fix, churn risk, and priority level
  4. It writes that analysis into the correct sheet (positive or negative)
  5. A dashboard tab keeps a running total of everything, so you can see at a glance how things are trending without scrolling through individual rows

How It Works

Google Form
     │  (client submits feedback)
     ▼
Google Sheets (Form_Responses tab)
     │
     ▼
Google Sheets Trigger  ──▶  fires when a new row is added
     │
     ▼
Switch node  ──▶  checks the star rating
     │
     ├── Rating ≥ 4  ──▶  Positive branch
     │                        │
     │                        ▼
     │                  AI Agent (Mistral)
     │                  analyzes: sentiment, problem,
     │                  solution, risk level, priority
     │                        │
     │                        ▼
     │                  Code node (JavaScript)
     │                  parses AI output into clean fields
     │                        │
     │                        ▼
     │                  Append row → Positive Feedback sheet
     │
     └── Rating < 4  ──▶  Negative branch
                              │
                              ▼
                        AI Agent (Negative) + Memory
                        same analysis, tuned for
                        complaints and churn risk
                              │
                              ▼
                        Code node (JavaScript)
                        parses AI output into clean fields
                              │
                              ▼
                        Append row → Negative Feedback sheet

     Both sheets feed into:
     ▼
Dashboard tab (Google Apps Script)
→ totals, urgency buckets (Urgent / Watch / Good),
  average ratings — updated automatically

Think of the Switch node as a mail sorter — it reads the rating and decides which pile the feedback goes into. Each pile has its own AI reader that summarizes what happened and what to do about it. Both piles land in their own sheet, and a third tab counts and averages everything automatically.


The AI Analysis

Each feedback comment is passed to a Mistral model prompted to behave like a senior customer-success consultant. It reads the rating, what the client liked, and what they want improved — all together — and returns a fixed, plain-text structure that the Code node then splits into columns:

Field What it captures
Name Client name (carried through from the form)
Email Client email (carried through from the form)
Rating The star rating given (1–5)
Sentiment Positive · Neutral · Negative
Priority Critical · High · Medium · Low
Problem 1–2 sentences on the core issue, praise, or opportunity
Solution 1–2 practical, consultant-style next steps
Risk Level One sentence on how likely the client is to churn, and why

The model is instructed to stay specific to each client, avoid markdown, and never invent details that aren't in the feedback — which keeps the parsed columns clean and reliable.


Google Sheets Structure

The system uses one spreadsheet with four tabs. Column order below matches the live sheets exactly.

Tab 1 — Form_Responses (raw input from Google Form)

Col Header
A Timestamp
B Name
C What is your email?
D How would you rate your experience with Alladi?
E What did you like most about Alladi?
F What could we improve?

This tab is written by Google Forms and read by the n8n trigger. Headers are the exact question text, so the imported workflow must reference the same question wording. The included public workflow uses the clean versions shown above without trailing spaces.

Tab 2 — Positive Feedback (rating ≥ 4, AI-analyzed)

Col Header
A Name
B Email
C Rating
D Sentiment
E Problem
F Solution
G Risk Level
H Priority

Tab 3 — Negative Feedback (rating < 4, AI-analyzed)

Identical column structure to Positive Feedback — same eight columns in the same order:

Name · Email · Rating · Sentiment · Problem · Solution · Risk Level · Priority

Tab 4 — Dashboard (auto-generated summary)

Built by the Apps Script. Combines both feedback tabs, sorts by rating (most urgent first), and shows:

  • Totals — all feedback, count from positive sheet, count from negative sheet
  • By Rating — Urgent (1–2 stars) · Watch (3 stars) · Good (4–5 stars)
  • Averages — overall average rating, lowest, highest
  • Color key + the full detail table (Name · Email · Rating · Sentiment · Problem · Solution · Risk Level · Priority)

Column-order note: the Code node extracts Priority before Problem, but the Google Sheets Append nodes map by header name, not by physical column position. That means the public workflow still writes values into the correct sheet columns shown above.


Tech Stack

Tool Role
n8n Connects everything and runs the workflow
Google Forms Collects the raw feedback
Google Sheets Stores raw responses, AI-analyzed data, and the dashboard
Google Sheets API (via n8n) Lets n8n read new form rows and write results back
Mistral AI (via n8n's Mistral Cloud Chat Model node) Reads each comment and writes the analysis
n8n Code node (JavaScript) Splits the AI's text answer into clean columns using regex
Google Apps Script Powers the dashboard tab — totals, urgency buckets, averages

Screenshots

1. The workflow / automation flow

Automation flow diagram: a Google Sheets trigger feeds into a Switch node, which splits into a Positive branch and a Negative branch — each with its own Mistral-powered AI Agent and JavaScript Code node — before appending results to separate Google Sheets tabs. A shared Mistral Cloud model and a Simple Memory node support the agents.

2. Live dashboard (client data blurred)

Google Sheets dashboard tab showing total feedback count, urgency breakdown (Urgent / Watch / Good), and average ratings — all color-coded and auto-updated. Client names, emails, and free-text columns are blurred.

These images are public-safe previews. Any future screenshots should be reviewed before publishing, with names, emails, Sheet IDs, browser bars, and private workflow values removed or blurred.


Setup

What you'll need:

  • An n8n account (cloud or self-hosted) — n8n.io
  • A Google account with access to Sheets and Forms
  • A Mistral AI API key — mistral.ai

Step 1 — Set Up Your Google Sheet

Create a new sheet with these tabs (names matter — the workflow references them):

  • Form_Responses — where the form sends answers
  • Positive Feedback — positive AI-analyzed rows land here
  • Negative Feedback — negative AI-analyzed rows land here
  • Dashboard — the summary tab

Grab your Sheet ID from the URL — it's the long string between /d/ and /edit.

Step 2 — Connect Your Form

Create a Google Form with fields for name, email, star rating, what they liked, and what could improve. Link it to the Form_Responses tab (Forms → Responses → Google Sheets icon).

Step 3 — Build or Import the Workflow

Use the included workflow.json file, or rebuild the flow manually from docs/SETUP.md. If you export your own workflow later, scrub it with docs/WORKFLOW_EXPORT_CHECKLIST.md before replacing the public file.

Open n8n → create a new workflow → click the ... menu → Import from File → select the scrubbed workflow.json. The nodes will appear but won't run until you add credentials.

Step 4 — Add Your Credentials

The workflow ships with placeholders instead of real values. Swap them in:

Placeholder Replace with
YOUR_GOOGLE_SHEET_ID Your Sheet ID from Step 1
YOUR_SHEET_TAB_ID The gid of your Form_Responses tab
YOUR_GOOGLE_SHEETS_TRIGGER_CREDENTIAL_ID Google account connected via n8n credentials
YOUR_GOOGLE_SHEETS_CREDENTIAL_ID Same Google account, used by the write/append nodes
YOUR_MISTRAL_CREDENTIAL_ID Your Mistral API key credential
YOUR_RATING_FORM_FIELD Exact column name of the rating question, for example How would you rate your experience with Alladi?
YOUR_EMAIL_FORM_FIELD Exact column name of the email field, for example What is your email?
YOUR_LIKED_FORM_FIELD Exact column name of the "what did you like" field
YOUR_IMPROVE_FORM_FIELD Exact column name of the "what could improve" field
YOUR_N8N_INSTANCE_ID Filled in automatically by your own n8n instance

Tip: the field placeholders (YOUR_RATING_FORM_FIELD, etc.) must match your form's question text exactly, since Google Sheets uses the question as the column header.

Step 5 — Set Up the Dashboard Script

In your Google Sheet → Extensions → Apps Script → paste the code from apps-script/dashboard.gs → save and run once to authorize. Then add a time-based trigger (Triggers → Add Trigger → buildDashboard → Time-driven) so it refreshes automatically.

Step 6 — Test It

Submit a test response through the form, execute the workflow in n8n, and check that a new row appears in the correct sheet with AI analysis — then verify the dashboard totals updated.


Repo Structure

ai-feedback-routing-system/
├── README.md
├── LICENSE
├── .gitignore
├── workflow.json             ← Credential-free n8n workflow export
├── apps-script/
│   └── dashboard.gs          ← Apps Script for the dashboard tab
├── docs/
│   ├── SETUP.md              ← Rebuild instructions
│   └── WORKFLOW_EXPORT_CHECKLIST.md
├── sample-data/
│   ├── form_responses.csv    ← Fake raw form inputs
│   └── analyzed_feedback.csv ← Fake AI-analyzed outputs
└── screenshots/
    ├── workflow-canvas.png
    └── dashboard.png

Security & Credential Hygiene

This repo is safe to make public. The included workflow.json uses placeholders instead of live secrets. Before publishing any future workflow export:

  • Every credential ID, Sheet ID, webhook URL, and instance ID in workflow.json should be replaced with a YOUR_... placeholder — no OAuth tokens, API keys, or real IDs should be committed.
  • All names, emails, and feedback in the screenshots and sample data are fabricated.
  • .gitignore excludes local env files and any exported workflow that might still contain real credentials, so you don't accidentally commit a live copy.

If you fork this and export your own workflow from n8n, re-scrub it before pushing — n8n exports can embed real credential and instance IDs.

See docs/SECURITY.md for the public-safety checklist used for this repository.


What This Project Demonstrates

  • Multi-branch automation with conditional routing logic
  • Wiring an LLM (Mistral AI) into a real automation workflow
  • Turning unstructured AI text output into structured spreadsheet data
  • Building a live reporting layer on top of automated data
  • Credential hygiene — scrubbing sensitive data, using placeholders, keeping real-looking data out of public screenshots

License

MIT — free to use, modify, and share. See LICENSE.


Author

Built by Akshay.

About

An n8n workflow that uses AI (Mistral) to analyze client feedback sentiment and route it into organized Google Sheets with a live dashboard.

Topics

Resources

Security policy

Stars

2 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages