Categorise and label Gmail emails with GPT-4o and 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 7 nodes and runs on Gmail events. Along the way it connects OpenAI and Gmail.
How it runs
Trigger: On Gmail events.
- Categorize Email (OpenAI): uses OpenAI
- Not Worthwhile (Filter): keeps only the items that match a condition
- Get Email (Gmail): get many
- Remove from Inbox (Gmail): remove labels
- Add to folder (Gmail): add labels
- Get many labels (Gmail): work with label
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) (Gmail Trigger).
Nodes used (4)
- OpenAI
@n8n/n8n-nodes-langchain.openAi - Filter
n8n-nodes-base.filter - Gmail
n8n-nodes-base.gmail - Gmail Trigger
n8n-nodes-base.gmailTrigger
From the author
Automatically organise your Gmail inbox using AI. This workflow categorises every incoming email and applies Gmail labels, keeping only important emails in your inbox while filing everything else automatically. Who is this for? Anyone overwhelmed by email…