Guide · Verified November 17, 2026
Microsoft Teams target guide
Short answer: A Hooks Microsoft Teams destination POSTs a MessageCard to an incoming webhook URL from an Office 365 Connector, Power Automate, or Workflows; the URL is a project secret. Connectors answer 200 with the body 1, and Workflows answer 202.
Teams accepts a small card schema, not arbitrary HTML: a title, a text body with a limited markdown subset, and an accent color. The destination builds that card from the event, keeps the rejection reason Teams returns, and shows the card it sent in the delivery log.
1. Create the incoming webhook
In the target channel, open Workflows and create the “Post to a channel when a webhook request is received” flow, or add the Incoming Webhook connector. Copy the generated URL; it is accepted only when it uses https and points at *.webhook.office.com, *.logic.azure.com, or *.environment.api.powerplatform.com.
2. Store the URL as a project secret
Settings → Security → Project secrets → add TEAMS_WEBHOOK_URL. The config references it as {{secret.TEAMS_WEBHOOK_URL}}; a literal URL is rejected at save time, and a URL on any other host or without https fails with INVALID_TEAMS_WEBHOOK_URL before anything is sent.
Destination config
{
"webhookUrl": "{{secret.TEAMS_WEBHOOK_URL}}",
"title": "New {{event.type}}: {{event.subject.title}}",
"text": "{{event.subject.url}}",
"themeColor": "0076D7"
}3. Write the card templates
`title` defaults to the event subject title and `text` to its URL; both render with the same template engine as every target. Teams renders a small markdown subset in `text` (bold, links, lists) and no HTML. `summary` is required by connectors, so Hooks fills it with the title, falling back to the text. A card whose title and text both render empty fails with EMPTY_TEAMS_MESSAGE. themeColor is six hex digits without the leading #.
Request Hooks sends
POST https://acme.webhook.office.com/webhookb2/<token>
Content-Type: application/json
{
"@type": "MessageCard",
"@context": "https://schema.org/extensions",
"summary": "New issues.opened: Login fails on Safari",
"title": "New issues.opened: Login fails on Safari",
"text": "https://github.com/acme/app/issues/7",
"themeColor": "0076D7"
}4. Read the response and retries
An Office 365 Connector answers 200 with the plain body 1, and a Workflows webhook answers 202; both are successes. Other statuses extract message, errorMessage, or error.message from the JSON body and append it to the HTTP error, so an expired webhook is visible in the attempt. 408, 425, 429, and 5xx retry; 3xx is blocked as REDIRECT_BLOCKED. Send a test event from the endpoint to verify the connector; the delivery log shows the status and any reason Teams returned.
Frequently asked questions
Connector or Workflows webhook?
Both work. The classic Incoming Webhook connector is the quickest, while a Workflows flow lets you post to channels that disable connectors. Hooks accepts either URL and sends the same MessageCard.
Why does my HTML show up as plain text?
Teams renders a small markdown subset and ignores HTML. Use markdown links and bold instead, or send the card through a generic webhook destination if you need a richer Adaptive Card.
What is the summary field for?
Teams connectors require it. Hooks sets summary from the title and falls back to the text, so a card with an empty title still renders.
Why did the delivery fail with INVALID_TEAMS_WEBHOOK_URL?
The URL in the secret was not https or its host did not end with one of the Teams incoming-webhook suffixes. Copy the URL straight from the channel's connector or Workflows flow.
Reference
- Create and use incoming webhookshttps://learn.microsoft.com/microsoftteams/platform/webhooks-and-connectors/how-to/connectors-using
- Sending messages with Workflowshttps://learn.microsoft.com/microsoftteams/platform/webhooks-and-connectors/how-to/connectors-using#sending-messages-using-workflows
- Payload templateshttps://hooks.events/docs/templates.md
- Secrets & rotationhttps://hooks.events/docs/secrets.md