{"id":1995,"date":"2026-03-17T21:54:09","date_gmt":"2026-03-17T21:54:09","guid":{"rendered":"https:\/\/devblogs.microsoft.com\/all-things-azure\/?p=1995"},"modified":"2026-03-17T21:54:09","modified_gmt":"2026-03-17T21:54:09","slug":"from-150-unread-to-zero-stress-automating-inbox-triage-with-mcp-and-github-copilot","status":"publish","type":"post","link":"https:\/\/devblogs.microsoft.com\/all-things-azure\/from-150-unread-to-zero-stress-automating-inbox-triage-with-mcp-and-github-copilot\/","title":{"rendered":"From 150 Unread to Zero Stress: Automating Inbox Triage with MCP and GitHub Copilot"},"content":{"rendered":"<h1>Taming the Noisy Inbox: How I Used MCP to Automate Email and Teams Triage<\/h1>\n<p><em>How the Model Context Protocol (MCP) turns your AI coding assistant into a workplace productivity engine \u2014 connecting Microsoft 365 data to your terminal workflow.<\/em><\/p>\n<p>&nbsp;<\/p>\n<h2>The Problem We All Share<\/h2>\n<p>If you work in a customer-facing role, you know the feeling. You open your laptop on Monday morning and you\u2019re staring at 150+ unread emails, dozens of Teams threads, and the creeping anxiety that something important is buried in there \u2014 a customer escalation, an exec ask, a deadline you forgot about.<\/p>\n<p>You start scrolling. You context-switch between Outlook and Teams. You open threads, skim them, lose your place, start over. Thirty minutes later, you\u2019ve read a lot of words but you\u2019re not sure what actually needs your attention <em>right now<\/em>.<\/p>\n<p>This is the <strong>inbox triage problem<\/strong> \u2014 and it\u2019s universal. Whether you\u2019re an account manager, a solutions architect, a PM, or an engineering lead, the signal-to-noise ratio in enterprise communication is brutal.<\/p>\n<p>I decided to fix it.<\/p>\n<h2>What If Your AI Coding Assistant Could Read Your Inbox?<\/h2>\n<p>Here\u2019s the insight: modern AI coding assistants like <strong>GitHub Copilot CLI<\/strong> and <strong>GitHub Copilot in VS Code<\/strong> aren\u2019t just for writing code anymore. Thanks to the <strong>Model Context Protocol (MCP)<\/strong>, they can connect to external data sources \u2014 including your Microsoft 365 environment.<\/p>\n<p>MCP is an open standard that lets AI assistants call external tools. Think of it as a universal adapter: instead of building a custom integration for every data source, you expose capabilities through MCP servers, and any MCP-compatible client can use them.<\/p>\n<p>One of those MCP servers is <strong>WorkIQ<\/strong> \u2014 a Microsoft 365 Copilot-powered tool that gives your AI assistant access to your emails, Teams chats, calendar, and documents. Combine WorkIQ MCP with GitHub Copilot CLI, and suddenly you can do things like:<\/p>\n<p>&nbsp;<\/p>\n<ul>\n<li><em><span style=\"font-size: 14pt;\">Show me all unanswered emails from the last week, grouped by priority<\/span><\/em><\/li>\n<li><em><span style=\"font-size: 14pt;\">Scan my Teams chats for any messages where I&#8217;m directly asked a question<\/span><\/em><\/li>\n<li><em><span style=\"font-size: 14pt;\">What customer escalations came in while I was on PTO?<\/span><\/em><\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<p>All from your terminal. No browser tabs. No scrolling.<\/p>\n<h2>Building the Workflow: From Messy to Methodical<\/h2>\n<p>I started simple \u2014 a single prompt that asked WorkIQ to scan my inbox and categorize everything into three buckets:<\/p>\n<ul>\n<li><strong>\ud83d\udd34 Action Required<\/strong> \u2014 someone directly asked me to do something<\/li>\n<li><strong>\ud83d\udfe0 Review Needed<\/strong> \u2014 decisions, deliverables, or time-sensitive info directed at me<\/li>\n<li><strong>\ud83d\udfe2 Informational<\/strong> \u2014 CC\u2019d, FYI threads, automated alerts<\/li>\n<\/ul>\n<p>It worked. But I immediately hit two problems that turned into engineering challenges.<\/p>\n<h3>Challenge 1: Timeouts on Large Lookback Windows<\/h3>\n<p>When I asked WorkIQ to scan 3 weeks of email in a single query, it timed out. The M365 Copilot backend was processing too much data for one request.<\/p>\n<p><strong>Solution: Chunked queries with graceful fallback.<\/strong><\/p>\n<p>Instead of one 3-week query, the workflow automatically breaks it into three 7-day chunks, runs them sequentially, and merges the results. If a chunk times out, it retries with a simplified prompt (top 10 items, shorter format). If that also fails, it falls back to a minimal query (top 5, one-liner summaries). If all three levels fail for a chunk, it skips it and notes the gap.<\/p>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/all-things-azure\/wp-content\/uploads\/sites\/83\/2026\/03\/diagram-v4-hires-1-scaled.webp\"><img decoding=\"async\" class=\"alignnone wp-image-1996\" src=\"https:\/\/devblogs.microsoft.com\/all-things-azure\/wp-content\/uploads\/sites\/83\/2026\/03\/diagram-v4-hires-1-300x200.webp\" alt=\"Email Chunking Strategies work iq\" width=\"383\" height=\"255\" srcset=\"https:\/\/devblogs.microsoft.com\/all-things-azure\/wp-content\/uploads\/sites\/83\/2026\/03\/diagram-v4-hires-1-300x200.webp 300w, https:\/\/devblogs.microsoft.com\/all-things-azure\/wp-content\/uploads\/sites\/83\/2026\/03\/diagram-v4-hires-1-1024x683.webp 1024w, https:\/\/devblogs.microsoft.com\/all-things-azure\/wp-content\/uploads\/sites\/83\/2026\/03\/diagram-v4-hires-1-768x512.webp 768w, https:\/\/devblogs.microsoft.com\/all-things-azure\/wp-content\/uploads\/sites\/83\/2026\/03\/diagram-v4-hires-1-1536x1024.webp 1536w, https:\/\/devblogs.microsoft.com\/all-things-azure\/wp-content\/uploads\/sites\/83\/2026\/03\/diagram-v4-hires-1-2048x1365.webp 2048w\" sizes=\"(max-width: 383px) 100vw, 383px\" \/><\/a><\/p>\n<p>&nbsp;<\/p>\n<p>This pattern is reusable for any MCP integration where the backend has processing limits.<\/p>\n<h3>Challenge 2: Duplicate and Stale Items Across Runs<\/h3>\n<p>When you run triage daily or weekly, the same items show up repeatedly. Worse, sometimes an item that was already resolved resurfaces because the underlying chat had new activity (someone reacted, or the group chat was opened).<\/p>\n<p><strong>Solution: A rolling JSONL index with AI-assisted dedup.<\/strong><\/p>\n<p>Each triage run reads a persistent index file (triage-index.jsonl) that tracks every item ever surfaced \u2014 with its status (open, resolved, snoozed), when it was first and last seen, and resolution notes.<\/p>\n<table width=\"624\">\n<tbody>\n<tr>\n<td width=\"624\">{&#8220;id&#8221;:&#8221;email-001&#8243;,&#8221;subject&#8221;:&#8221;Architecture Review Request&#8221;,&#8221;from&#8221;:&#8221;Daniel F.&#8221;,<\/p>\n<p>&#8220;status&#8221;:&#8221;open&#8221;,&#8221;first_seen&#8221;:&#8221;2026-03-16&#8243;,&#8221;last_seen&#8221;:&#8221;2026-03-17&#8243;}<\/p>\n<p>{&#8220;id&#8221;:&#8221;email-002&#8243;,&#8221;subject&#8221;:&#8221;FY26 Survey &#8211; Last Day&#8221;,&#8221;from&#8221;:&#8221;HR Comms&#8221;,<\/p>\n<p>&#8220;status&#8221;:&#8221;resolved&#8221;,&#8221;resolved_at&#8221;:&#8221;2026-03-16&#8243;,&#8221;resolution&#8221;:&#8221;Completed survey&#8221;}<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>&nbsp;<\/p>\n<p>The AI agent performs semantic matching \u2014 not just string comparison \u2014 so it catches duplicates even when WorkIQ returns slightly different subject wording between runs. Resolved items are automatically excluded from future reports.<\/p>\n<p>You can manage the index conversationally:<\/p>\n<ul>\n<li><em>\u201cMark item 3 resolved\u201d<\/em> \u2192 updates the JSONL, won\u2019t show up next time<\/li>\n<li><em>\u201cSnooze item 5 until Friday\u201d<\/em> \u2192 hides it temporarily, resurfaces on the date<\/li>\n<\/ul>\n<h2>The Same Pattern Works for Teams<\/h2>\n<p>The exact same architecture \u2014 chunked queries, fallback prompts, rolling index \u2014 works for Microsoft Teams chat triage. The only difference is the prompt template, which focuses on group chats, channels, and @mentions instead of email threads.<\/p>\n<p>The workflow scans for:<\/p>\n<ul>\n<li><strong>\ud83d\udd34 Direct Asks<\/strong> \u2014 @mentioned, asked a question, assigned an action<\/li>\n<li><strong>\ud83d\udfe0 Account Updates<\/strong> \u2014 key decisions, blockers, status changes in important threads<\/li>\n<li><strong>\ud83d\udfe2 FYI<\/strong> \u2014 general discussion, links shared, meeting recaps<\/li>\n<\/ul>\n<p>Both workflows produce clean markdown reports that get saved to a folder structure \u2014 creating a searchable archive of your communication triage over time.<\/p>\n<h2>Why MCP Makes This Possible (and Portable)<\/h2>\n<p>The key architectural decision here is <strong>MCP<\/strong>. Because WorkIQ exposes its capabilities through the Model Context Protocol, this workflow isn\u2019t locked to a single AI assistant.<\/p>\n<p>The same triage prompts and workflow configs work with:<\/p>\n<ul>\n<li><strong>GitHub Copilot CLI<\/strong> \u2014 run triage from your terminal<\/li>\n<li><strong>GitHub Copilot in VS Code<\/strong> \u2014 run triage from your editor<\/li>\n<li><strong>Any MCP-compatible agent<\/strong> \u2014 the protocol is open<\/li>\n<\/ul>\n<p>This is the real power of MCP: you build the workflow once, and it works wherever MCP is supported. The prompts, the chunking strategy, the dedup index \u2014 none of it is tied to a specific AI provider.<\/p>\n<h2>What I Learned<\/h2>\n<h3>1. Prompt engineering isn\u2019t just for chatbots<\/h3>\n<p>The triage prompts went through multiple iterations. Getting the categorization right (\ud83d\udd34 vs \ud83d\udfe0 vs \ud83d\udfe2) required explicit instructions like <em>\u201cOnly put emails in \ud83d\udd34 if I am specifically and directly asked to do something. Being CC\u2019d does NOT count.\u201d<\/em><\/p>\n<h3>2. Resilience patterns matter for MCP integrations<\/h3>\n<p>Timeouts, partial results, and inconsistent data are real. Build fallback chains. Chunk your queries. Don\u2019t assume the backend will always respond in time.<\/p>\n<h3>3. AI-assisted dedup beats string matching<\/h3>\n<p>When the upstream data source returns free-text summaries (not stable IDs), semantic matching by the AI agent is more reliable than fuzzy string comparison. The AI understands that \u201cRequest for IAC Slot\u201d and \u201cFwd: Request for IAC Slot \u2013 Integration Discussion\u201d are the same thread.<\/p>\n<h3>4. Markdown + JSONL = surprisingly powerful<\/h3>\n<p>No database needed. Plain markdown reports are human-readable and git-trackable. JSONL indexes are machine-parseable and append-friendly. Together, they create a lightweight but capable state management system.<\/p>\n<h2>Try It Yourself<\/h2>\n<p>The core pattern is straightforward:<\/p>\n<ol>\n<li><strong>Install an MCP-compatible AI assistant<\/strong> (GitHub Copilot CLI, GitHub Copilot in VS Code)<\/li>\n<li><strong>Connect WorkIQ MCP<\/strong> to access your M365 data<\/li>\n<li><strong>Create a prompt template<\/strong> that describes your triage criteria and output format<\/li>\n<li><strong>Add resilience<\/strong> \u2014 chunking for large time windows, fallback prompts for timeouts<\/li>\n<li><strong>Add state<\/strong> \u2014 a JSONL index to track items across runs and avoid duplicates<\/li>\n<\/ol>\n<p>Start with email. Once that works, replicate for Teams. The architecture is the same.<\/p>\n<p>&nbsp;<\/p>\n<h2>What\u2019s Next?<\/h2>\n<p>I\u2019m exploring a few extensions:<\/p>\n<ul>\n<li><strong>Scheduled triage<\/strong> \u2014 run the scan automatically every morning and have the report waiting<\/li>\n<li><strong>Cross-channel correlation<\/strong> \u2014 connecting email items to related Teams threads<\/li>\n<li><strong>Action drafting<\/strong> \u2014 having the AI draft reply emails or Teams responses for the \ud83d\udd34 items<\/li>\n<\/ul>\n<p>The inbox triage problem won\u2019t go away. But with MCP and WorkIQ, we can turn it from a 30-minute scroll session into a 2-minute terminal command.<\/p>\n<p>&nbsp;<\/p>\n<h2>References<\/h2>\n<table width=\"624\">\n<tbody>\n<tr>\n<td width=\"213\"><strong>Resource<\/strong><\/td>\n<td width=\"411\"><strong>Link<\/strong><\/td>\n<\/tr>\n<tr>\n<td width=\"213\"><strong>WorkIQ MCP \u2014 Microsoft 365 Copilot MCP server<\/strong><\/td>\n<td width=\"411\"><a href=\"https:\/\/github.com\/microsoft\/work-iq-mcp\">github.com\/microsoft\/work-iq-mcp<\/a><\/td>\n<\/tr>\n<tr>\n<td width=\"213\"><strong>GitHub Copilot CLI \u2014 AI-powered terminal assistant<\/strong><\/td>\n<td width=\"411\"><a href=\"https:\/\/docs.github.com\/en\/copilot\/using-github-copilot\/using-github-copilot-in-the-command-line\">docs.github.com\/\u2026\/using-github-copilot-in-the-command-line<\/a><\/td>\n<\/tr>\n<tr>\n<td width=\"213\"><strong>GitHub Copilot in VS Code \u2014 AI pair programmer<\/strong><\/td>\n<td width=\"411\"><a href=\"https:\/\/docs.github.com\/en\/copilot\/using-github-copilot\/using-github-copilot-in-your-ide\">docs.github.com\/\u2026\/using-github-copilot-in-your-ide<\/a><\/td>\n<\/tr>\n<tr>\n<td width=\"213\"><strong>Model Context Protocol (MCP) \u2014 open standard for AI tool integration<\/strong><\/td>\n<td width=\"411\"><a href=\"https:\/\/modelcontextprotocol.io\">modelcontextprotocol.io<\/a><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Taming the Noisy Inbox: How I Used MCP to Automate Email and Teams Triage How the Model Context Protocol (MCP) turns your AI coding assistant into a workplace productivity engine \u2014 connecting Microsoft 365 data to your terminal workflow. &nbsp; The Problem We All Share If you work in a customer-facing role, you know the [&hellip;]<\/p>\n","protected":false},"author":207506,"featured_media":1743,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[20,19,97],"tags":[],"class_list":["post-1995","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-developer-productivity","category-github-copilot","category-mcp-model-context-protocol"],"acf":[],"blog_post_summary":"<p>Taming the Noisy Inbox: How I Used MCP to Automate Email and Teams Triage How the Model Context Protocol (MCP) turns your AI coding assistant into a workplace productivity engine \u2014 connecting Microsoft 365 data to your terminal workflow. &nbsp; The Problem We All Share If you work in a customer-facing role, you know the [&hellip;]<\/p>\n","_links":{"self":[{"href":"https:\/\/devblogs.microsoft.com\/all-things-azure\/wp-json\/wp\/v2\/posts\/1995","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/devblogs.microsoft.com\/all-things-azure\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/devblogs.microsoft.com\/all-things-azure\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/all-things-azure\/wp-json\/wp\/v2\/users\/207506"}],"replies":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/all-things-azure\/wp-json\/wp\/v2\/comments?post=1995"}],"version-history":[{"count":1,"href":"https:\/\/devblogs.microsoft.com\/all-things-azure\/wp-json\/wp\/v2\/posts\/1995\/revisions"}],"predecessor-version":[{"id":2244,"href":"https:\/\/devblogs.microsoft.com\/all-things-azure\/wp-json\/wp\/v2\/posts\/1995\/revisions\/2244"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/all-things-azure\/wp-json\/wp\/v2\/media\/1743"}],"wp:attachment":[{"href":"https:\/\/devblogs.microsoft.com\/all-things-azure\/wp-json\/wp\/v2\/media?parent=1995"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/all-things-azure\/wp-json\/wp\/v2\/categories?post=1995"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/all-things-azure\/wp-json\/wp\/v2\/tags?post=1995"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}