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
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.
Run your first script
Fork the send channel message script below and pick a team and channel from the dropdowns.
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.
Send Chat Message
Send Channel Message
Search Messages
Reply to Channel Message
List Teams
List Team Members
List Shifts
List Message Replies
List Chats
List Chat Messages
List Channels
List Channel Messages
List Channel Members
Get Current User
Get Chat Message
Get Channel Message
Create Online Meeting
Create Chat
Create Channel
Variable expiration handler
Send a message to MS Teams channel via webhook
Send a message to Microsoft Teams via Bot Framework
Microsoft Teams approval
Interactive Microsoft Teams approval
Schedule success handler
Schedule recovery handler
Workspace or Schedule error handler
Example of responding to a Microsoft Teams command
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.
ms_teams
View raw schema →| Field | Type | Required | What it is |
|---|---|---|---|
| token | string | Yes | Microsoft Graph access token. Filled in and refreshed by Windmill when you connect with OAuth. |
azure_bot
View raw schema →| Field | Type | Required | What it is |
|---|---|---|---|
| app_id | string | Yes | Microsoft App ID (Application (client) ID of the Azure Bot's App Registration) |
| app_password | string | Yes | Client secret value for the App Registration |
| tenant_id | string | No | Azure 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 →| Field | Type | Required | What it is |
|---|---|---|---|
| webhook_url | string | Yes | See 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.