Guide · Get notified
Send alerts to Microsoft Teams
Get Mortemain's down, late and recovery alerts as a tidy card in a Teams channel. Microsoft retired the old "Incoming Webhook" connector, so the current path is a one-time Power Automate Workflow that catches Mortemain's alert and posts it. Five minutes, once.
1. Create the Workflow in Teams
You don't need to open Power Automate by hand. Teams ships the template for you:
- In Teams, hover the channel you want alerts in, click the … (More options) next to its name, and choose Workflows.
- Search webhook and pick "Post to a channel when a webhook request is received".
- Confirm the connection, check the Team and Channel are the ones you want, and click Add workflow.
That builds a flow whose incoming shape already matches what Mortemain sends (a message wrapping an Adaptive Card), so there is nothing to configure inside it.
2. Copy the webhook URL (the part everyone gets wrong)
The workflow finishes with an HTTPS URL. Two things matter here, and getting them backwards is the usual cause of a 401 Unauthorized when you test:
- If you built the flow manually, make sure the trigger's "Who can trigger the flow?" is set to Anyone. Mortemain posts with no login, so anything stricter is rejected.
- That setting changes the URL's signature. So save the flow first, then copy the URL. A URL copied before you set "Anyone" will 401 no matter what.
https://….environment.api.powerplatform.com/powerautomate/…?…&sig=…
It's long and ends in a big &sig=…. Copy the whole thing with the copy icon, not by selecting the truncated text in the box.
3. Add the target in Mortemain
In your Mortemain dashboard, add a notification target:
- Type → Microsoft Teams
- Name → anything you'll recognise, e.g. Ops channel
- URL → paste the URL from step 2
Save, then wire it to the checks you care about.
Test it
Hit Test on the target. A card should land in your Teams channel within a second or two, with a coloured accent: red for down, blue for recovery, amber for late. If you get a 401, it's step 2, re-copy the URL after saving with "Anyone" set.
Building it by hand?
If you'd rather assemble the flow yourself instead of the template: trigger is "When a Teams webhook request is received", action is "Post card in a chat or channel", and set that action's Adaptive Card field via the fx expression editor to:
first(triggerBody()?['attachments'])?['content']
That pulls the card out of Mortemain's payload. Ignore "Trigger conditions", it's an optional filter you don't need.