Docs/Services

Microsoft Teams (Workflows)

Send notifications to Teams channels via the Workflows app (powered by Power Automate). This is the successor to theOffice 365 incoming connectors that Microsoft isretiring.

URL format

A Workflows webhook URL carries a cryptographic sig token that must be preserved exactly, so notifly stores the whole HTTPS URL by swapping its scheme from https to workflows:

scheme
workflows://<host>/<path>/triggers/manual/paths/invoke?...&sig=...

The easiest way to produce this issmart paste — paste the raw HTTPS URL you copied from Teams and it converts automatically. You can also do it interactively in the URL Builder. Registered under both workflows:// and theworkflow:// alias.

Example

typescript
import { notify } from '@ambersecurityinc/notifly';

await notify(
  {
    urls: [
      'workflows://default.b0.environment.api.powerplatform.com/powerautomate/automations/direct/workflows/WORKFLOW_ID/triggers/manual/paths/invoke?api-version=1&sp=%2Ftriggers%2Fmanual%2Frun&sv=1.0&sig=SIGNATURE',
    ],
  },
  { title: 'Release', body: 'v3.0 deployed successfully', type: 'success' }
);

Creating the webhook

  1. Open the Teams channel you want to post to.
  2. Click (More options) next to the channel name and select Workflows.
  3. Choose the "Post to a channel when a webhook request is received"template (also shown as "Send webhook alerts to a channel").
  4. Configure the target team and channel, then Save.
  5. Copy the generated webhook URL — it looks like:
    workflows webhook url
    https://<env>.environment.api.powerplatform.com/powerautomate/automations/direct/workflows/<id>/triggers/manual/paths/invoke?api-version=1&sp=...&sv=1.0&sig=...

Older flows issue Logic Apps style URLs (https://<host>.logic.azure.com:443/workflows/.../triggers/manual/paths/invoke?...) — both are supported.

Payload format

Teams Workflows templates disagree on what the request body must look like, depending on how the flow's "Post card in a chat or channel"action binds its input. notifly supports all three, selected with a#format= fragment on the URL. The fragment stays out of the signed query string and is never sent over the wire.

#format=Body sentUse when
(default) / cardbare Adaptive Card { "type": "AdaptiveCard", … }the flow binds the whole trigger body into "Post card" (the flowbot requires top-level type: "AdaptiveCard")
message{ "type": "message", "attachments": [ … ] }the flow reads triggerBody()?['attachments']
text{ "text": "**title**\n\nbody" }the basic "Send webhook alerts to a channel" template
format options
workflows://…/triggers/manual/paths/invoke?…&sig=…            # Adaptive Card (default)
workflows://…/triggers/manual/paths/invoke?…&sig=…#format=message
workflows://…/triggers/manual/paths/invoke?…&sig=…#format=text

The message title becomes a bold heading; messagetype colours it (success → Good,warning → Warning, failure → Attention). If you hitAdaptiveSerializationException: Property 'type' must be 'AdaptiveCard', your flow needs the default card format (which notifly ships).

Workflows vs. the legacy connector

  • New Teams webhooks should use workflows://. The legacymsteams:// connector still works where it is already configured, but Microsoft is blocking creation of new connectors.
  • Button rendering is not supported for message cards posted through Workflows.
← PreviousMicrosoft TeamsNext →ntfy