Analyze customer feedback and alert negative sentiment with GPT-4o-mini and Telegram
Quick overview This workflow receives customer feedback via a webhook, logs it to Google Sheets, uses OpenAI to classify sentiment and summarize the message, and sends a Telegram alert when the sentiment is negative.
How it works Receives customer feedback in a POST request via a webhook endpoint. Normalizes the incoming payload into consistent fields (name, email, rating, message, source) and adds a received timestamp. Appends the normalized feedback as a new row in a Google Sheets “Feedback” worksheet. Sends the feedback details to OpenAI (GPT-4o-mini) to return a JSON analysis with sentiment, category, summary, and suggested action. Extracts the analysis fields from the OpenAI JSON response and combines them with the original feedback details. If the sentiment is negative, sends a formatted alert message to a Telegram chat.
Setup Create a webhook consumer (e.g. your website form or app) and configure it to POST feedback data to the workflow’s webhook URL. Add a Google Sheets OAuth credential and set the target spreadsheet ID and worksheet name (currently document ID “1uw7UaNuorGIbgEtPSANNT8SdiS6qnnArvJVwbfrMpi4” and sheet “Feedback”). Ensure the Google Sheet has columns for received_at, name, email, rating, source, message, sentiment, category, and summary. Add an OpenAI API credential for the OpenAI node. Add a Telegram bot credential and update the target chat ID (currently set to 7040749953).
Requirements • A webhook-capable source system (form, app, or API) that sends feedback • Google account with access to the target Sheets document • OpenAI API key with credits • Telegram bot token and chat ID for alerts
Customization • Change the sentiment categories or trigger condition in the IF node • Adjust the OpenAI prompt to extract different fields • Modify the Telegram alert message formatting • Add extra fields to the Google Sheets log
Additional info Tested on n8n self-hosted and compatible with n8n cloud. Uses only built-in n8n nodes.
Related Templates
AI Email Classifier & Auto-Delete for Gmail (SPAM/OFFER Cleaner)
This workflow is designed for freelancers, solopreneurs, and business owners who receive a high volume of irrelevant mes...
Generate Product Ad Copy & CTAs with GPT-4 for Slack and Airtable
⚡ AI Copywriter Pro: Instant Ad Copy & CTA Generator Transform product details into compelling marketing copy in second...
Auto-classify Gmail emails with AI and apply labels for inbox organization
Who is this for? Professionals and individuals who receive high volumes of emails, those who want to automatically organ...
🔒 Please log in to import templates to n8n and favorite templates
Workflow Visualization
Loading...
Preparing workflow renderer
Comments (0)
Login to post comments