Gmail AI Email Classification with Slack Alerts and DigestsGmail AI Email Classification with Slack Alerts and Digests
The network for creativity
Join 1.25M professional creatives like you
Connect with clients, get discovered, and run your business 100% commission-free
Creatives on Contra have earned over $150M and we are just getting started
🚀 Built a Gmail AI-Tagging + Slack Alerts System — Because Important Emails Should Never Get Missed
The problem every B2B team faces:
❌ Client emails sit unanswered for days ❌ Bank or government emails get buried in the inbox ❌ Deadlines are missed because no one flags them ❌ No daily view of what's pending vs overdue
I built a system that fixes all of this:
🎯 WHAT IT DOES:
✅ Watches Gmail inbox every 5 minutes ✅ Uses AI to classify every email into 5 categories: • URGENT (deadlines, overdue, time-sensitive) • BANK_GOV (banks, .gov domains, tax authorities) • CLIENT_ACTION (awaiting response) • FOLLOW_UP (needs follow-up) • FYI (informational)
✅ Pushes real-time Slack alerts to the right channel: • #urgent — for time-sensitive items • #finance-legal — for bank/gov emails • Assignee DM — for client action items
✅ Sends a daily 8 AM digest with: • Overdue items • Awaiting client action • Pending tasks
✅ Auto-applies Gmail labels (AI/Urgent, AI/Bank-Gov, etc.) ✅ Hourly overdue scanner with automatic escalation
⚙️ TECH STACK: n8n | Gmail API | OpenAI GPT-4o-mini | Slack API | Google Sheets
📊 RESULT: → Zero missed urgent emails → 15+ minutes saved per team member per day → Complete audit trail in Google Sheets → Full visibility into what's stuck and where
Gmail stays the primary interface. Slack becomes the reminder layer that ensures nothing slips.
Want this deployed for your team? Let's talk.
#AIAutomation #GmailAutomation #SlackIntegration #n8n #B2BSaaS #Productivity #WorkflowAutomation
Kapil's avatar
For your hourly overdue scan, I'd include a thread whose latest reply says 'resolved' but still quotes the original overdue notice. Which message determines whether the item stays open and gets escalated?
rishav's avatar
Great question, Kapil — this is exactly the edge case that breaks most overdue systems.
In my current implementation, the logic is:
Gmail thread-level scan (not message-level)
Use the LATEST message in the thread as the source of truth
If latest message contains "resolved" /...
Kapil's avatar
I'd extract the newest reply text before classifying its intent, while keeping the previous thread status available. I'd test "not resolved", quoted closure messages, and a closed thread with a new request. The 0.8 threshold needs calibration against labeled threads before I'd trust it to close anything automatically.
Sabin's avatar
Splitting BANK_GOV out on its own is smart. Those are the emails that hurt most when they get buried. When GPT-4o-mini tags one wrong, does the corrected label feed back into the prompt, or is it fixed by hand?
rishav's avatar
Thanks for the kind words, Sabin! 🙌
I build AI automation systems like the Gmail AI-Tagging + Slack Alerts one you saw.
If you ever need help automating your email workflow or lead management, I'd love to connect.
What do you work on?
Best, Rishav
Sabin's avatar
Mostly B2B SaaS: lifecycle emails, help center content and small n8n workflows for lead research. Still curious about my earlier question: when GPT-4o-mini tags an email wrong, do you fix the label by hand or feed the correction back into the prompt?
rishav's avatar
Great question, Sabin! In production, I use a hybrid approach. For immediate errors, there's a 'Human-in-the-Loop' step (Slack alert or a review queue). But systemically, I use a feedback loop: the corrected label gets saved to a database (like Supabase or Airtable). The n8n...
StackShortlist's avatar
Every 5 minutes is plenty for this. I'd watch how often CLIENT_ACTION and FOLLOW_UP get mixed up, that's usually where a classifier like this gets argued with.
rishav's avatar
Great catch — you're absolutely right.
The CLIENT_ACTION vs FOLLOW_UP overlap is the trickiest part. Here's how I'm handling it:
CLIENT_ACTION → Client is explicitly waiting for MY response (reply needed from us) FOLLOW_UP → WE are following up on something WE sent (we need to...
StackShortlist's avatar
Tagging plus Slack is a solid combo. How do you keep the classifier from flagging every newsletter as important? A sender allowlist did most of the work for us.
rishav's avatar
Solid point — newsletters were killing my precision in early tests.
My current approach:
Domain allowlist for trusted vendors (banks, tax portals, key clients)
AI classifier runs only on "unknown sender" emails
Known newsletters (Substack, Medium, Product Hunt) → auto-FYI, never...
Timothy's avatar
This is such a practical system, rishav. The BANK_GOV split is the detail most teams would skip until it costs them, and the 8 AM digest plus hourly overdue scanner means nothing hides. Zero missed urgent emails is a great headline result.
Back to feed
The network for creativity
Join 1.25M professional creatives like you
Connect with clients, get discovered, and run your business 100% commission-free
Creatives on Contra have earned over $150M and we are just getting started