Skip to content

About

Automatically analyze customer feedback using AI and route it to the right team channels — eliminating manual triage and enabling real-time sentiment tracking.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

3 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🔗 AI-Powered Customer Feedback Automation

End-to-End Feedback Processing with AI Analysis & Intelligent Routing

n8n Docker Tally.so PostgreSQL Discord

OpenAI Hugging Face LM Studio

Status License Local

📖 Overview

Automatically analyze customer feedback using AI and route it to the right team channels — eliminating manual triage and enabling real-time sentiment tracking.

❌ The Problem

  • Manual reading and categorization of every customer submission
  • Slow response times due to human triage bottlenecks
  • Prone to misrouting and classification errors
  • No systematic tracking of sentiment or recurring issues
  • Image attachments require additional manual review
  • Valuable customer insights lost in cluttered inboxes

✅ The Solution

n8n Workflow Preview

n8n workflow: Form submission → AI analysis → Smart Channel routing

An end-to-end intelligent automation that:

  • Captures customer feedback via public web form
  • Analyzes sentiment automatically (Positive, Negative, Neutral)
  • Classifies feedback into relevant categories without manual tagging
  • Extracts keywords from uploaded images using vision capabilities
  • Stores all processed data in a database for tracking and analytics
  • Routes feedback to the appropriate team channel using smart decisions
  • Sends rich notifications with complete feedback details and insights

💡 Once deployed, every submission is automatically analyzed, categorized, stored, and routed — with zero manual intervention.

🎬 Demo

For a full walkthrough of the system, watch the complete demo video.

✨ Key Features

  • 📝 Public Feedback Collection — Collect customer feedback via shareable Tally.so forms (Name, Email, Feedback, optional Image)
  • ⚡ Instant Webhook Processing — Submissions trigger the workflow in real-time with zero delays
  • 🧠 AI-Powered Sentiment Analysis — Automatically detect customer sentiment (Positive, Negative, Neutral) using local LLM
  • 🏷️ Zero-Shot Text Classification — Categorize feedback into pre-defined labels without model training
  • 🖼️ Multimodal Image Analysis — Extract keywords from uploaded images using Qwen2-VL vision capabilities
  • 🔀 Intelligent Channel Routing — AI-driven decisions to route feedback to appropriate Discord channels
  • 💾 Automated Data Storage — All processed feedback stored in PostgreSQL with structured schema
  • 💬 Real-Time Discord Alerts — Instant embed notifications with feedback details and AI insights
  • 🏠 Fully Local AI Processing — Privacy-first approach with on-device LLM inference via LM Studio
  • 🐳 Dockerized Deployment — One-command setup using Docker Compose for PostgreSQL, Adminer, and n8n
  • 💸 100% Free & Open Source — Built entirely on free-tier services and open-source tools with no ongoing costs

🛠️ Tech Stack

Category Technology Description Link
Workflow Automation n8n Community Edition Self-hosted workflow orchestration for form processing, AI analysis, and routing n8n.io
Form Handling Tally.so Free form builder for public feedback collection (Name, Email, Feedback, optional Image) tally.so
AI/ML Inference OpenAI Node + LM Studio + Qwen2-VL-7B-Instruct n8n's OpenAI node configured with custom Base URL pointing to LM Studio's local server hosting Qwen2-VL (GGUF, Q4_K_M).

Tasks:
• Sentiment analysis
• Zero-shot text classification
• Image keyword extraction
• Intelligent routing decisions
OpenAI Node / LM Studio / Qwen2-VL
Database PostgreSQL + Adminer Relational database for storing processed feedback with lightweight management UI PostgreSQL / Adminer
Notifications Discord Channel-based routing for customer feedback to relevant team channels discord.com
Containerization Docker + Docker Compose Multi-container orchestration for PostgreSQL, Adminer, and n8n via docker-compose.yml Docker / Compose

🔄 Automation Flow

                      User submits feedback form (Tally.so)
                                      ↓
                              Tally Trigger
                                      ↓
                               Field Mapping
                                      ↓
        ┌─────────────────────────────┼─────────────────────────────┐
        ↓                             ↓                             ↓
   Sentiment                       Text                        Fetch Image
   Analysis                    Classification                       ↓
        ↓                             ↓                    ┌────────┴────────┐
   Sentiment                   Classification              ↓                 ↓
      LLM                            LLM              Has Image?        No Image?
        ↓                             ↓                    ↓                 ↓
   Sentiment                   Classification           Image            Empty
    Parser                        Parser              Keyword           Keywords
        ↓                             ↓              Extraction          Handler
        │                             │                    ↓                 ↓
        │                             │                    └────────┬────────┘
        │                             │                             ↓
        │                             │                    Image Results Merge
        │                             │                             ↓
        └─────────────────────────────┴─────────────────────────────┘
                                      ↓
                              AI Results Merge
                                      ↓
                              Data Aggregation
                                      ↓
                             Save to PostgreSQL
                                      ↓
                               Decision Logic
                                      ↓
                                Routing LLM
                                      ↓
                                Route Parser
                                      ↓
                               Channel Router
                                      ↓
          ┌───────────────────────────┼───────────────────────────┐
          ↓                           ↓                           ↓
 #general-inquiries           #happy-customers           #support-urgent
          ↓                           ↓                           ↓
          └───────────────────────────┴───────────────────────────┘
                                      ↓
                           Build Discord Message
                                      ↓
                             Format Embed Data
                                      ↓
                         Send Discord Notification

📋 Prerequisites

Before you begin, make sure you have the following set up:


🖥️ Software Requirements

Software Version Purpose Installation Guide
Docker 28.5.1+ Container runtime for services Install Docker
n8n 1.121.3 (latest) Workflow automation platform n8n Docker Setup
LM Studio 0.3.36+ Local LLM hosting with OpenAI-compatible API Download LM Studio

Verify Installation:

# Check Docker
docker --version
# Expected: Docker version 28.0.0 or higher

🤖 LM Studio Setup

Requirement Details
Model Qwen2-VL-7B-Instruct
Format GGUF
Quantization Q4_K_M
Server Port 1234 (default)
Base URL http://192.168.56.1:1234/v1

Setup Steps:

  • Download and install LM Studio
  • Download Qwen2-VL-7B-Instruct model (GGUF, Q4_K_M quantization)
  • Load the model in LM Studio
  • Start the local server (default port: 1234)
  • Note your machine's IP address for Base URL configuration

📘 Guide: LM Studio Local Server Setup


🔐 Account & API Requirements

Service Free Tier Purpose Signup / Setup
Tally.so ✅ Yes Form builder for feedback collection Create Account
Discord ✅ Yes Team notifications & channel routing Create Server
PostgreSQL ✅ Yes (Docker) Database for storing processed feedback Included via Docker Compose
Adminer ✅ Yes (Docker) Database management UI Included via Docker Compose

🔑 Credentials Checklist

Ensure you have the following credentials ready before configuring n8n:

Tally.so

  • API Key (for webhook authentication)
  • Allowed HTTP Request Domains: All

📘 Guide: Getting your Tally API Key

OpenAI Node (LM Studio)

  • API Key (can be any string, e.g., lm-studio or dummy key)
  • Base URL: http://<YOUR_IP>:1234/v1
  • Organization ID: (optional, leave blank)
  • Allowed HTTP Request Domains: All

⚠️ Note: Since you're using LM Studio locally, the API Key can be any placeholder value. The Base URL must point to your LM Studio server.

Discord Bot

  • Bot Token (MTI...)
  • Allowed HTTP Request Domains: All
  • Bot Permissions: Send Messages, Embed Links
  • Bot added to your Discord server

📘 Guide: Creating a Discord Bot

PostgreSQL

  • Host: db (Docker service name)
  • Database: postgres
  • User: <user_name>
  • Password: <password>
  • Port: 5432 (default)

📘 Note: These credentials are configured in your docker-compose.yml file.


📁 Required Setup

Before running the workflow, ensure the following are created:

Tally.so Form

  • Create a form with the following fields:
Field Name Type Required
Name Text ✅ Yes
Email Email ✅ Yes
Feedback Long Text ✅ Yes
Image File Upload ❌ No
  • Publish the form and copy the Form ID from the URL
  • Configure webhook to point to your n8n instance

Discord Server

  • Create a Discord server (or use existing)
  • Create the following channels:
Channel Name Purpose
#general-inquiries General feedback & questions
#happy-customers Positive feedback & testimonials
#support-urgent Urgent issues & negative feedback
  • Note the Channel IDs for each channel
  • Add your Discord Bot to the server

💡 Tip: To get Channel ID, enable Developer Mode in Discord settings, then right-click channel → Copy ID

PostgreSQL Database

  • Database and table will be auto-created via Docker Compose
  • Verify connection using Adminer at http://localhost:8080

🌐 Network Configuration

Service Local URL Port Access Method
n8n http://localhost:5678 5678 Browser
Adminer http://localhost:8080 8080 Browser (PostgreSQL management)
LM Studio http://192.168.56.1:1234/v1 1234 API only

⚠️ Important: PostgreSQL runs on port 5432 but is not browser-accessible. Use Adminer at localhost:8080 to manage your database.

🚀 Quick Start

1️⃣ Clone the Repository

# Clone the repo
git clone https://github.com/Neloy-Barman/AI-Powered-Customer-Feedback-Automation.git

# Navigate to the project directory
cd AI-Powered-Customer-Feedback-Automation

2️⃣ Configure Docker Environment

Before starting the containers, configure your PostgreSQL credentials in docker-compose.yml:

# Open docker-compose.yml and update these values
services:
  db:
    environment:
      POSTGRES_USER: <user_name>        # Preferred username
      POSTGRES_PASSWORD: <password>     # Set a secure password
      POSTGRES_DB: postgres             # Database Name

⚠️ Important: Remember these credentials — you'll need them when configuring n8n PostgreSQL connection.


3️⃣ Start Docker Containers

Ensure Docker Desktop is running in the background, then start the containers:

# Start the containers in detached mode
docker compose up -d

This will spin up:

Service URL Purpose
n8n http://localhost:5678 Workflow automation
Adminer http://localhost:8080 Database management UI
PostgreSQL Port 5432 Data storage

💡 Check container logs in Docker Desktop GUI to confirm successful startup.

Verify PostgreSQL is Running:

Access Adminer at http://localhost:8080 and login with:

Field Value
System PostgreSQL
Server db
Username <user_name> (or your configured username)
Password <password> (your configured password)
Database postgres (or your configured database)

3️⃣ Start LM Studio Server

  1. Open LM Studio application
  2. Load Qwen2-VL-7B-Instruct model (GGUF, Q4_K_M)
  3. Navigate to Local Server tab
  4. Click Start Server (default port: 1234)
  5. Note your machine's IP address (e.g., 192.168.56.1)

⚠️ Ensure the server is running before activating the n8n workflow.


4️⃣ Access n8n Interface

Open your browser and navigate to:

http://localhost:5678

Create an account or log in if prompted.


5️⃣ Import the Workflow

  1. Click the ... menu in the top-right corner
  2. Select Import from File
  3. Choose AI-Powered-Customer-Feedback-Automation.json from the workflows directory

6️⃣ Configure Credentials

Set up the required credentials in n8n:

Credential Navigation Required Values
Tally.so Settings → Credentials → Add → Tally API Key
OpenAI Settings → Credentials → Add → OpenAI API Key (any placeholder), Base URL (http://<YOUR_IP>:1234/v1)
PostgreSQL Settings → Credentials → Add → Postgres Host: db, Database: postgres, User, Password
Discord Settings → Credentials → Add → Discord Bot Bot Token

📘 Refer to Prerequisites for detailed credential setup guides.


7️⃣ Set Up Discord Server

Create the following channels in your Discord server:

Channel Name Purpose
#general-inquiries General feedback & questions
#happy-customers Positive feedback & testimonials
#support-urgent Urgent issues & negative feedback

Then update the workflow nodes with corresponding Channel IDs.

💡 Tip: Enable Developer Mode in Discord (Settings → Advanced), then right-click channel → Copy ID


8️⃣ Create Tally.so Form

Create a public form with the following fields:

Field Name Type Required
Name Text ✅ Yes
Email Email ✅ Yes
Feedback Long Text ✅ Yes
Image File Upload ❌ No

Publish the form and connect it to the workflow trigger.


9️⃣ Update Workflow Parameters

Open the imported workflow and update these nodes:

Node Parameter Value
Tally Trigger Form Select your Tally form
Channel Router Channel IDs Your Discord channel IDs
Save to PostgreSQL Credentials Your PostgreSQL credentials

🔟 Activate the Workflow

  1. Toggle the Active switch in the top-right corner
  2. Status should show Active (green)

✅ Setup Complete!

Your automation is now live. Submit a test feedback through your Tally.so form and watch the magic happen! ✨

💡 Head over to 📘 Usage to learn how to test and manage the workflow.

📘 Usage

🎯 User Entry Points

User Type Entry Point Purpose
Customer Tally.so Form URL Submit feedback with optional image
Admin n8n Interface (localhost:5678) Monitor and manage workflow
Admin Adminer (localhost:8080) View and manage database records
Team Discord Channels Receive routed feedback notifications

1️⃣ Submitting Feedback

Share your Tally.so form URL publicly. Customers fill in the following:

Field Type Required Example
Name Text ✅ Yes Jane Smith
Email Email ✅ Yes [email protected]
Feedback Long Text ✅ Yes The product quality exceeded my expectations!
Image File Upload ❌ No damaged_product.jpg

💡 The Feedback content determines sentiment, classification, and channel routing automatically.


2️⃣ Testing the Workflow

To verify everything works correctly:

  1. Ensure LM Studio server is running with model loaded
  2. Open n8n interface at http://localhost:5678
  3. Open the AI-Powered-Customer-Feedback-Automation workflow
  4. Click on each node sequentially
  5. Click Test Step to execute individually
  6. Verify outputs at each stage

Sample Test Data:

Scenario Name Email Feedback Expected Channel
Positive Jane Smith [email protected] The product quality exceeded my expectations! #happy-customers
Negative John Doe [email protected] I got a broken Iphone delivered at my home. #support-urgent
Neutral Alex Brown [email protected] Are you guys available at 12:00 pm? #general-inquiries

3️⃣ Expected Outputs

After a successful submission:

Output Location What to Expect
Database Record PostgreSQL (via Adminer) New row with feedback and AI analysis
Discord Message Routed channel Embed notification with feedback details

Database Record Structure:

Column Example Value
id 1
name John Doe
email [email protected]
feedback I got a broken Iphone delivered at my home.
sentiment Negative
category Product Quality & Features
image_keywords broken, cracked, or damaged product
img_url https://tally.so/uploads/image123.jpg

Discord Notifications:

Positive Feedback → #happy-customers

🎉 Happy Customer Alert
Positive feedback from a satisfied customer.

👤 Customer Info
Jane Smith ([email protected])

✉️ Feedback
The product quality exceeded my expectations!

📝 Model Analysis
Customer Jane Smith praises our service, noting that it exceeded their expectations.

📝 Automated Feedback Summary

Neutral Feedback → #general-inquiries

🔹 General Feedback Alert
A new general feedback or inquiry has been received.

👤 Customer Info
Alex Brown ([email protected])

✉️ Feedback
Are you guys available at 12:00 pm?

📝 Model Analysis
Customer Alex Brown inquires about availability at 12:00 pm.

📝 Automated Feedback Summary

Negative Feedback → #support-urgent

⚠️ Urgent Support Required
Immediate attention needed for this customer feedback.

👤 Customer Info
John Doe ([email protected])

✉️ Feedback
I got a broken Iphone delivered at my home.

📝 Model Analysis
Customer John Doe reports a broken Iphone delivered at their home, requiring immediate resolution to prevent further inconvenience.

📝 Automated Feedback Summary

4️⃣ AI Processing Details

Each submission undergoes the following analysis:

Sentiment Analysis:

Output Description
Positive Satisfied customer, praise, recommendations
Negative Complaints, issues, urgent problems
Neutral General questions, inquiries

Text Classification Categories:

Category Description
Product Quality & Features Comments about product performance, durability, functionality, or characteristics
Shipping & Delivery Issues or feedback about shipping speed, packaging, delivery experience, or logistics
Customer Support Experience Interactions with support team, response times, helpfulness of staff
Pricing & Billing Comments about prices, charges, payment issues, value for money
Return & Refund Request Requests to return products or get refunds, return policy questions
Website / App Usability Navigation issues, checkout problems, app bugs, user interface feedback
Positive Feedback General satisfaction, compliments, recommendations, praise
General Inquiry Questions or comments that don't fit other categories

Image Keyword Extraction:

Keyword Description
broken, cracked, or damaged product Product defects or physical damage
damaged or torn packaging Packaging issues during shipping
showing wrong item delivery Incorrect item received
new and intact product Product in good condition
a screenshot of a website or order confirmation Digital proof or reference
a blurry, dark, or unclear photo Poor image quality
an irrelevant photo (e.g., a person, pet, or scenery) Non-related image content

Channel Routing Logic:

Sentiment Routed To Alert Type
Positive #happy-customers 🎉 Happy Customer Alert
Negative #support-urgent ⚠️ Urgent Support Required
Neutral #general-inquiries 🔹 General Feedback Alert

5️⃣ Success Indicators

✅ Submission successful when:

  • New record appears in PostgreSQL database
  • Discord notification received in correct channel
  • Sentiment correctly identified
  • Category properly classified
  • Image keywords extracted (if image provided)
  • Model analysis summary generated

❌ Something went wrong if:

  • No new record in database
  • No Discord notification
  • Error shown in n8n execution log
  • LM Studio server not responding

Troubleshooting:

Issue Possible Cause Solution
No AI analysis LM Studio not running Start LM Studio server
Database error PostgreSQL container down Run docker compose up -d
No Discord message Invalid Bot Token Verify Discord credentials
Webhook not triggered Form not connected Check Tally.so integration
Wrong channel routing Sentiment misclassified Check LLM model is loaded correctly

6️⃣ Managing the Workflow

Check Workflow Status:

  1. Open n8n interface at http://localhost:5678
  2. Locate AI Customer Feedback Automation workflow
  3. Check the toggle — Green = Active, Gray = Inactive

Stop the Workflow:

docker compose down

Restart the Workflow:

docker compose up -d

View Logs:

docker compose logs -f

Access Database:

  1. Open Adminer at http://localhost:8080
  2. Login with PostgreSQL credentials
  3. Navigate to feedback table to view all records

7️⃣ Monitoring & Analytics

Use Adminer to run queries for insights:

-- Count feedback by sentiment
SELECT sentiment, COUNT(*) FROM feedback GROUP BY sentiment;

-- Recent negative feedback requiring attention
SELECT * FROM feedback WHERE sentiment = 'Negative' ORDER BY id DESC LIMIT 10;

-- Most common categories
SELECT category, COUNT(*) FROM feedback GROUP BY category ORDER BY COUNT(*) DESC;

-- All feedback with images attached
SELECT * FROM feedback WHERE img_url IS NOT NULL;

📄 License

This project is licensed under the MIT License — see the LICENSE file for details.

👤 Author

Neloy Barman – AI Agent Builder | Automation Engineer | Chatbot Developer


Built with ☕ and automation in mind by Neloy Barman


📝 Documentation crafted with assistance from Claude AI

About

Automatically analyze customer feedback using AI and route it to the right team channels — eliminating manual triage and enabling real-time sentiment tracking.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors