← Back to blog

Triage your Outlook inbox with Claude Code

guidesoutlookclaude-code

Claude has an official Microsoft 365 connector, but it requires a Microsoft Entra tenant tied to a Microsoft business plan. Personal addresses such as @outlook.com and @hotmail.com cannot connect. If that is your inbox, or your company has not enabled the connector, you need another route.

This guide connects Outlook to Claude Code with Fluxmail, a self-hosted MCP server. It works with personal Outlook.com and Hotmail accounts and with Microsoft 365 work mailboxes. Once connected, Claude Code can sort your unread mail, archive what you do not need, and draft replies that you send yourself.

1. Register a Microsoft app

Fluxmail talks to Outlook through Microsoft Graph, which needs an app registration in Microsoft Entra. You create it once, and it stays under your control.

In the Microsoft Entra admin center:

  1. Go to Identity > Applications > App registrations and select New registration.
  2. For Supported account types, pick an option that includes personal Microsoft accounts if you use Outlook.com or Hotmail.
  3. Under API permissions, add these delegated Microsoft Graph permissions: User.Read, Mail.ReadWrite, Mail.Send, and MailboxSettings.Read.
  4. Under Authentication, add the Mobile and desktop applications platform with the redirect URI http://localhost:8976/oauth/microsoft/callback, and turn on Allow public client flows.
  5. Copy the Application (client) ID.

A local setup does not need a client secret. At work, an Entra administrator may need to approve the permissions. Connect Outlook / Exchange has the full walkthrough, including remote servers.

2. Connect the mailbox

Install Fluxmail, create the local administrator, register your app, and sign in:

npm install -g fluxmail
fluxmail setup --name "Your name" --email you@example.com
fluxmail oauth configure outlook \
  --client-id <application-client-id> \
  --public-client
fluxmail accounts add outlook

accounts add outlook opens Microsoft's sign-in page. Approve access, and Fluxmail stores the tokens encrypted on your computer. Your mail stays with Microsoft. Fluxmail reads it through Graph when Claude Code asks.

3. Add Fluxmail to Claude Code

Triage needs to read, organize, and draft. It does not need to send. Use the read-write profile:

claude mcp add fluxmail -- fluxmail stdio --profile read-write

Claude Code can now write drafts, but it cannot send mail. Run claude mcp list to check the connection.

4. Sort the inbox

Open Claude Code and ask:

Check my unread Outlook inbox from the last three days. Group the messages into Reply needed, Read later, and Noise, and show me the list before changing anything.

Claude Code searches with Fluxmail's search_emails tool. The query uses the same syntax for Outlook as for Gmail and IMAP:

in:inbox is:unread after:2026-09-20

When a subject is not enough, it opens the conversation with get_thread. You get a grouped list, and your mailbox is unchanged.

Fix anything it sorted wrong, then tell it what to do:

Archive the Noise group. Move Read later into my Newsletters folder and mark it read. Draft replies for Reply needed.

Claude Code archives and moves messages with modify_emails and writes replies with create_draft. The drafts land in your Outlook Drafts folder as replies to the original messages. Open Outlook, edit them if needed, and send.

Use folders that already exist in Outlook. Claude Code can list them with list_folders before it moves anything.

5. Make it a command

Save your sorting rules as a Claude Code skill so each triage starts from the same instructions. Create ~/.claude/skills/triage-outlook/SKILL.md:

---
name: triage-outlook
description: Sort unread Outlook mail, archive noise, file newsletters, and draft replies after I approve the plan.
---

Search my Outlook inbox for unread mail from the last three days.

Sort each message into:
- Reply needed: a person is waiting on me.
- Read later: newsletters and reports. Move these to the Newsletters folder.
- Noise: notifications and marketing. Archive these.

Rules:
- Mail from my manager or anyone at @mycompany.com is never Noise.
- Leave meeting invitations in the inbox.
- Show me the plan and wait for my OK before moving or drafting anything.
- Keep drafts short, and do not commit me to dates or prices.

Run it with /triage-outlook.

Outlook details worth knowing

  • Focused Inbox is a view, not a folder. Fluxmail sees the whole inbox. If you want Claude Code to skip what Outlook put under Other, say which senders to ignore in your rules.
  • Categories work like labels. Claude Code can apply Outlook categories with modify_emails if you use them to track work.
  • Several accounts are fine. Connect a personal Outlook.com account and a work mailbox, and ask Claude Code to triage both. Fluxmail can search up to 20 mailboxes in one request.

Keep sending with you

Anyone can email you, and a message can include text meant to steer the agent. With the read-write profile, a message like that cannot make Claude Code send mail. Keep the approval step in your skill so you see every move before it happens. How to give an AI agent access to your email safely goes further.

Next steps

The Claude Code integration guide covers HTTP connections and other options.