Smart Gmail cleaner with AI validator & Telegram alerts
Needs changesWhat 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”.
- Initialize Loop Vars (Edit Fields (Set)): sets 1 field: page
- Increment Loop Var (Edit Fields (Set)): sets 1 field: page
- Gmail: get many
- AI Check Email (AI Agent): runs an AI agent, with model: Google Gemini Chat Model; output parser: Unwanted Email Output Parser
- If: checks a condition and branches into true / false
- Telegram: uses Telegram
- Gmail: delete
- Gmail: add labels
- Telegram: uses Telegram
- Telegram: uses Telegram
…plus 3 more steps. See the full node list below.
Services it uses
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.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
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 -…