The Problem: Death by a Thousand Notifications
Look, if you’re a CIO, IT Director, or anyone managing technology infrastructure, you know the pain. Your inbox isn’t just busy, it’s an absolute warzone.
Between 2 AM backup failure alerts, After-hours call summaries, Dark Web monitoring reports, vendor spam disguised as “urgent compliance updates,” and the occasional actual emergency buried somewhere in there, it’s a miracle any of us get real work done.
I’d start my day with 147 unread emails. By lunch? 284. It was like playing whack-a-mole, except the moles were multiplying and some of them were on fire.
So I did what any sensible IT person would do: I built an AI-powered automation to categorize everything for me.
The Solution: AI + Zapier + A Little Bit of Madness
Here’s what I built:
- Zapier catches every new email as it hits my inbox
- AI analyzes and categorizes it using a detailed prompt (more on that in a sec)
- Zapier adds the category as an Outlook category tag
- Power Automate swoops in a few hours later and files everything into folders based on those categories
The result? I open my inbox and actually know what needs my attention right now versus what can wait, versus what’s just noise.
Why Zapier? (Or: The Tool Selection Saga)
Before you ask—yes, I considered other options. Let me save you the decision paralysis:
Why Not n8n?
Oh, I wanted to use n8n. Self-hosted, open-source, way more affordable at scale—it’s the dream for any IT person. But here’s the thing: my security team blocked it.
Wasn’t my call, but honestly? It was a valid decision. n8n requires hosting infrastructure, ongoing maintenance, security patching, and monitoring. For a critical workflow like email triage, having someone else handle the uptime and security (looking at you, Zapier) actually made sense from a risk management perspective. Sometimes the boring enterprise choice is the right one. sigh
Why Not Just Power Automate?
Here’s where it gets interesting. I’m already in the Microsoft ecosystem, so Power Automate was the obvious choice, right?
The problems:
- The OpenAI connector was a nightmare. I spent hours trying to get a reliable HTTP request to OpenAI’s API working in Power Automate. The authentication kept timing out, the response parsing was finicky, and debugging flows in Power Automate is like trying to fix a car engine while blindfolded.
- Copilot Studio was the “easy” option… at a price. Microsoft’s Copilot Studio can do AI analysis, but it runs on message credits. At the time I built this, we’re talking:
- Copilot Studio: ~$200/month for 25,000 messages (that’s $0.008 per message)
- Zapier + OpenAI: ~$20/month Zapier Professional + OpenAI costs (roughly $0.001-0.002 per email with GPT-5-nano)
For my 500+ emails per day (~15,000/month), Copilot Studio would cost $120/month vs Zapier + OpenAI at around $35-50/month total. When you’re already paying for Zapier for other automations, it’s a no-brainer.
- Power Automate is amazing… for Microsoft stuff. Where it shines is the filing automation (Step 5). Simple, native, reliable. But for complex AI prompting and third-party integrations? Zapier just works better.
So yeah, Zapier won by process of elimination. Not the cheapest option, not the most elegant, but the one that actually worked without making me want to throw my laptop out the window.
Fair Warning: This Ain’t Free
Before we dive in, let’s talk costs. This setup will:
- Burn through Zaps like crazy (every email = 1 Zap run)
- Rack up OpenAI API credits (though GPT-5-nano is surprisingly affordable)
If you’re getting 500+ emails a day, budget accordingly. I’m talking potentially thousands of Zaps per month. Is it worth it? For me, absolutely. But check your Zapier plan limits and OpenAI budget first.
Real numbers from my setup:
- Zapier Professional: $19.99/month (gets you 750 tasks—I upgraded to a higher tier)
- OpenAI API (GPT-5-nano): ~$15-30/month depending on email volume
- Total: $35-50/month to never manually sort an email again
Compare that to the 3-5 hours per week I was spending on inbox management, and suddenly it’s the best money I’ve ever spent.
How to Build It: Step-by-Step
Step 1: Set Up the Zapier Trigger
- Create a new Zap in Zapier
- Set the trigger to Microsoft Outlook – New Email
- Connect your Outlook account
- Test it to make sure it’s pulling email data correctly
Step 2: Add the AI Analysis Step
- Add an action: AI by Zapier – Analyze and Return Data (or use OpenAI directly)
- Here’s where the magic happens, you need a detailed prompt
The Prompt (The Secret Sauce)
Here’s the prompt I use. Feel free to steal it and customize for your needs:
PROMPT:
You are an email categorization AI for a CIO. Analyze this email and return ONLY a valid JSON response.
CONTEXT:
- Sender: [SENDER_EMAIL]
- Subject: [EMAIL_SUBJECT]
- Body Preview: [EMAIL_BODY_PREVIEW]
- To: [RECIPIENT_EMAIL]
- Has Attachments: [HAS_ATTACHMENTS]
CATEGORIES AVAILABLE
Requires Response, Client Meeting, Compliance / Audit, Do Not Attend, Focus / Deep Work, Informational, Internal Ops, Leadership / Strategy, Meeting Notes, Personal, Security Incident, System Alerts, Task Delegation / Follow-up, Team Member to Follow Up, Ticketing, Vendor / Partner, Spam / Marketing, Was Forwarded, Reports / Monitoring
TRUSTED SENDER ALLOW-LIST
Default these to the noted categories and never classify them as Spam / Marketing.
{
"trusted_senders": [
{"match": "domain", "value": "your-ticketing-system.com", "default_category": "Ticketing", "notes": "After-hours call summaries/notifications"},
{"match": "email", "value": "notify@yourcompany.com", "default_category": "Ticketing", "notes": "Automation ticket alerts"},
{"match": "display_name", "value": "Security Monitoring Tool", "default_category": "Reports / Monitoring"},
{"match": "domain", "value": "your-monitoring-vendor.com", "default_category": "Reports / Monitoring"},
{"match": "domain", "value": "backup-vendor.com", "default_category": "Reports / Monitoring"},
{"match": "domain", "value": "microsoft.com", "default_category": "Reports / Monitoring"},
{"match": "domain", "value": "security.microsoft.com", "default_category": "System Alerts"}
]
}
Apply allow-list first. If any allow-list item matches sender address or display name, set the category accordingly and skip spam logic.
URGENCY / SEVERITY MODEL
Return both:
- urgency: critical / high / normal / low
- severity: P1 / P2 / P3 / P4
Mapping:
- Security Incident with active risk (breach, malware, credential misuse, outage): critical / P1
- System Alerts needing same-day action (backup failure, service outage, monitoring failure): high / P2
- After-hours calls with "urgent", "escalate", "call back", "waiting" → high / P2; otherwise normal / P3
- Reports / Monitoring with no action (e.g., daily reports, backup summaries, test results): low / P4
- Spam / Marketing: low / P4
- Default: normal / P3
Also set priority: P1/P2→high; P3→normal; P4→low
Urgency cues (increase one level if present): "urgent", "asap", "immediately", "failure", "down", "outage", "breach", "escalate", "callback", "waiting", "deadline", "today".
DECISION CRITERIA (ordered)
1. MFA codes, security alerts, incident indicators → Security Incident or System Alerts (use urgency model).
2. Automated reports with no immediate action → Reports / Monitoring.
3. Automated alerts indicating failure/outage/action required → System Alerts.
4. After-hours calls/notes → Ticketing (or Team Member to Follow Up if purely admin/scheduling).
5. Direct request for your decision or response → Requires Response.
6. Billing/invoices/contract renewals → Compliance / Audit + forward_to_accounting:true.
7. Client scheduling/coordination → Client Meeting; post-meeting content → Meeting Notes.
8. Internal HR/PTO/policy/ops → Internal Ops.
9. Other delegation to team/helpdesk → Task Delegation / Follow-up.
10. Forwarded FYI with no action → Was Forwarded.
11. Unsolicited marketing/outreach or blind demo requests → Spam / Marketing unless on the trusted allow-list.
12. If none apply → Informational.
SPAM HEURISTIC (with exceptions)
Flag Spam / Marketing when: unsolicited voicemail/follow-up claims, "rising benefits/insurance costs", vague "compliance/risk/cost containment" offers, ISP pitches, generic software demos, meeting requests without prior context—except any sender on the allow-list.
Return valid JSON with: category, urgency, severity, priority, reasoning (brief)
Customization Tips:
- Replace the categories with ones that make sense for YOUR workflow
- Add your actual monitoring tools, ticketing systems, and vendors to the trusted sender list
- Adjust the urgency/severity rules based on your environment
- Tweak the spam heuristics based on what YOU get spammed with
Step 3: Add the Category to Outlook
- Add another action: Microsoft Outlook – Add Category to Email
- Map the email ID from Step 1
- Map the category name from the AI response in Step 2
- Save and test!
Step 4: The Paths (Optional But Recommended)
This is where it gets fun. I added path logic to handle special cases:
- Path for MFA codes: Immediately flag and format for Teams notification
- Path for everything else: Just categorize normally
You can add filters to forward accounting emails, escalate P1 incidents to Teams, whatever you need.
Step 5: Power Automate for the Filing
Here’s the piece that ties it all together. A few hours after the emails are categorized, I have a Power Automate flow that:
- Runs every 4 hours (you can adjust this)
- Looks for emails with Outlook categories
- Moves them to corresponding folders based on category name
- Keeps my inbox clean and organized
Why wait a few hours? Because sometimes I need to see that email in my inbox first, and sometimes the AI gets it wrong (it’s like 95% accurate, but that 5% matters).
The Results
My inbox went from chaos to manageable. Now when I open Outlook:
- Red flags = Security Incidents and P1 alerts (handle NOW)
- Orange flags = System Alerts and high priority items (handle today)
- Blue flags = Reports and monitoring (review when I have time)
- Gray flags = Spam (ignore or unsubscribe)
Everything else gets filed away automatically, and I can focus on what actually matters.
Should You Build This?
Build this if:
- You’re drowning in automated alerts and notifications
- You have the budget for Zaps and AI credits
- You’re comfortable tweaking prompts and workflows
- You value your sanity
Skip this if:
- You get < 50 emails a day
- You’re on a tight budget
- You prefer manual inbox management (you masochist, you)
- Your corporate policy blocks third-party automation tools (RIP n8n dreams)
Final Thoughts
Is this overkill? Maybe. But when you’re managing IT infrastructure and every minute counts, having an AI assistant pre-sort your digital life is worth every penny.
Plus, there’s something deeply satisfying about watching an AI correctly identify “URGENT: Your car warranty is expiring” as spam while flagging a legitimate backup failure as P2.
Now if you’ll excuse me, I have 3 P1 alerts to address. (Just kidding… the AI already sent those to Teams and paged the on-call engineer.)
Want the Zapier template? Drop a comment and I’ll share the exported Zap once I clean up the company-specific stuff.
Questions about the setup? Hit me up. I’ve probably already made every mistake you’re about to make. 😅