Route Gmail emails to Slack by intent using OpenAI and log to Sheets
Ready for 3.0Ready for 3.0. This template uses no nodes that n8n 3.0 removes. No removed nodes, versions or helpers found. Static check, last run 2026-10-19.
What this workflow does
This AI workflow has 9 nodes and runs on Gmail events. Along the way it connects Gmail, OpenAI, Slack and Google Sheets.
How it runs
Trigger: On Gmail events.
- Configure Settings (Edit Fields (Set)): sets 7 fields: slackChannel_sales, slackChannel_support, slackChannel_billing…
- Classify Email Intent (OpenAI): uses OpenAI
- Parse AI Response (Code): runs custom JavaScript code
- Route by Category (Switch): routes items into 3 branches
- Log to Google Sheet (Google Sheets): append
- Send to Sales Channel (Slack): uses Slack
- Send to Support Channel (Slack): uses Slack
- Send to Billing Channel (Slack): uses Slack
Services it uses
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) (Watch for New Emails).
Nodes used (7)
- Gmail Trigger
n8n-nodes-base.gmailTrigger - Edit Fields (Set)
n8n-nodes-base.set - OpenAI
@n8n/n8n-nodes-langchain.openAi - Code
n8n-nodes-base.code - Switch
n8n-nodes-base.switch - Slack
n8n-nodes-base.slack - Google Sheets
n8n-nodes-base.googleSheets
From the author
If your team shares an inbox and someone has to manually read every email to decide where it goes, this workflow takes that off your plate. Emails come in, AI reads them, and the right Slack channel gets notified with a summary and priority level. Who is this…