Triage Gmail inbox, label emails, and draft replies with OpenAI
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-12-01.
What this workflow does
This AI workflow has 10 nodes and runs on Gmail events. Along the way it connects Gmail and OpenAI.
How it runs
Trigger: On Gmail events.
- Sort Emails with AI (OpenAI): uses OpenAI
- If: checks a condition and branches into true / false
- Create Email Draft (Gmail): create (draft)
- If: checks a condition and branches into true / false
- If: checks a condition and branches into true / false
- Label as Spam (Gmail): add labels
- Label as Informational (Gmail): add labels
- Label for User Attention (Gmail): add labels
- Label as Drafted (Gmail): add labels
Services it uses
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.
- Still check Gmail Trigger below v1.4 runs as v1.4 (drafts skipped, max emails per poll) (When New Email Received).
Nodes used (4)
- Gmail Trigger
n8n-nodes-base.gmailTrigger - OpenAI
@n8n/n8n-nodes-langchain.openAi - If
n8n-nodes-base.if - Gmail
n8n-nodes-base.gmail
From the author
Quick overview This workflow watches for new unread Gmail messages, uses OpenAI to classify each email and draft a reply, then either creates a Gmail draft in the original thread and labels the message for follow-up, or files it by applying FYI/Noise labels.…