Templates / Detect phishing and triage Gmail with Google Gemini and Google Sheets

Detect phishing and triage Gmail with Google Gemini and Google Sheets

Ready for 3.0

by Vardaan Gupta ✓ · 19 views · created 2026-09-15 · 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 13 nodes and runs on Gmail events. Along the way it connects Gmail, Google Gemini Chat Model and Google Sheets.

How it runs

Trigger: On Gmail events.

  1. Set log sheet details (Edit Fields (Set)): sets 2 fields: logSheetId, logSheetName
  2. Get all Gmail labels (Gmail): work with label
  3. Match categories to label IDs (Code): runs custom JavaScript code
  4. Classify email with AI agent (AI Agent): runs an AI agent, with model: Google Gemini Chat Model; 5 tools (Add 'Ads' label, Add 'Review' label, Add 'Urgent' label, Add 'Not Important' label…)
  5. Combine email with AI result (Merge): merges the data from its input branches
  6. Log result to Google Sheet (Google Sheets): append

Services it uses

GmailGoogle Gemini Chat ModelGoogle Sheets

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 (9)

From the author

Quick overview Watches Gmail for new unread mail, then an AI agent on Google Gemini sorts each one into a category — including a phishing/fraud check — and applies the matching Gmail label itself. Every result gets logged to Google Sheets with sender,…

Excerpt from Vardaan Gupta'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.