Intelligent Mail Agent: Automate Your Inbox with AI
detail.loadingPreview
Automate your Gmail inbox with this intelligent workflow. Receive notifications via Telegram, leverage AI to categorize and process emails, and keep your inbox clean and organized.
About This Workflow
This n8n workflow revolutionizes your email management by integrating AI with your Gmail and Telegram accounts. It's designed to act as an intelligent mail agent, processing your incoming emails with precision. The workflow is triggered by a Telegram message, allowing you to initiate the automation on demand. It then fetches emails from your Gmail inbox, filters out already processed messages, and uses a powerful AI model (OpenRouter with GPT-4.1 nano) to analyze each email's content. Based on the AI's analysis, it can archive unnecessary emails or label the rest according to their relevance, ensuring your inbox stays organized and manageable. Finally, a summary of the processed emails is sent back to you via Telegram, keeping you informed of the workflow's actions.
Key Features
- AI-Powered Email Classification: Utilizes advanced AI to determine email relevance and necessity.
- Smart Archiving & Labeling: Automatically archives unneeded emails and applies relevant labels to others.
- Telegram Integration: Get status updates and trigger workflows via Telegram messages.
- Gmail Automation: Seamlessly interacts with your Gmail account for fetching, labeling, and archiving.
- Duplicate Processing Prevention: Filters out already processed emails to optimize AI usage.
How To Use
- Connect your Accounts: Ensure your Gmail and Telegram accounts are properly authenticated with n8n.
- Configure Telegram Trigger: Set up the
Telegram Triggernode with your desired bot and message triggers. - Gmail Integration: Link the
Get mails in INBOXnode to your Gmail account to fetch emails. - AI Processing: The
OpenRouter Chat Modelnodes are configured to analyze email content. You may need to adjust the prompt within the AI node parameters to refine its classification criteria. - Gmail Actions: Configure the
mail_archiverandmail_label_setternodes with the appropriate message IDs and label names as determined by the AI. - Summarization and Notification: The
Reporternode summarizes the AI's output, and theTelegramnode sends this summary back to your chat.
Apps Used
Workflow JSON
{
"id": "f70e9f93-7b27-43fe-b360-ae833c4e627e",
"name": "Intelligent Mail Agent: Automate Your Inbox with AI",
"nodes": 16,
"category": "Operations",
"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: f70e9f93-7b27...
About the Author
AI_Workflow_Bot
LLM Specialist
Building complex chains with OpenAI, Claude, and LangChain.
Statistics
Related Workflows
Discover more workflows you might like
Universal CSV to JSON API Converter
Effortlessly transform CSV data into structured JSON with this versatile n8n workflow. Integrate it into any application as a custom API endpoint, supporting various input methods including file uploads and raw text.
Instant WooCommerce Order Notifications via Telegram
When a new order is placed on your WooCommerce store, instantly receive detailed notifications directly to your Telegram chat. Stay on top of your e-commerce operations with real-time alerts, including order specifics and a direct link to view the order.
On-Demand Microsoft SQL Query Execution
This workflow allows you to manually trigger and execute any SQL query against your Microsoft SQL Server database. Perfect for ad-hoc data lookups, administrative tasks, or quick tests, giving you direct control over your database operations.