Triage email complaints and track SLA breaches with Gmail, OpenAI and Slack
Ready for 3.0What this workflow does
This AI workflow has 32 nodes and runs on Gmail events (plus 3 other triggers). Along the way it connects Gmail, OpenAI Chat Model and Slack.
How it runs
Trigger: On Gmail events (plus 3 other triggers).
- Set Email Metadata (Edit Fields (Set)): sets 6 fields: complaint_id, email_message_id, customer_name…
- Fetch Open Complaints (Data table): get
- Set Resolve Metadata (Edit Fields (Set)): sets 1 field: complaint_id
- Fetch All Complaints (Data table): get
- Triage Complaint Agent (Basic LLM Chain): sends a prompt to an LLM, with model: OpenAI Triage Model; output parser: Parse Triage Output
- Filter: keeps only the items that match a condition
- Fetch Complaint Details (Data table): get
- Create Statistics Report (Code): runs custom JavaScript code
- Build Triage Result (Edit Fields (Set)): sets 12 fields: complaint_id, email_message_id, customer_name…
- Notify SLA Breach (Slack): uses Slack
…plus 14 more steps. See the full node list below.
Services it uses
Other OpenAI + Gmail templates (1,623) · Other OpenAI + Slack templates (979) · Other Gmail + Slack templates (957)
Before you upgrade to n8n 3.0
Nothing in this workflow is removed in n8n 3.0, so it should import and run after the upgrade.
Nodes used (14)
- Gmail Trigger
n8n-nodes-base.gmailTrigger - Edit Fields (Set)
n8n-nodes-base.set - Basic LLM Chain
@n8n/n8n-nodes-langchain.chainLlm - OpenAI Chat Model
@n8n/n8n-nodes-langchain.lmChatOpenAi - Structured Output Parser
@n8n/n8n-nodes-langchain.outputParserStructured - If
n8n-nodes-base.if - Data table
n8n-nodes-base.dataTable - Code
n8n-nodes-base.code - Slack
n8n-nodes-base.slack - No Operation, do nothing
n8n-nodes-base.noOp - Schedule Trigger
n8n-nodes-base.scheduleTrigger - Filter
n8n-nodes-base.filter - Webhook
n8n-nodes-base.webhook - Respond to Webhook
n8n-nodes-base.respondToWebhook
From the author
Quick overview This workflow monitors unread Gmail inbox emails, uses OpenAI to detect and classify customer complaints, stores them in n8n Data Tables with SLA deadlines, and notifies Slack, then escalates breached SLAs, supports resolution via webhook, and…