Triage support tickets by GPT-4o sentiment and route them to Slack

Analyze customer support ticket sentiment and route to Slack channels

Who is this for

Customer support teams, customer experience managers, and operations teams that need to triage incoming support tickets in real time without manual classification. Ideal for SaaS companies, e-commerce businesses, and service providers handling high ticket volumes.

What this workflow does

This workflow automatically triages incoming customer support tickets by sentiment using OpenAI GPT-4o. A ticket arrives via webhook, is normalized, analyzed for anger intensity (scored 0-10), and routed to the correct Slack channel in real time. High-anger tickets are escalated immediately, mid-range tickets go to standard support, and low-anger tickets or feedback are logged separately.

How to set up

Add your OpenAI API credential to the AI sentiment analysis node Add your Slack OAuth2 credential to all three Slack nodes Update Slack channel names (#escalation / #support / #feedback) to match your workspace Activate the workflow and copy the webhook URL for your support form integration Send a test request to verify end-to-end execution

Requirements

OpenAI API account with GPT-4o access Slack workspace with OAuth2 app installed (chat:write scope) Three Slack channels: one for escalation, one for support, one for feedback

How to customize

Adjust the anger score thresholds in the Switch node to match your team's escalation policy. Modify the GPT-4o prompt to detect additional sentiment categories or extract custom fields from tickets. Add language detection for multilingual support.

Node List

| # | Node Name | Type | Role | |---|-----------|------|------| | 1 | When Ticket Received | Webhook | Trigger on incoming HTTP POST request | | 2 | Normalize Ticket Data | Code | Sanitize and validate ticket fields | | 3 | OpenAI Sentiment Analysis | OpenAI | AI anger scoring and sentiment tagging | | 4 | Parse Sentiment Output | Code | Parse JSON output and decide routing | | 5 | Route by Sentiment Score | Switch | 3-way branch: ≥8 / 4-7 / ≤3 | | 6 | Send to Slack #escalation | Slack | Alert for high-anger tickets | | 7 | Send to Slack #support | Slack | Notification for mid-range tickets | | 8 | Send to Slack #feedback | Slack | Log for low-anger tickets or feedback | | 9 | Respond with Routing Outcome | Respond to Webhook | Confirm result to the caller |

Total: 9 nodes (+ 5 Sticky Notes)

Sticky Note Compliance

| # | Sticky Note Title | Color | Role | |---|-------------------|-------|------| | 1 | Main Sticky Note (Overview) | Yellow | Workflow overview, How it works, Setup steps, Customization | | 2 | Receive and normalize | White | Covers webhook reception and data normalization | | 3 | Analyze sentiment | White | Covers GPT-4o sentiment analysis | | 4 | Parse and route | White | Covers JSON parsing and routing logic | | 5 | Post to Slack channels | White | Covers all 3 Slack post nodes and webhook response |

All sticky notes use H2 headings (## ) and follow n8n public guidelines.

Tags

ai gpt-4 openai slack customer-support sentiment-analysis automation

0
Downloads
0
Views
8.03
Quality Score
beginner
Complexity
Author:TakatoYamada(View Original →)
Created:5/5/2026
Updated:5/5/2026

🔒 Please log in to import templates to n8n and favorite templates

Workflow Visualization

Loading...

Preparing workflow renderer

Comments (0)

Login to post comments