Templates / Email management: Auto-delete marketing emails & generate AI replies with Gemini

Email management: Auto-delete marketing emails & generate AI replies with Gemini

Ready for 3.0

by Raghvendra dixit · 700 views · created 2025-08-18 · Ticket Management, AI Summarization

Ready for 3.0. This template uses no nodes that n8n 3.0 removes. No removed nodes, versions or helpers found. Static check, last run 2026-10-19.

What this workflow does

This AI workflow has 10 nodes and runs manually, when you click “Execute workflow” (plus 1 other trigger). Along the way it connects Gmail, Google Sheets and Google Gemini.

How it runs

Trigger: Manually, when you click “Execute workflow” (plus 1 other trigger).

  1. Get many messages (Gmail): get many
  2. Message a model (Google Gemini): uses Google Gemini
  3. AI response formatter (Edit Fields (Set)): sets 1 field: content.parts[0].text
  4. categories emails (Switch): routes items into 2 branches
  5. Delete a message (Gmail): delete
  6. Reply to a message (Gmail): reply
  7. Append or update row in sheet (Google Sheets): append or update
  8. Append or update row in sheet (Google Sheets): append or update

Services it uses

GmailGoogle SheetsGoogle Gemini

Before you upgrade to n8n 3.0

Nothing in this workflow is removed in n8n 3.0, so it should import and run after the upgrade.

Nodes used (7)

From the author

Description This workflow intelligently scans your inbox, detects whether an email is marketing or genuine, and takes the right action automatically. Marketing Emails : Deleted instantly and logged in Google Sheets for tracking. Non-Marketing Emails : Receive…

Excerpt from Raghvendra dixit'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.