Microsoft Teams Webhooks
Create an Incoming Webhook in Microsoft Teams, register it as a relay target, and validate delivery.
Use this guide to route endpoint traffic into a Microsoft Teams channel.
Purpose
This workflow helps you:
- Create a Teams incoming webhook URL.
- Register Microsoft Teams as a relay target.
- Attach the target to an endpoint output.
- Validate with a test delivery.
Prerequisites and permissions
- Microsoft Teams workspace with permission to manage channel connectors or access to Power Automate.
- Access to
Relay targetsandEndpointsin PayloadRelay.
Payload format
PayloadRelay wraps the incoming webhook payload in a MessageCard envelope (the legacy Office 365 Connector schema, which is compatible with all Teams environments):
{
"@type": "MessageCard",
"@context": "https://schema.org/extensions",
"themeColor": "0078D4",
"summary": "PayloadRelay webhook event",
"title": "PayloadRelay webhook event",
"text": "<pre>{ ...original payload... }</pre>"
}Payloads are truncated to 25 KB to stay within Teams message limits.
Step-by-step workflow
1. Create a webhook URL in Teams
Option A — Incoming Webhook connector (classic)
- In the target Teams channel, open the channel menu and select Connectors.
- Search for Incoming Webhook and click Configure.
- Give the connector a name (e.g., "PayloadRelay"), optionally upload an icon, then click Create.
- Copy the generated webhook URL (
https://<tenant>.webhook.office.com/webhookb2/...). - Click Done.
Option B — Power Automate flow
- In Teams, select Workflows from the Apps section (or go to Power Automate directly).
- Create a new flow triggered by When a Teams webhook request is received.
- Copy the HTTP POST URL from the trigger step.
2. Add a Microsoft Teams relay target
- Open Relay targets in PayloadRelay.
- Select Add target.
- Choose Microsoft Teams as the type.
- Paste the webhook URL into the Target value field.
- Accepted hosts:
*.webhook.office.comand*.logic.azure.com(Power Automate).
- Accepted hosts:
- Optionally add a name and description, then save.
No email confirmation is required — the target is ready immediately.
3. Attach the target to an endpoint
- Open the endpoint create/edit page.
- In Target destinations, select your Microsoft Teams target.
- Save the endpoint.
4. Validate delivery
- On the Relay targets page, find your Teams target and click Test.
- A test MessageCard will be sent to the channel.
- Confirm the message appears in Teams.
Retry behavior
Failed deliveries are retried automatically with exponential backoff. Microsoft Teams may rate-limit sustained bursts; if that happens, reduce delivery frequency or let retries recover temporary failures.
Troubleshooting
| Symptom | Likely cause | Fix |
|---|---|---|
| 400 Bad Request | Malformed MessageCard JSON | Contact support — this may be a payload size issue. |
| 404 Not Found | Webhook URL was deleted in Teams | Recreate the connector and update the target URL. |
| 429 Too Many Requests | Teams rate limit | Retries are automatic; reduce delivery frequency if the problem persists. |
| Message not appearing | Bot was removed from the channel | Re-add the Incoming Webhook connector to the channel. |