Templates / Smart Gmail cleaner with AI validator & Telegram alerts

Smart Gmail cleaner with AI validator & Telegram alerts

Needs changes

by Reyhan · 3,548 views · created 2025-04-09 · Personal Productivity, AI Summarization

Needs 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 this workflow does

This AI workflow has 17 nodes and runs manually, when you click “Execute workflow”. Along the way it connects Gmail, Google Gemini Chat Model and Telegram.

How it runs

Trigger: Manually, when you click “Execute workflow”.

  1. Initialize Loop Vars (Edit Fields (Set)): sets 1 field: page
  2. Increment Loop Var (Edit Fields (Set)): sets 1 field: page
  3. Gmail: get many
  4. AI Check Email (AI Agent): runs an AI agent, with model: Google Gemini Chat Model; output parser: Unwanted Email Output Parser
  5. If: checks a condition and branches into true / false
  6. Telegram: uses Telegram
  7. Gmail: delete
  8. Gmail: add labels
  9. Telegram: uses Telegram
  10. Telegram: uses Telegram

…plus 3 more steps. See the full node list below.

Services it uses

GmailGoogle Gemini Chat ModelTelegram

Before you upgrade to n8n 3.0

1 thing in this workflow is removed in n8n 3.0. Fix it before you upgrade:

  • AI Agent v1 (old agent modes) in AI Check Email (v1.8): replace with Latest AI Agent node (Tools Agent). For SQL Agent, use a Postgres or MySQL tool with a recent AI Agent.
Removed in 3.0Replace 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)

From the author

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 -…

Excerpt from Reyhan's description on n8n.io.

View the original on n8n.io → Check your own copy

Get the weekly “what broke” email

New templates, newly broken ones, and n8n release changes. One short email a week.

Form not loading? Subscribe here.