Microsoft Outlook

Communication OAuth Microsoft Graph Outlook mail API

Send, search and organize email, and manage calendar events and contacts, in a Microsoft 365 or Outlook.com account from any Windmill script, flow or app.

Set up in 2 steps

1

Connect from the Resources page

Open Resources, click Add a resource/API and pick Outlook under Instance-configured OAuth APIs. Click Connect and sign in with the Microsoft account that owns the mailbox, then name the resource and save it.

2

Run your first script

Fork the send email script below, or any mail, calendar or contact script.

Scripts

Building blocks, if none of the projects above fit. Fork one, run it, or call it as a step inside your own flow.

Submit a script →

Trigger flows from Microsoft Outlook

Microsoft Outlook is not only a destination. These inbound paths are supported today.

New email (scheduled poll)

In a flow, add a trigger, choose Scheduled Poll, pick the New Email script and an interval. Each run emits the messages that arrived in the chosen folder since the previous one.

Resource type

The shape of the credential every script on this page expects.

FieldTypeRequiredWhat it is
tokenstringYesMicrosoft Graph access token. Filled in and refreshed by Windmill when you connect with OAuth.

Questions

A script fails on a missing permission

Each script's description names the permission it needs. The default covers your own mail, calendar and contacts; categories, people search, meeting times and shared mailboxes (a Shared permission such as Mail.Send.Shared) are extra. Tick it when connecting, or reconnect an existing resource.

Can scripts act on a shared mailbox?

Yes. Mail scripts take an optional mailbox argument, the address or id of a mailbox the connected account has been granted access to.

Does it work with a personal Outlook.com account?

Mail, calendar and contacts do, when the Entra app allows personal accounts and the tenant is set to common. Find meeting times is only available to work or school accounts.

There is no Connect button on my instance

An instance admin registers an app in Microsoft Entra ID with the redirect URI <your instance>/oauth/callback/ms_outlook, then adds Outlook under Instance settings → Auth/OAuth/SAML → OAuth with its client id, secret and tenant. The tenant is set once for the whole instance, and one Entra app can serve Outlook, OneDrive, SharePoint and Excel.