Smart Gmail cleaner with AI validator & Telegram alerts
Needs changesNeeds changes. This template uses 1 thing(s) that n8n 3.0 removes: AI Agent v1 (old agent modes). 1 breaking item(s) found. Static check, last run 2026-10-19.
What to replace before upgrading
| Removed in 3.0 | Replace with |
|---|---|
| AI Agent v1 (old agent modes) AI Check Email (v1.8) | Latest AI Agent node (Tools Agent). For SQL Agent, use a Postgres or MySQL tool with a recent AI Agent. |
Nodes used (10)
- Gmail
n8n-nodes-base.gmail - Manual Trigger
n8n-nodes-base.manualTrigger - Google Gemini Chat Model
@n8n/n8n-nodes-langchain.lmChatGoogleGemini - AI Agent
@n8n/n8n-nodes-langchain.agent - Structured Output Parser
@n8n/n8n-nodes-langchain.outputParserStructured - If
n8n-nodes-base.if - Telegram
n8n-nodes-base.telegram - No Operation, do nothing
n8n-nodes-base.noOp - Edit Fields (Set)
n8n-nodes-base.set - Aggregate
n8n-nodes-base.aggregate
What it does
Automatically clean up your Gmail inbox by deleting unwanted emails, validated by Gemini AI. Ideal for anyone tired of manual inbox cleanup, this workflow helps you save time while staying in control, with full transparency via Telegram alerts. How it works - Scans Gmail inbox in adjustable 2-week batches - Uses Gemini AI to decide if an email should be deleted or skipped - Applies a label to skipped emails to avoid rechecking in future runs - Deletes unwanted emails and sends a Telegram message with the AI's reasoning - Also notifies on skipped emails, with explanation included Set up steps 1. Connect your Gmail, Gemini AI, and Telegram accounts 2. Adjust the AI baseline to control sensitivity (e.g. how strict the filtering should be) 3. Set your batch range (default: last 2 weeks, adjustable) 4. Define your Telegram chat/channel for notifications --- Note: Thanks to n8n's modular design, you can easily switch Gemini for another AI model (like OpenAI, Claude, etc.) or replace Telegram with Discord, Slack, or even email, no code changes needed, just swap the nodes.