Connect Retool to Microsoft Teams by configuring a REST API Resource that calls either Teams Incoming Webhooks (zero setup, channel-only messages) or the Microsoft Graph API (full messaging, adaptive cards, Azure AD OAuth). Use the webhook approach for simple Retool Workflow alerts and Graph API for richer integrations where you need to post to specific users or send interactive adaptive card messages from your internal tools.
| Fact | Value |
|---|---|
| Tool | Microsoft Teams |
| Category | Communication |
| Method | REST API Resource |
| Difficulty | Intermediate |
| Time required | 30 minutes |
| Last updated | April 2026 |
Send Microsoft Teams Notifications from Retool Apps and Workflows
Operations teams building internal tools in Retool often need to close the loop by notifying their Microsoft Teams channels when important events happen — a new customer order exceeds a threshold, an approval request is submitted, a database operation fails, or a scheduled report is ready. Retool's REST API Resource layer makes this possible by calling Teams' messaging APIs directly from app queries and background Workflows.
There are two distinct integration paths depending on your Teams environment and what you need to do. The first is Teams Incoming Webhooks: a legacy but widely used feature where you install a 'Webhook' connector app on a specific Teams channel and get back a URL. Posting a JSON payload to that URL delivers a message to the channel instantly, with no authentication flow and no Azure AD involvement. This approach is ideal for Retool Workflow alerts, error notifications, and status updates. The limitation is that it only posts to a single configured channel — you cannot dynamically choose the channel or recipient at runtime.
The second path is the Microsoft Graph API: Microsoft's unified API for all Microsoft 365 services. Through Graph, you can send messages to any Teams channel, create chats with specific users, post adaptive card messages with interactive buttons, and read messages. Graph requires an Azure AD app registration with the appropriate scopes and OAuth 2.0 authentication. While more complex to set up, it gives you the full power of Teams' messaging capabilities from Retool. Note that Microsoft deprecated the legacy Incoming Webhooks connector in favor of 'Workflows' app webhooks in late 2024 — the new Workflows-based approach is similar but uses a different URL format and is the recommended path for new implementations.
Integration method
Retool does not have a native Microsoft Teams connector. Instead, you connect via REST API Resource using one of two approaches: Teams Incoming Webhooks (a simple webhook URL that posts to a specific channel, no OAuth required) or the Microsoft Graph API (full messaging capabilities requiring Azure AD app registration and OAuth 2.0). Retool proxies all requests server-side, so tokens and webhook URLs are never exposed to the browser. The webhook approach takes 5 minutes; Graph API takes 20-30 minutes with Azure AD setup.
Prerequisites
- A Microsoft Teams account with permission to add apps or create workflows in at least one channel (for the Incoming Webhook approach)
- For Microsoft Graph API: an Azure AD account with permission to register applications and grant API permissions
- A Retool account (Cloud or self-hosted) with permission to create Resources
- For the Workflow notification use case: a Retool Business or Enterprise plan with Workflows enabled (free plans have limited Workflow runs)
Step-by-step guide
Create a Teams Incoming Webhook URL
The simplest Teams integration uses an Incoming Webhook — a URL associated with a specific Teams channel that accepts HTTP POST requests and delivers messages. Navigate to the Teams channel where you want to receive Retool notifications. Right-click the channel name in the sidebar and select 'Manage channel'. In the channel settings, click the 'Connectors' or 'Edit' link next to Connectors. Search for 'Incoming Webhook' in the connectors list and click 'Add'. Note: Microsoft began deprecating legacy Connectors in late 2024. If you do not see Incoming Webhook in the Connectors list, use the new 'Workflows' app approach instead: click the three-dot menu on the channel → Workflows → search for 'Post to a channel when a webhook request is received'. Follow the setup wizard to get a webhook URL. For the legacy Incoming Webhook approach: click 'Configure' next to Incoming Webhook, give it a name (e.g., 'Retool Alerts'), optionally upload an icon, and click 'Create'. Copy the webhook URL that appears — it looks like https://outlook.office.com/webhook/{id}/IncomingWebhook/{id}/{id}. For the new Workflows-based webhook, the URL format starts with https://prod-xx.westus.logic.azure.com/. Store this URL as a Retool configuration variable — do not hardcode it in your queries.
Pro tip: Create separate Incoming Webhook URLs for each Teams channel or notification category — this makes it easy to route different types of Retool alerts to different teams without reconfiguring a single integration.
Expected result: A webhook URL is copied and ready to use. Testing it by POSTing a simple JSON payload from a tool like Postman or curl delivers a message to the configured Teams channel.
Configure the REST API Resource for Teams webhooks
In Retool, navigate to the Resources tab and click '+ Create new resource'. Select 'REST API' from the connector list. Name the resource 'Microsoft Teams (Webhook)'. For the Base URL, enter the base portion of your webhook URL — for legacy Incoming Webhooks, use https://outlook.office.com; for the new Workflows webhooks, use https://prod-xx.westus.logic.azure.com (use the actual region prefix from your URL). Leave authentication as 'None' — Incoming Webhooks are authenticated by the secret embedded in the URL path, not by headers. Click 'Save resource'. Now create a query that uses this resource. In your app or Workflow, create a new query, select the Teams webhook resource, set Method to POST, and enter the path as the remainder of the webhook URL after the base URL (the /webhook/... path). In the Body, select JSON and enter a MessageCard or simple text payload. For the legacy webhook format, use the MessageCard schema. For the new Workflows webhook, post a JSON object with your message content as simple key-value pairs that your Workflow is configured to accept. Test by running the query and confirming the message appears in your Teams channel.
1{2 "method": "POST",3 "path": "/webhook/XXXXXXXX@XXXXXXXX/IncomingWebhook/XXXXXXXX/XXXXXXXX",4 "body": {5 "@type": "MessageCard",6 "@context": "http://schema.org/extensions",7 "themeColor": "0076D7",8 "summary": "Retool Notification",9 "sections": [{10 "activityTitle": "{{ notificationTitle.value || 'Retool Alert' }}",11 "activitySubtitle": "{{ new Date().toLocaleString() }}",12 "activityText": "{{ notificationBody.value }}",13 "facts": [14 { "name": "Source", "value": "Retool" },15 { "name": "User", "value": "{{ current_user.email }}" }16 ]17 }]18 }19}Pro tip: Store the webhook URL path as a Retool configuration variable (Settings → Configuration Variables) rather than hardcoding it in the query path. This makes it easy to swap webhook URLs across environments without modifying query definitions.
Expected result: The POST query delivers a formatted MessageCard to the configured Teams channel. The message shows the title, subtitle, body text, and facts (source and user) in the Teams message format.
Register an Azure AD app for Microsoft Graph API
For richer Teams integration — sending messages to specific users, posting adaptive cards, or choosing channels dynamically — you need the Microsoft Graph API with Azure AD authentication. Navigate to the Azure Portal at portal.azure.com. Click 'Azure Active Directory' (or search for it). In the left sidebar, click 'App registrations' → 'New registration'. Name the application 'Retool Integration', select 'Accounts in this organizational directory only' under Supported account types (unless you need multi-tenant), and leave Redirect URI blank for now. Click 'Register'. On the app registration page, note the Application (client) ID and Directory (tenant) ID — you will need both for Retool's OAuth configuration. In the left sidebar, click 'Certificates & secrets' → 'New client secret'. Give it a description like 'Retool' and set an expiry of 24 months. Click Add and immediately copy the secret value — Azure will not show it again. Now configure API permissions: click 'API permissions' in the sidebar → 'Add a permission' → 'Microsoft Graph' → 'Application permissions'. Add ChannelMessage.Send (to post to channels) and Chat.ReadWrite (to send direct messages, if needed). Click 'Add permissions', then click 'Grant admin consent for [your organization]' and confirm. Admin consent is required for Application permissions to take effect.
Pro tip: Use 'Application permissions' (not Delegated) for Retool's Workflow and server-side integrations — Application permissions allow the app to act as a service account without requiring a user to be signed in, which is required for scheduled Workflows.
Expected result: The Azure AD app registration is complete with a client ID, tenant ID, client secret, and the ChannelMessage.Send permission granted with admin consent. The Permissions page shows a green checkmark next to each granted permission.
Configure Microsoft Graph REST API Resource with OAuth
In Retool, navigate to the Resources tab and click '+ Create new resource' → 'REST API'. Name the resource 'Microsoft Graph (Teams)'. Set Base URL to https://graph.microsoft.com. For Authentication, select 'OAuth 2.0'. Configure the OAuth 2.0 fields as follows: Grant type — set to 'Client Credentials' (for Application permissions, this is the correct grant type since there is no user interaction). Token URL — enter https://login.microsoftonline.com/{tenantId}/oauth2/v2.0/token, replacing {tenantId} with the Directory (tenant) ID from your Azure AD app. Client ID — paste the Application (client) ID from Azure AD. Client Secret — paste the client secret value. Scope — enter https://graph.microsoft.com/.default (this tells Azure AD to grant all permissions you configured in the app registration). For the OAuth token, use the magic variable OAUTH2_TOKEN in the headers section: add a header Authorization with value Bearer {{ OAUTH2_TOKEN }}. Click 'Test connection' — Retool will request a token from Azure AD and confirm it is valid. If successful, click Save. Now you can write queries against any Graph API endpoint including Teams channel messages.
1// Graph API query configuration to send a message to a Teams channel2// Set Method to POST in the Retool query editor3{4 "method": "POST",5 "path": "/v1.0/teams/{{ teamId }}/channels/{{ channelId }}/messages",6 "body": {7 "body": {8 "contentType": "html",9 "content": "<strong>{{ messageTitle.value }}</strong><br>{{ messageBody.value }}<br><i>Sent from Retool by {{ current_user.email }}</i>"10 }11 }12}Pro tip: To find your Teams team ID and channel ID for Graph API paths: in Teams, click the three-dot menu on a channel → 'Get link to channel'. The URL contains the team ID and channel ID in encoded format. Alternatively, call GET /v1.0/teams to list teams and GET /v1.0/teams/{teamId}/channels to list channels.
Expected result: The Graph API resource saves with OAuth authentication configured. A test POST to /v1.0/me/sendMail or a Teams message endpoint returns a 200 or 201 response, confirming the OAuth token flow and API access are working correctly.
Send Adaptive Card messages from Retool Workflows
Adaptive Cards are Teams' rich message format that supports structured layouts with images, facts, and interactive buttons. They are significantly more visually useful than plain text for operational notifications. Create a Retool Workflow (from the main Retool navigation → Workflows → New Workflow). Set the trigger type — Schedule for recurring reports, Webhook for event-driven notifications, or leave it as a manual trigger for testing. In the Workflow canvas, drag a Resource Query block and select your Microsoft Graph REST API resource. Set Method to POST and path to /v1.0/teams/{teamId}/channels/{channelId}/messages. In the body, construct an Adaptive Card JSON payload using the Teams Adaptive Card schema. The card body is set as an attachment in the message body. Reference data from previous Workflow blocks using the expression {{ blocks.queryName.data }}. Add a JavaScript block before the API call to format your database query results into the Adaptive Card JSON structure. For error handling, add a Global Error Handler block in the Workflow that posts a simple plain-text notification to an alerts channel if any block fails. Publish the Workflow when ready. For complex Retool Workflow automations involving Microsoft Teams, multiple data sources, and conditional routing logic, RapidDev's team can help architect and build your Retool solution.
1// JavaScript block in Retool Workflow to build Adaptive Card payload2// Input: blocks.getOrderData.data (array of order objects)3const orders = blocks.getOrderData.data || [];4const totalValue = orders.reduce((sum, o) => sum + o.total_amount, 0);56const adaptiveCard = {7 type: 'message',8 attachments: [{9 contentType: 'application/vnd.microsoft.card.adaptive',10 contentUrl: null,11 content: {12 '$schema': 'http://adaptivecards.io/schemas/adaptive-card.json',13 type: 'AdaptiveCard',14 version: '1.4',15 body: [16 {17 type: 'TextBlock',18 size: 'Large',19 weight: 'Bolder',20 text: 'Daily Orders Summary'21 },22 {23 type: 'FactSet',24 facts: [25 { title: 'Total Orders', value: String(orders.length) },26 { title: 'Total Value', value: `$${totalValue.toFixed(2)}` },27 { title: 'Date', value: new Date().toLocaleDateString() }28 ]29 },30 {31 type: 'ActionSet',32 actions: [{33 type: 'Action.OpenUrl',34 title: 'View in Retool',35 url: 'https://retool.yourcompany.com/apps/orders-dashboard'36 }]37 }38 ]39 }40 }]41};4243return adaptiveCard;Pro tip: Use the Adaptive Card Designer at adaptivecards.io/designer to build and preview your card layout visually before coding the JSON in Retool. Export the JSON from the designer and adapt it to Retool's Workflow block structure.
Expected result: The Retool Workflow posts a structured Adaptive Card to the Teams channel. The card displays formatted data with a title, fact set, and a button linking to the Retool dashboard. The message appears in Teams with the correct visual layout.
Common use cases
Send automated approval request notifications to a Teams channel
When a vendor or expense request is submitted in a Retool app, a Retool Workflow automatically posts an adaptive card to a Finance-team Teams channel. The card shows the requester's name, the amount, a brief description, and two buttons — Approve and Reject. Clicking either button calls a Retool Workflow webhook to record the decision and update the database record.
Build a Retool Workflow that triggers on new expense submissions. Post an Adaptive Card to the Finance Teams channel showing: requester name, expense amount, category, and description. Include Approve and Reject buttons that POST to a Retool Workflow webhook URL when clicked. On button click, update the expense record status in PostgreSQL.
Copy this prompt to try it in Retool
Alert on-call engineers to critical database errors via Teams
A Retool Workflow runs every 5 minutes, queries an error_log table for new critical errors since the last check, and posts a formatted message to the Engineering on-call Teams channel if any are found. The message includes the error type, timestamp, affected service, and a direct link to the Retool monitoring dashboard for investigation.
Build a Retool Workflow with a 5-minute schedule trigger. Query error_log for rows where severity = 'critical' and created_at > last run time. If rows exist, POST a Teams message to the Engineering on-call channel with error details and a link to the Retool error dashboard. Skip posting if no new errors are found.
Copy this prompt to try it in Retool
Post daily operational summary reports to a management channel
Every morning at 8 AM, a Retool Workflow queries sales, support tickets, and system health data from multiple databases, formats the results into a structured Teams message, and posts it to the Management channel. Executives see the key metrics in Teams without needing to open Retool or a separate reporting tool.
Build a Retool Workflow with an 8 AM daily schedule trigger. Query yesterday's sales total, new customer count, open support tickets, and system uptime. Format as a Teams message with sections for each metric. Post to the Management channel. Include a link to the full Retool operations dashboard.
Copy this prompt to try it in Retool
Troubleshooting
Incoming Webhook POST returns 400 Bad Request
Cause: The MessageCard JSON payload is malformed, missing required fields (@type, @context), or the content-type header is missing.
Solution: Ensure the request body includes @type: 'MessageCard' and @context: 'http://schema.org/extensions' at the root level. Verify the body is valid JSON. In the Retool query, set Body type to JSON (not form data or raw). The Content-Type header should be set to application/json — Retool sets this automatically when you select JSON body type.
1// Minimal valid MessageCard payload2{3 "@type": "MessageCard",4 "@context": "http://schema.org/extensions",5 "text": "Hello from Retool!"6}Microsoft Graph API returns 403 Forbidden when posting to a Teams channel
Cause: The Azure AD app does not have admin-consented ChannelMessage.Send Application permission, or the team/channel IDs in the request path are incorrect.
Solution: In the Azure Portal, navigate to your App Registration → API Permissions. Verify ChannelMessage.Send is listed under Microsoft Graph Application permissions and shows a green 'Granted for [org]' status. If admin consent was not granted, click 'Grant admin consent' (requires Azure AD admin role). Verify the team ID and channel ID are correct by calling GET /v1.0/teams and GET /v1.0/teams/{teamId}/channels from Retool to list available teams and channels.
OAuth 2.0 token request fails with 'invalid_client' or 'unauthorized_client' error
Cause: The client ID, client secret, or tenant ID in the Retool REST API resource OAuth configuration is incorrect, or the client credentials grant type is not enabled for the app registration.
Solution: Verify the Application (client) ID and Directory (tenant) ID from the Azure AD app registration overview page — copy them fresh rather than retyping. Confirm the client secret value is the secret VALUE (not the secret ID — Azure shows both). Regenerate the client secret if there is any doubt about which value was copied. Ensure the Token URL uses your specific tenant ID, not 'common' or 'organizations'.
1// Correct Token URL format for client credentials2// Replace {tenantId} with your actual Directory (tenant) ID3https://login.microsoftonline.com/{tenantId}/oauth2/v2.0/tokenTeams Incoming Webhook URL stopped working after Microsoft connector deprecation
Cause: Microsoft deprecated legacy Outlook Connectors (including Incoming Webhooks) for Teams in 2024. Webhooks created before the deprecation deadline continue to work until their retirement date, but new webhooks must use the Teams 'Workflows' app approach.
Solution: Create a new Workflows-based webhook: in Teams, click the three-dot menu on the target channel → Workflows → search for 'Post to a channel when a webhook request is received'. Follow the wizard and copy the new webhook URL. Update your Retool REST API resource's base URL and query path to match the new Workflows webhook URL format.
Best practices
- Store Teams webhook URLs and Graph API credentials as secret configuration variables in Retool (Settings → Configuration Variables) rather than hardcoding them in query bodies — this prevents credential exposure if query definitions are shared.
- Use Teams Incoming Webhooks (or Workflows-based webhooks) for simple Retool notifications that always target the same channel — the setup is 5 minutes with no Azure AD complexity, making it the right choice for 80% of Retool-to-Teams alerting use cases.
- Use Microsoft Graph API only when you need to dynamically choose the recipient channel or user at runtime, send interactive Adaptive Cards with buttons that call back to Retool Workflows, or integrate with the broader Microsoft 365 ecosystem.
- For Retool Workflow error notifications, add a Global Error Handler block that posts a simple plain-text Teams message when any workflow block fails — this gives your operations team immediate visibility into automation failures without checking Retool Workflow logs.
- Rate limit awareness: the Microsoft Graph API throttles requests per application per minute. For high-volume Retool Workflows posting many Teams messages in quick succession, add delays between requests or batch multiple messages into a single notification rather than sending one per event.
- Test Teams notifications in a dedicated staging channel before connecting Retool Workflows to production channels — a Workflow bug that spams a Teams channel with hundreds of messages is disruptive and hard to undo.
- Use Adaptive Cards for Retool notifications that require human action (approvals, escalations) rather than plain text — cards with buttons and structured data make it easier for recipients to take action directly from Teams without switching to Retool.
Alternatives
Slack has a native Retool connector with OAuth setup handled automatically in the Resources tab, making it significantly simpler to configure than Teams' webhook or Graph API approach — choose Slack if your team uses it instead of Teams.
Zoom's REST API connects via REST API Resource and is the right choice when your operations team needs to trigger Zoom meeting creation or recordings from Retool rather than sending chat notifications.
Google Meet connects via Google Calendar's REST API and suits teams on Google Workspace who need to create meetings programmatically from Retool rather than using Microsoft 365.
Frequently asked questions
Does Retool have a native Microsoft Teams connector?
No. Unlike Slack, which has a dedicated native connector in Retool's Resources tab, Microsoft Teams requires a generic REST API Resource using either Teams Incoming Webhooks or the Microsoft Graph API. The configuration is straightforward for the webhook approach (no authentication beyond the URL itself) but requires Azure AD app registration for the full Graph API integration.
What is the difference between Teams Incoming Webhooks and the Workflows app webhook?
Legacy Incoming Webhooks were configured via the 'Connectors' section in Teams channel settings. Microsoft deprecated this approach in 2024. The new 'Workflows' app webhook works similarly — you create a flow using the Teams Workflows app that exposes a webhook URL — but uses the Power Automate infrastructure under the hood. Both accept HTTP POST requests and deliver messages to a specific channel. The request body format differs slightly between the two approaches.
Can Retool send Teams messages to a specific user (direct message) rather than a channel?
Yes, using the Microsoft Graph API. Send a direct message by creating a chat with the user first: POST to /v1.0/chats with chatType 'oneOnOne' and the user's Azure AD object ID as a member. Once the chat exists, POST messages to /v1.0/chats/{chatId}/messages. This requires the Chat.ReadWrite Application permission in addition to or instead of ChannelMessage.Send.
How do I find the Teams team ID and channel ID for Graph API requests?
In Teams, click the three-dot menu next to a channel and select 'Get link to channel'. The URL contains encoded team and channel IDs. Decode the URL to extract the IDs, or use the Graph API itself: call GET /v1.0/teams (with appropriate permissions) to list teams and their IDs, then call GET /v1.0/teams/{teamId}/channels to list channels within a team.
Can Retool Workflows receive replies from Teams Adaptive Card buttons?
Yes, with the Graph API approach. Include an Action.Http action type in your Adaptive Card that POSTs to a Retool Workflow's webhook URL when the button is clicked. The Workflow receives the payload, processes the response (Approve/Reject), and updates your database accordingly. This creates a complete approval loop: Retool → Teams card → button click → Retool Workflow → database update.
Talk to an Expert
Our team has built 600+ apps. Get personalized help with your project.
Book a free consultation