Automate Email Classification, Prioritization, and Spam Detection Across Multiple Accounts
Created by: Jayant Kumar (@jharilela)
π Powered by: Gmail, Google Sheets, OpenAI, Discord, and n8n
Focus is Expensive. Managing multiple email inboxes every dayβpersonal, business, partnerships, invoices. Logging into each, skimming through noise, flagging important stuff, and deleting spam started eating up hours of my week. I needed a system that helped me focus only on what matters without building an entire helpdesk dashboard.
I already live in Discord. It made sense to push my emails thereβbut in a fun, digestible, and actionable way. I built AI Email Classifier π¬ to summarize emails, detect spam, assign priority, and make everything skimmable with pictures and links.
And it works across multiple Gmail accounts.
Hereβs the high-level flow:
The system uses this sheet as live memory to label spam and legit senders:
ββββββββββββββββββββββ¦βββββββββββββββ¦ββββββββββββββββββ¦βββββββββββββββ¦βββββββββββββββββ
β Email β Domain β Classification β Labelled By β Labelled Date β
β βββββββββββββββββββββ¬βββββββββββββββ¬ββββββββββββββββββ¬βββββββββββββββ¬βββββββββββββββββ£
β [email protected] β badsite.com β Spam β Jayant β 08/07/2025 β
β [email protected] β trusted.com β Legit β Jayant β 08/07/2025 β
ββββββββββββββββββββββ©βββββββββββββββ©ββββββββββββββββββ©βββββββββββββββ©βββββββββββββββββ
This allows manual control to teach the AI which senders to trust or ignore. Every time I see something marked wrong, I just reply in Discord with "spam"
or "legit"
on that message thread. That triggers an update to the Sheet via AI parsing and n8n.
AI isnβt perfect.
Some spam emails are cleverly disguised. And some senders are contextually important only to you.
Thatβs why I kept a simple feedback loop:
"spam"
or "legit"
on any Discord email message. Or anything along that lineBecause Slack charges per seat and email feels lonely.
I run most of my operations inside Discord community chats, client rooms, bot alerts.
Instead of making a full email UI, I turned each email into a Discord card with a thumbnail, summary, and quick actions.
Itβs fun. Itβs visual. It doesnβt feel like work.
Email becomes more like a game feed.
n8n_discord_trigger_bot
Clone the workflow JSON, set up your Gmail integrations, and install the n8n Discord Trigger Bot.
I made this workaround because i couldnt find a discord trigger on n8n.
Now I just scroll my Discord DMs and know what to reply to, and ignore everything else.Dont let Email spam your brain. Let your AI do the thinking.