Use this powerful n8n workflow to automatically classify incoming Gmail messages using Gemini AI, apply custom labels, and safely generate reply drafts for review. Leverage smart n8n node tools for context.
Download this n8n workflow template and start using it instantly.
Highly beneficial for:
Busy executives or professionals drowning in email.
Users looking for advanced AI-driven inbox management.
Automation specialists who want to leverage the power of n8n templates integrating LLMs and Google services.
Anyone seeking a structured n8n workflow solution to triage email without sending automated replies.
Managing a high volume of emails can be a significant time drain. This advanced n8n workflow solves this by acting as an intelligent pre-sorter and draft assistant. When a new email arrives, this n8n automation first cleans up existing category labels and then hands the content, thread history, and sender data to the Gemini AI model.
The AI determines the email’s category (e.g., Sales, Vendor, Important, or DELETE) and decides if a response is required. This specific n8n workflow ensures safety: if the label is 'SAVE,' the appropriate label is applied; if the email needs a response, the AI generates a draft that includes calendar availability checks. The draft is saved securely in Gmail—it is never sent automatically, giving the user full control. This is a powerful use case for n8n templates focused on personal productivity.
This intelligent Gmail n8n workflow operates in three primary phases: Trigger & Triage, Classification, and Action/Drafting.
GetThread and CheckSent) to gather full conversation history and check past interactions with the sender. It outputs structured JSON containing the required label, its ID, and a boolean flag indicating if a reply is necessary (requiresResponse).requiresResponse flag. If true, the workflow proceeds to draft creation.GetThread1 tool for context and, crucially, the CheckCalendar Google Calendar tool. This allows the AI to suggest real, available time slots if the sender is requesting a meeting. It outputs the draft text and internal notes.To deploy this comprehensive n8n workflow, follow these steps:
CheckCalendar n8n node for scheduling availability checks.AI Email Classifier and AI Draft Maker nodes to access the large language model.AI Email Classifier and AI Draft Maker nodes. Replace all bracketed placeholder text (e.g., [INPUT YOUR EMAIL HERE], [INPUT LABEL 1], [YOUR OWN TIMEZONE HERE]) with your specific labels, IDs, rules, and timezone information. This is critical for the n8n workflow to classify correctly.Gmail Trigger to start monitoring your inbox.This n8n workflow leverages several specialized n8n node types:
Gmail Trigger: The fundamental starting point (n8n trigger). Function: Monitors the specified Gmail account for new emails every minute.
Gmail (RemoveLabel / AddLabel / TrashMessage / Create a draft): These standard Gmail n8n node operations handle the manipulation of the email, applying or removing labels, and creating the final draft reply.
AI Email Classifier (LangChain Agent n8n node): Function: The core classification engine. It directs Gemini to analyze the email, use Gmail tools for context (GetThread, CheckSent), and classify it into custom labels, determining if a response is needed.
Structured Output Parser (n8n node): Function: Ensures the AI classification output is strictly formatted as JSON, allowing downstream n8n nodes (like the IF logic) to easily access variables like labelID and requiresResponse.
IF (n8n node): Function: Provides flow control, branching the n8n workflow based on the AI's classification (e.g., is the message to be DELETED? Is a RESPONSE required?).
AI Draft Maker (LangChain Agent n8n node): Function: Generates the reply draft text. It utilizes the powerful CheckCalendar n8n tool to embed accurate availability into its suggestions, vastly improving the quality of the automated draft.
Use this robust n8n workflow to automatically analyze and clean historical Gmail emails using Gemini AI classification. Delete marketing and spam emails, and receive real-time alerts via Telegram. Essential n8n templates for inbox maintenance.

Use this smart n8n workflow to create intelligent, personalized Out of Office replies using GPT-4o-mini. It automatically filters spam, customizes responses, and tags processed emails.

Use this advanced n8n workflow to automatically classify, label, and archive unread Gmail messages using the Gemini AI agent. Achieve true zero-inbox automation.

Use this powerful n8n workflow to instantly summarize new Easy Redmine helpdesk tickets using AI (GPT-4o-mini) and send formatted, actionable alerts directly to a Microsoft Teams channel.

Automate intelligent invoice collection using this n8n workflow. Integrates Google Sheets, Gmail, and OpenAI (GPT-4.1) to send context-aware, personalized follow-up emails based on client communication history.


Business Analyst passionate about automation. I help teams and productivity enthusiasts streamline workflows, eliminate manual tasks, and scale their operations using n8n and smart process design.







































