Automatic Gmail categorization and labeling with AI
This workflow contains community nodes that are only compatible with the self-hosted version of n8n. Who is this for? If your inbox is full of unread emails, this workflow is for you. Instead of reading through them one by one, let AI do the sorting. It reads your emails and flags only what needs action. What does it solve? This workflow reads your unread Gmail emails and uses AI to decide what’s important — and what’s not. It labels emails that need your attention, identifies re
At a glance
Automatic Gmail categorization and labeling with AI is a ready-made n8n workflow you import as a workflow JSON file — no build required. It connects Gmail, OpenAI. It's free to download. Follow the 5-step import below to go live in minutes.
- Platform
- n8n
- Connects
- Gmail, OpenAI
- Modules
- 13
- Price
- Free
- Version
- v1.0

About this workflow
This workflow contains community nodes that are only compatible with the self-hosted version of n8n. Who is this for? If your inbox is full of unread emails, this workflow is for you. Instead of reading through them one by one, let AI do the sorting. It reads your emails and flags only what needs action. What does it solve? This workflow reads your unread Gmail emails and uses AI to decide what’s important — and what’s not. It labels emails that need your attention, identifies receipts, and trashes everything else. No more manual reading. Just an inbox that uses AI to take care of itself. How it works 1. Every hour, the workflow runs automatically. 2. It searches for unread emails in your Gmail inbox. 3. For each email: - It extracts the content and sends it to OpenAI. 4. The AI returns one of four labels: Action, Receipt, Informational or Spam. 5. Based on the label: - Emails are marked with the appropriate label. - Or moved to trash it is spam. 6. It marks the email as read once processed. How to set up? 1. Connect these services in your n8n credentials: - Gmail (OAuth2) - OpenAI (API key) 2. Create the Gmail labels: - In your Gmail account, create these labels exactly as written: Action, Receipt, and Informational - The workflow will apply these labels based on AI classification. How to customize this workflow to your needs - Change the AI prompt to detect more types of emails like Meeting or Newsletter. - Add more branches to the Switch node to apply custom logic. - Change the schedule to fit your workflow. By default, it runs every hour, but you can update this in the Schedule Trigger node.
How to import this n8n workflow
- 1
Download the workflow JSON file after purchase.
- 2
Open n8n → click the menu → Import from File.
- 3
Select the downloaded JSON and import.
- 4
Set up credentials for each node that requires them.
- 5
Click Execute Workflow to test, then activate.
Setup guide
Setup guide included
Purchase to unlock the full step-by-step guide
Related N8n workflows
Webpage change detection & alerts with Google Suite and hash tracking
Split test different agent prompts with Supabase and OpenAI
Screen and score investment deals with AI using OpenAI, Gmail, and Telegram
AI image generator from text built on fal.ai
Daily AI news digest to LinkedIn posts with OpenAI GPT and RSS feeds
Send to data to Google Sheets with ChatGPT using converted HTML to text from HTTP
Free AI image generator - n8n automation workflow with Gemini/ChatGPT
Generate images from text with IBM Granite Vision 3.3 2B AI model
Reviews
No reviews yet
Be the first to buy and share your experience.
Leave a review
Sign in to share your experience with this workflow.
Create a free account to purchase workflows.
- JSON blueprint — instant download
- Setup guide PDF included
- 5 downloads · valid 30 days
- Works with n8n
Need help setting this up?
Book a 3-hour live setup session with an Agility consultant.
- Configure live on Google Meet / Zoom
- Free follow-up if workflow has defects
- Platform expert assigned to you