AI-Powered Gmail Inbox Classifier with OpenRouter & Gemini
detail.loadingPreview
Automatically sort and label your incoming Gmail emails using advanced AI. This workflow leverages Gemini 2.5 Flash via OpenRouter to classify emails into predefined categories, keeping your inbox organized and prioritized without manual effort.
About This Workflow
Revolutionize your email management with this intelligent n8n workflow. It automatically intercepts new Gmail messages, sends snippets to an AI model (Google Gemini 2.5 Flash via OpenRouter) for classification, and then applies the appropriate label directly in Gmail. Categories include 'To respond', 'FYI', 'Marketing', and more, ensuring your most important emails are always prioritized and easily found. Free up valuable time and achieve an effortlessly organized inbox with this powerful automation.
Key Features
- AI-Powered Classification: Utilizes Google Gemini 2.5 Flash via OpenRouter for highly accurate email categorization.
- Customizable Labeling: Classifies emails into 8 predefined categories (e.g., To respond, FYI, Marketing, Notification), fully customizable to your needs.
- Automated Gmail Integration: Automatically fetches available Gmail labels and applies the AI-determined label to new messages.
- Smart Inbox Organization: Reduces manual sorting, allowing you to focus on high-priority communications.
- Easy-to-Configure LLM: Seamlessly connects to OpenRouter for flexible access to various AI models.
How To Use
- Connect Gmail Account: In the 'New Gmail Email Received' and 'Apply Classification Label' nodes, connect your Gmail OAuth2 credentials.
- Verify Gmail Labels: Ensure you have the 8 classification labels (e.g., 'To respond', 'FYI', 'Marketing', 'Notification') created in your Gmail account. The workflow fetches these dynamically.
- Connect OpenRouter Credentials: Provide your OpenRouter API key in the 'OpenRouter Chat Model' node.
- Customize Classification Prompt (Optional): Modify the prompt in the 'Classify Email with AI' node to adjust classification rules or add/remove categories.
- Activate Workflow: Enable the workflow to start automatically classifying and labeling your incoming Gmail emails.
Apps Used
Workflow JSON
{
"id": "b8b9ad2b-f95f-4228-bdb8-f8265daafe70",
"name": "AI-Powered Gmail Inbox Classifier with OpenRouter & Gemini",
"nodes": 28,
"category": "Personal",
"status": "active",
"version": "1.0.0"
}Note: This is a sample preview. The full workflow JSON contains node configurations, credentials placeholders, and execution logic.
Get This Workflow
ID: b8b9ad2b-f95f...
About the Author
DevOps_Master_X
Infrastructure Expert
Specializing in CI/CD pipelines, Docker, and Kubernetes automations.
Statistics
Related Workflows
Discover more workflows you might like
Send Obsidian Notes as Emails with Dynamic Attachments
This workflow empowers you to transform your Obsidian notes into dynamic emails, complete with custom metadata from YAML frontmatter and automated attachment handling. Seamlessly share your thoughts and files directly from your preferred note-taking environment.
Smart Expense Tracking with Telegram & AI
Automate your personal finance management by turning your Telegram chat into an intelligent expense tracker. Simply send a photo of a receipt or a text message, and this workflow uses AI to categorize your spending, extract crucial details, and provide instant summaries.
Voice Task to Notion: AI-Powered Processing
This n8n workflow automates the intelligent processing of voice-activated tasks intended for Notion or similar tools. It leverages advanced AI to understand inputs, builds a dynamic knowledge base from them, and logs processing outcomes to Google Sheets. Instantly get alerted via Slack for any errors, ensuring reliable task management.