Microsoft Teams

Communication OAuth, webhook URL, or a bot registration Windmill docs

Read and post channel and chat messages, and create channels, chats and online meetings, from any Windmill script, flow or app.

Set up in 3 steps

1

Connect from the Resources page

Open Resources, click Add a resource/API and pick ms_teams under Instance-configured OAuth APIs. Click Connect and sign in with your work or school Microsoft account. Scripts act as that user, in the teams and chats they belong to.

2

Run your first script

Fork the send channel message script below and pick a team and channel from the dropdowns.

3

Or post through an incoming webhook

To only post to one channel, with no sign-in: add an incoming webhook to the channel in Teams and save its URL in a resource of type ms_teams_webhook under Others. Anyone holding the URL can post to the channel.

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 Teams

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

Teams commands

Type /windmill in Teams and it runs a script, with what you typed as its inputs. A workspace admin connects Teams once from Workspace settings, under the Slack / Teams tab; a given Team sends its commands to only one Windmill workspace.

Resource types

The credential shapes the scripts on this page expect — pick the one your script asks for.

FieldTypeRequiredWhat it is
tokenstringYesMicrosoft Graph access token. Filled in and refreshed by Windmill when you connect with OAuth.
FieldTypeRequiredWhat it is
app_idstringYesMicrosoft App ID (Application (client) ID of the Azure Bot's App Registration)
app_passwordstringYesClient secret value for the App Registration
tenant_idstringNoAzure AD tenant ID. Set only when the Azure Bot is configured as Single Tenant; leave empty for Multi Tenant bots so the multi-tenant Bot Framework token endpoint is used.

ms_teams_webhook

View raw schema →
FieldTypeRequiredWhat it is
webhook_urlstringYesSee https://learn.microsoft.com/en-us/microsoftteams/platform/webhooks-and-connectors/how-to/add-incoming-webhook?tabs=dotnet for detais on how to create a webhook

Questions

OAuth, webhook or bot?

The ms_teams connection acts as the person who signed in, across their teams and chats. A webhook only posts to its one channel, with no sign-in. The azure_bot resource (app id, password and tenant) is for a registered bot that posts under its own name.

A script fails on a missing permission

Each script's description names the permission it needs. Reading channel messages, listing members, creating channels and reading Shifts need permissions a tenant administrator must approve first; then tick them when connecting, otherwise the sign-in stops at Need admin approval.

Does it work with a personal Microsoft account?

No. Microsoft Graph only exposes Teams for 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_teams, then enters its client id, secret and tenant in the Microsoft Teams entry under Instance settings → Auth/OAuth/SAML → OAuth. The tenant is set once for the whole instance; on Enterprise Edition the same entry also runs the /windmill bot. Until then, post through a webhook.

Can a flow start when a message is posted?

Not from this connection yet. Run the list chat messages or list channel messages script on a schedule instead.