Automate Gmail inbox organization using an AI Agent. This n8n workflow categorizes emails, applies priority labels, auto-archives, and reports actions via Telegram.
Download this n8n workflow template and start using it instantly.
Users overwhelmed by their email inbox.
Automation specialists looking for advanced AI Agent examples in n8n.
Professionals needing a structured way to triage priority emails without manual sorting.
Individuals interested in advanced Gmail automation using n8n templates.
This sophisticated n8n workflow transforms chaotic email management into an automated, intelligent process. By leveraging the power of AI Agents integrated via OpenRouter, the solution filters your Gmail inbox, identifies critical, routine, or spam emails, and takes immediate action—labeling or archiving. This specific n8n workflow is designed to reduce decision fatigue and ensure that high-priority messages are instantly marked, while clutter is seamlessly archived. This automation can be initiated conveniently via a Telegram message, offering remote control over your inbox. This is a highly valuable addition to any user's library of production-ready n8n templates, showcasing advanced use of the n8n node structure for complex decision-making.
The process begins when the n8n trigger is activated, either manually or via the dedicated Telegram n8n trigger.
NotNeed or MustRead). Emails already processed are skipped, preventing unnecessary work for the AI.mailarchiver (a Gmail Tool n8n node set to remove the INBOX label) or the maillabel_setter (a Gmail Tool n8n node set to apply custom labels like MustRead).To use this n8n workflow effectively, follow these steps:
mailarchiver, and maillabel_setter n8n node instances.openai/gpt-4.1-nano).Telegram Trigger and the final Telegram n8n node for receiving commands and sending reports.[list up your rule1]) to match your specific email management needs. Telegram Trigger: Acts as the primary n8n trigger, initiating the process upon receiving a command message from the configured bot.
Get mails in INBOX (Gmail n8n node): Retrieves all messages currently in the INBOX. Key Configuration: operation: getAll, filters: labelIds: [INBOX].
Filter processed (Filter n8n node): Essential for efficiency, this n8n node checks if the email's existing labels already include 'NotNeed' or 'MustRead', ensuring only new emails pass through.
Categoriser (LangChain Agent n8n node): The core decision-maker. It uses the OpenRouter Chat Model n8n node to determine whether to archive the email or apply a priority label. It executes the downstream Gmail Tool n8n nodes dynamically.
mailarchiver (Gmail Tool n8n node): Used by the AI Agent to archive emails deemed unnecessary. Key Configuration: operation: removeLabels, targeting the INBOX label.
maillabel_setter (Gmail Tool n8n node): Used by the AI Agent to apply specified labels (e.g., 'MustRead'). Key Configuration: operation: addLabels, dynamically pulling label IDs from the AI's output.
Reporter (LangChain Agent n8n node): Summarizes the aggregated results of the email processing run using a separate OpenRouter Chat Model n8n node.
Telegram (Telegram n8n node): The final action, sending the processed summary report back to the user who activated the n8n workflow.
Build an advanced AI-powered customer service system with this n8n workflow. It uses the Gmail n8n trigger, OpenRouter for LLM access, and Pinecone for knowledge retrieval to automate email replies efficiently.

Automate GitHub issue classification using this advanced n8n workflow. Integrates OpenAI GPT-4o, Pinecone RAG for contextual analysis, and webhook response to streamline development operations.

Automate Facebook Messenger orders using n8n workflow templates. Integrate AI, Google Sheets, and Google Calendar for seamless order logging and scheduling.

Deploy an advanced n8n workflow that converts key Gmail operations (send, reply, fetch) into callable AI tools using the n8n Multi-Chain Pattern (MCP) trigger. Perfect for building custom AI agents.

Deploy this advanced n8n workflow template to create an AI Assistant capable of managing your Google Calendar and Gmail using conversational commands. Features custom tool protocols and conversational memory.








































