Triage Gmail, draft replies, and learn filing rules with OpenAI and Slack
Ready for 3.0What this workflow does
This AI workflow has 111 nodes and runs on Gmail events (plus 3 other triggers). Along the way it connects Gmail, Google Sheets, OpenAI and Google Calendar and 1 more.
How it runs
Trigger: On Gmail events (plus 3 other triggers).
- Set Workflow Settings (Edit Fields (Set)): sets 37 fields: dry_run, google_sheet_id, log_sheet_name…
- Route by Trigger Type (Switch): routes items into 4 branches
- Fetch Gmail Labels (Gmail): get many (label)
- Fetch Sender Rules (Google Sheets): read (sheet)
- Merge: merges the data from its input branches
- Fetch Sent Email Threads (Gmail): get many (thread)
- Fetch Existing Rules Log (Google Sheets): read (sheet)
- Fetch Existing Gmail Labels (Gmail): get many (label)
- Aggregate: combines items into one
- Aggregate: combines items into one
…plus 97 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)
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.
- Code node: the task timeout drops from 300s to 60s. Test with a realistic data volume.
Nodes used (22)
- Gmail Trigger
n8n-nodes-base.gmailTrigger - Schedule Trigger
n8n-nodes-base.scheduleTrigger - Manual Trigger
n8n-nodes-base.manualTrigger - Edit Fields (Set)
n8n-nodes-base.set - Switch
n8n-nodes-base.switch - Loop Over Items (Split in Batches)
n8n-nodes-base.splitInBatches - Google Sheets
n8n-nodes-base.googleSheets - Gmail
n8n-nodes-base.gmail - Aggregate
n8n-nodes-base.aggregate - If
n8n-nodes-base.if - OpenAI
@n8n/n8n-nodes-langchain.openAi - Code
n8n-nodes-base.code - Google Calendar
n8n-nodes-base.googleCalendar - Slack
n8n-nodes-base.slack - Filter
n8n-nodes-base.filter - Remove Duplicates
n8n-nodes-base.removeDuplicates - Limit
n8n-nodes-base.limit - HTTP Request
n8n-nodes-base.httpRequest - Split Out
n8n-nodes-base.splitOut - Merge
n8n-nodes-base.merge - Summarize
n8n-nodes-base.summarize - Stop and Error
n8n-nodes-base.stopAndError
From the author
Quick overview This workflow triages incoming Gmail messages with OpenAI, applies category labels, logs outcomes to Google Sheets, and posts high-priority alerts to Slack, while also drafting replies and follow-up nudges and learning sender/domain filing…