Templates / Triage customer complaint emails from Gmail with GPT-4o-mini, Slack and Sheets

Triage customer complaint emails from Gmail with GPT-4o-mini, Slack and Sheets

Needs changes

by Incrementors ✓ · 86 views · created 2026-04-10 · Ticket Management, AI Summarization

Needs changes. This template uses 1 thing(s) that n8n 3.0 removes: AI Agent v1 (old agent modes). 1 breaking item(s) found. Static check, last run 2026-10-19.

What to replace before upgrading

Removed in 3.0Replace with
AI Agent v1 (old agent modes)
5. AI Agent — Triage Complaint (v1.7)
Latest AI Agent node (Tools Agent). For SQL Agent, use a Postgres or MySQL tool with a recent AI Agent.

Worth a look

Nodes used (10)

GmailAI AgentOpenAI Chat ModelStructured Output ParserGoogle SheetsSlack

What it does

Description Activate this workflow once and it monitors your Gmail inbox every minute automatically. Every incoming email is scanned for complaint keywords — and if a complaint is detected, GPT-4o-mini scores its urgency, identifies the right department, writes a one-line summary, and drafts a ready-to-send reply. The complaint is logged to Google Sheets and a formatted alert is posted to the correct Slack channel instantly. Built for support teams, customer success managers, and small businesses who can't afford to miss or delay a complaint. --- What This Workflow Does - Automatic inbox monitoring — Checks your Gmail every minute so no complaint sits unread while your team is busy with other work - Keyword-based complaint detection — Scans subject lines and email bodies for 12 complaint signals and silently ignores everything else - AI urgency scoring — Rates every complaint from 1 to 10 so your team knows at a glance what needs attention first - Department routing — Classifies each complaint as Billing, Technical, or General and sends the alert to the right Slack channel automatically - Reply draft generation — GPT-4o-mini writes a professional, empathetic reply your agent can send immediately — no drafting from scratch - Permanent complaint log — Appends a 12-column record to Google Sheets for every complaint, giving you a searchable history for reporting and pattern analysis - Clean non-complaint exit — Emails that are not complaints pass through silently without triggering any logging or alerts --- Setup Requirements Tools Needed - n8n instance (self-hosted or cloud) - Gmail account (the inbox you want monitored) - OpenAI account with GPT-4o-mini API access - Slack workspace with OAuth2 app configured - Google Sheets (one sheet with a tab named Complaint Log) Credentials Required - Gmail OAuth2 - OpenAI API key - Slack OAuth2 - Google Sheets OAuth2 Estimated Setup Time: 15–20 minutes --- Step-by-Step Setup 1. Import the workflow — Open n8n → Workflows → Import from JSON → paste the workflow JSON → click Import 2. Connect Gmail — Open node 1. Gmail — Inbox Monitor → click the credential dropdown → select OAuth2 → sign in with the Gmail account you want monitored → authorize access 3. Fill in your config values — Open node 2. Set — Config Values → replace all seven placeholders: | Field | What to put here | |---|---| | YOUR COMPANY NAME | Your business name (used in the AI reply) | | YOURGOOGLESHEETID | The ID from your Google Sheet URL (the string between /d/ and /edit) | | Complaint Log | Leave as-is, or match your sheet tab name exactly | | billing-support | Your Slack channel for billing complaints | | tech-support | Your Slack channel for technical complaints | | customer-support | Your Slack channel for general complaints | | [email protected] | Your support team's reply-from email | 4. Connect OpenAI — Open node 6. OpenAI — GPT-4o-mini Model → click the credential dropdown → add your OpenAI API key → test the connection 5. Connect Google Sheets — Open node 9. Google Sheets — Log Complaint → click the credential dropdown → connect your Google account via OAuth2 → make sure your sheet has a tab named exactly Complaint Log with these 12 column headers in row 1: Email ID, Received Date, Sender Name, Sender Email, Subject, One Line Summary, Department, Urgency Score, Urgency Level, Suggested Reply, Slack Channel Alerted, Logged At 6. Connect Slack — Open node 10. Slack — Send Department Alert → click the credential dropdown → connect your Slack workspace via OAuth2 → invite the n8n bot to all three complaint channels in Slack (/invite @n8n in each channel) 7. Activate the workflow — Toggle the workflow to Active — it will begin polling Gmail every minute immediately --- How It Works (Step by Step) Step 1 — Gmail: Inbox Monitor This step checks your Gmail inbox every 60 seconds for new emails. Every new message that arrives is passed to the next step for processing. Nothing is read, flagged, or deleted — it is read-o

View the original on n8n.io → Check your own copy

Get the weekly “what broke” email

New templates, newly broken ones, and n8n release changes. One short email a week.

Form not loading? Subscribe here.