← Back to documentation

Microsoft Teams Webhooks

Create an Incoming Webhook in Microsoft Teams, register it as a relay target, and validate delivery.

6 min read

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 targets and Endpoints in 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):

Code Example
{
  "@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)

  1. In the target Teams channel, open the channel menu and select Connectors.
  2. Search for Incoming Webhook and click Configure.
  3. Give the connector a name (e.g., "PayloadRelay"), optionally upload an icon, then click Create.
  4. Copy the generated webhook URL (https://<tenant>.webhook.office.com/webhookb2/...).
  5. Click Done.

Option B — Power Automate flow

  1. In Teams, select Workflows from the Apps section (or go to Power Automate directly).
  2. Create a new flow triggered by When a Teams webhook request is received.
  3. Copy the HTTP POST URL from the trigger step.

2. Add a Microsoft Teams relay target

  1. Open Relay targets in PayloadRelay.
  2. Select Add target.
  3. Choose Microsoft Teams as the type.
  4. Paste the webhook URL into the Target value field.
    • Accepted hosts: *.webhook.office.com and *.logic.azure.com (Power Automate).
  5. 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

  1. Open the endpoint create/edit page.
  2. In Target destinations, select your Microsoft Teams target.
  3. Save the endpoint.

4. Validate delivery

  1. On the Relay targets page, find your Teams target and click Test.
  2. A test MessageCard will be sent to the channel.
  3. 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

SymptomLikely causeFix
400 Bad RequestMalformed MessageCard JSONContact support — this may be a payload size issue.
404 Not FoundWebhook URL was deleted in TeamsRecreate the connector and update the target URL.
429 Too Many RequestsTeams rate limitRetries are automatic; reduce delivery frequency if the problem persists.
Message not appearingBot was removed from the channelRe-add the Incoming Webhook connector to the channel.