Triage support emails with Gmail, OpenAI, Slack, and Google Sheets
Ready for 3.0What this workflow does
This AI workflow has 13 nodes and runs on Gmail events. Along the way it connects Gmail, OpenAI and Google Sheets. It also calls slack.com over HTTP.
How it runs
Trigger: On Gmail events.
- Extract Email Data (Edit Fields (Set)): sets 6 fields: customer_email, subject, email_body…
- Get Existing Ticket Rows (Google Sheets): uses Google Sheets
- Find Previous Thread Ticket (Code): runs custom JavaScript code
- AI Classify and Draft Reply (OpenAI): uses OpenAI
- Parse AI Classification (Code): runs custom JavaScript code
- Needs Human Review? (If): checks a condition and branches into true / false
- Pending Human Review (Edit Fields (Set)): sets 1 field: status
- Ready for Quick Review (Edit Fields (Set)): sets 1 field: status
- Build Slack Button Payload (Code): runs custom JavaScript code
- HTTP Request: calls slack.com (POST)
…plus 2 more steps. See the full node list below.
Services it uses
Other Google Sheets + Gmail templates (2,102) · Other OpenAI + Google Sheets templates (2,011) · Other OpenAI + Gmail templates (1,623)
HTTP calls to: slack.com
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.
- Still check Gmail Trigger below v1.4 runs as v1.4 (drafts skipped, max emails per poll) (Gmail Trigger).
- Code node: the task timeout drops from 300s to 60s. Test with a realistic data volume.
Nodes used (7)
- Edit Fields (Set)
n8n-nodes-base.set - If
n8n-nodes-base.if - Gmail Trigger
n8n-nodes-base.gmailTrigger - OpenAI
@n8n/n8n-nodes-langchain.openAi - Code
n8n-nodes-base.code - Google Sheets
n8n-nodes-base.googleSheets - HTTP Request
n8n-nodes-base.httpRequest
From the author
Quick Overview This workflow monitors a labeled Gmail support inbox, uses OpenAI to classify and draft replies with thread context from Google Sheets, then posts each ticket to Slack with approval buttons and logs the Slack metadata and AI fields back to…