Automating Outlook and Microsoft 365 with n8n: AI email triage
Published 30 July 2026 · 5 min read
Plenty of French-speaking SMBs and mid-market companies don't run on Gmail — they run on Microsoft 365, with Outlook as their mail client. That's a concrete problem for anyone trying to automate inbox triage with n8n: the Email Trigger (IMAP) node, often the first instinct, simply doesn't work on a modern Microsoft 365 mailbox anymore. It's not an n8n bug — it's a Microsoft decision — and the fix requires a different node, an OAuth2 connection, and one Azure setup step done once.
Why Outlook needs different handling
Since October 2022, Microsoft has disabled basic authentication (username + password) on Exchange Online's IMAP, POP, and authenticated SMTP protocols, across nearly every Microsoft 365 tenant. In practice, a classic IMAP node trying to connect with a login and password hits an authentication refusal, even with correct credentials. Only modern authentication — OAuth2 through Microsoft Graph, Microsoft's unified API for Outlook, Teams, SharePoint, and the rest of the 365 suite — remains allowed.
n8n happens to ship a native node built for exactly this: Microsoft Outlook (n8n-nodes-base.microsoftOutlook) and its trigger counterpart, Microsoft Outlook Trigger. Both go through Graph instead of IMAP, which changes how you connect the credential but leaves the rest of the triage pipeline — AI classification, structured output, routing — identical to what's described in our AI email triage guide for n8n.
Step 1 — Register an application in Azure AD
Before touching n8n, you need to register an application on Microsoft's side:
- On portal.azure.com, open Azure Active Directory (renamed Microsoft Entra ID), then App registrations → New registration.
- Give it a clear name ("n8n — Outlook Automation"), leave the default account type ("accounts in this organizational directory only" fits most cases).
- Set the redirect URI to a "Web" type:
https://oauth.n8n.io/callbackfor n8n Cloud, orhttps://your-domain/rest/oauth2-credential/callbackfor a self-hosted instance — reuse the HTTPS domain of your setup, covered in our HTTPS with Traefik or Caddy guide if that isn't in place yet. - Under API permissions, add the needed delegated Microsoft Graph permissions:
Mail.Read(reading),Mail.ReadWrite(if you want to move or categorize messages),Mail.Send(if the workflow needs to reply), andoffline_access(required so n8n can refresh the token without asking for a manual reconnect). - Under Certificates & secrets, create a new client secret and copy its value immediately — it will never be shown in full again.
If your organization restricts user consent (common in mid-size companies), an administrator will need to approve these permissions once, via the Grant admin consent button on the same page.
Step 2 — Create the credential in n8n
In n8n, add a Microsoft Outlook OAuth2 API credential, paste in the Client ID and Client Secret generated above, then click Connect my account. The Microsoft sign-in window opens, asks for consent on the declared permissions, and redirects back to n8n once approved — the same mechanism as the OAuth2 setup described in our guide to connecting Google to n8n, just on Microsoft's ecosystem.
Step 3 — The Microsoft Outlook Trigger
The Microsoft Outlook Trigger node works via polling: it periodically queries Microsoft Graph for new messages, at an adjustable interval (one minute is more than enough for professional use). Two settings worth getting right:
- Folder — restrict the trigger to the inbox (
Inbox) rather than the whole mailbox, or you'll also pick up messages already sorted into other folders. - Output — enable fetching the full message body, not just the subject, or the downstream LLM has nothing to classify.
Step 4 — Wire in the AI triage pipeline
From here, the architecture matches standard email triage: an AI Agent or a Basic LLM Chain paired with a Structured Output Parser classifies each message (category, priority, summary) against an explicit schema — the full detail of this step is covered in our AI email triage guide and our intro to n8n's AI nodes if you're new to these nodes.
Only the action step really changes: where Gmail applies a label, the Outlook node applies a color category (an "Update" operation, categories field) or moves the message to an existing folder. For an urgent-message alert, an organization on Microsoft 365 usually already runs on Teams rather than Slack — our guide to building a Teams bot with AI and n8n covers sending that notification to the right channel.
Shared mailboxes: contact@, support@
Many SMBs triage a generic mailbox (contact@, support@) rather than a personal one. The Microsoft Outlook node can target a shared mailbox different from the connected account, as long as that account has Full Access rights on it in Exchange (granted through the Exchange admin center or PowerShell, on the IT side). This avoids creating a ghost user account purely for the sake of automation — worth avoiding both for access clarity and license cost.
Pitfalls specific to Microsoft Graph
- Revoked refresh token: a company security policy (forced password change, access review) can invalidate n8n's OAuth2 token. The workflow then fails with a clear authentication error rather than a 429 — just reconnect the credential.
- Graph throttling: Microsoft Graph enforces its own rate limits, separate from those of AI providers. On a high-volume triage job, the same instincts that apply to OpenAI or Anthropic APIs apply here too — see our guide to AI rate limits in n8n for the paced Loop Over Items pattern, which transfers directly.
- Categories vs. folders: a color category doesn't remove a message from the inbox, unlike moving it to a folder. Pick the behavior deliberately: category to keep the message visible and filterable, folder to genuinely move it out of the main view.
- Delegated vs. application permissions: delegated permissions (described here) act on behalf of the connected user. For automation that needs to keep running without a human staying continuously signed in, application permissions (with organization-wide admin consent) are more robust, but require a more advanced Azure setup, outside the scope of this article.
What this actually changes for mental load
The benefit of automated triage goes beyond time saved. A study by Gloria Mark, Stephen Voida, and Armand Cardello (CHI 2012, a Best Paper nominee), which cut off email access for 13 office workers over five workdays, measured lower stress (via heart rate variability) and noticeably longer focus on each task in the absence of constant email interruptions. The paper is available on its Google Scholar page: scholar.google.com/scholar?q=%22A+pace+not+dictated+by+electrons%22+Mark+Voida+Cardello. Automated triage with a digest obviously doesn't cut off email — but it reproduces the intended effect: checking your inbox in focused passes rather than continuously, which is exactly the point of the daily digest described in our email triage guide.
Going further
The Inbox AI Pack (€79) ships with ready-to-use IMAP and Gmail triggers; on a Microsoft 365 mailbox, simply swap the trigger node for a Microsoft Outlook Trigger connected as described above — the AI classification, structured output, and daily digest stay identical, since they never depend on the upstream email provider. If your organization also handles compliance documents beyond email, the Complete FlowKit Bundle (€269 instead of €347) covers every pack at once.
FAQ
Frequently asked questions
Why doesn't n8n's generic IMAP node work with Outlook or Microsoft 365 anymore?
Because Microsoft disabled basic authentication (username + password) on Exchange Online's IMAP, POP, and authenticated SMTP protocols back in October 2022, for nearly all tenants. n8n's Email Trigger (IMAP) node relies on that authentication mode, so it can no longer connect to a modern Microsoft 365 mailbox. Only an OAuth2 connection through the Microsoft Outlook node, backed by Microsoft Graph, still works.
Do I need an Azure admin account to connect Outlook to n8n?
For personal use with standard delegated permissions (Mail.Read, Mail.Send), a regular user account is usually enough: consent is granted at the moment of the OAuth2 connection in n8n. However, if your organization has restricted user consent in Azure AD (a common policy in larger companies), an administrator will need to approve the permissions once, via the Azure portal or the admin consent button.
Can I connect a shared mailbox (contact@, support@) instead of a personal one?
Yes, as long as the user account that authorizes the OAuth2 connection has Full Access rights on the shared mailbox in Exchange. The Microsoft Outlook node can then target a mailbox different from the connected account, which avoids creating a dedicated dummy user account purely for automation.
Does the Inbox AI Pack work directly with Outlook?
The pack ships with an IMAP trigger and a Gmail trigger. On a Microsoft 365 mailbox, simply swap the trigger node for a Microsoft Outlook Trigger connected via OAuth2 as described in this article: the rest of the pipeline (AI classification, structured output, routing, digest) stays identical, since it never depends on the email provider.
Bundle FlowKit Complet
€269