Automatically classify and label Gmail emails with Google Gemini
Description Quickly organize your inbox with AI! This simple workflow automatically classifies incoming emails into different categories — like High Priority...
🔌 Nodes & Integrations Used (6)
📖 Implementation & Setup Guide
Description Quickly organize your inbox with AI! This simple workflow automatically classifies incoming emails into different categories — like High Priority, Work Related, or Promotions — and applies Gmail labels accordingly. Setup takes less than 2 minutes, and it runs 24/7, helping you stay focused on what matters most without manual sorting.
Tools/Services Needed * Gmail: To trigger the workflow and label emails. * Google Gemini (or any LLM Model): To intelligently classify email content.
How It Works 1. Gmail Trigger: Detects every new incoming email.
2. Text Classifier Node: Classifies the email content into predefined categories.
3. Google Gemini Chat Model: Provides the AI-powered understanding behind the classification. 4. Conditional Labeling: - If the email is High Priority, label it accordingly. - If it’s Work Related (e.g., internal emails), apply the work label. - If it’s a Promotion, sort it into the promotions label. 5. Gmail Labeling: Automatically adds the correct label to the email.
Setup Instructions * Connect your Gmail account to n8n. * Connect your Google Gemini (or other LLM) credentials. * Customize the categories and labels if needed. * Activate the workflow — and that's it!
Notes * You can easily add more categories (like "Finance," "Newsletters," etc.) by adjusting the classification prompt. * Works best with a clean and minimal set of categories to avoid overlap. * Can be adapted to work with any other large language model (OpenAI, Claude, etc.) if preferred.
⚡ How to import this workflow into n8n:
- Click the Direct Download JSON button above to save
Automatically_classify_and_label_Gmail_emails_with_Google_Gemini.json. - Log in to your n8n Cloud or self-hosted n8n instance.
- In your workflow canvas, click the menu in top-right and select Import from File (or paste the JSON directly).
- Configure your credentials (e.g. API keys, database URLs) in the corresponding node settings.
- Click Execute Workflow to test and switch to Active!
Related AI Agents Workflows
View All in AI Agents →5 ways to process images PDFs with Gemini AI in n8n
How it works Many users have asked in the support forum about different methods to analyze images and PDF documents with Google Gemini AI in n8n. This workfl...
7 AI Sales Assistant
Production-ready n8n automation template for 7 AI Sales Assistant built by AhiXLight. Seamlessly connects Airtop Tool, Slack, Airtop with 24 configured nodes.
AAVE portfolio professional AI agent Telegram Email GPT 4o
A next-generation AI-powered DeFi health monitor that tracks wallet positions across Aave V3 using GPT-4o and LangChain. It delivers human-readable reports v...
Access control for AI agents RBAC using Airtable and Telegram
Purpose This workflow allows granular control over the access to tools connected to AI Agents (including Multi-Agent setups) using Role Based Access Control....