Templates / Multi-account email classifier with AI, Gmail, Discord & Google Sheets

Multi-account email classifier with AI, Gmail, Discord & Google Sheets

Ready for 3.0

by Jay Emp0 ✓ · 3,150 views · created 2025-07-08 · 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 22 nodes and runs on Gmail events (plus 4 other triggers). Along the way it connects Gmail, OpenAI Chat Model, Google Sheets and Discord.

How it runs

Trigger: On Gmail events (plus 4 other triggers).

  1. medium (Edit Fields (Set)): sets 2 fields: discord_channel, email
  2. Merge: merges the data from its input branches
  3. medium (Edit Fields (Set)): sets 2 fields: discord_channel, email
  4. medium (Edit Fields (Set)): sets 2 fields: discord_channel, email
  5. AI Agent: runs an AI agent, with model: OpenAI Chat Model; 3 tools (Get spam list, update spam list, Get a message in Discord)
  6. medium (Edit Fields (Set)): sets 2 fields: discord_channel, email
  7. AI Agent: runs an AI agent, with model: OpenAI Chat Model; 1 tool (Get spam list); output parser: Structured Output Parser
  8. Discord: work with message
  9. If: checks a condition and branches into true / false
  10. Send a message (Discord): work with message

Services it uses

GmailOpenAI Chat ModelGoogle SheetsDiscord

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.

  • Still check Gmail Trigger below v1.4 runs as v1.4 (drafts skipped, max emails per poll) (Gmail Trigger, Gmail Trigger1, Gmail Trigger2).

Nodes used (11)

From the author

AI Email Classifier 📬 Automate Email Classification, Prioritization, and Spam Detection Across Multiple Accounts Created by: Jayant Kumar (@jharilela) 🛠 Powered by: Gmail, Google Sheets, OpenAI, Discord, and n8n --- Sample Discord labelling as Spam Sample…

Excerpt from Jay Emp0'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.