$crond.io
integrations / microsoft teams

Microsoft Teams Alerts for Cron Jobs

Route cron failure alerts into any Microsoft Teams channel via an incoming webhook connector. Five-minute setup, no admin app deployment required (channel-level workflow works).

1. Create the Teams workflow / connector

Microsoft deprecated the "Incoming Webhook" connector in 2024. The current path uses Workflows (formerly Power Automate templates):

  1. In Teams, click the + next to your channel tabs → Workflows.
  2. Search for and select "Post to a channel when a webhook request is received".
  3. Sign in (uses your existing Microsoft 365 account; no admin approval needed for channel-level workflows in most tenants).
  4. Pick the team and channel for alerts. Click Add workflow.
  5. Copy the resulting HTTP POST URL — looks like https://prod-XX.westus.logic.azure.com:443/workflows/.../triggers/manual/paths/invoke?...

If your tenant still has the legacy Incoming Webhook connector enabled, you can use it instead — same URL format works, but Microsoft will eventually disable it. Migrating now saves the rework later.

2. Wire it up in crond.io

curl -X POST https://api.crond.io/api/v1/monitors/$MONITOR_ID/alerts \
-H "Authorization: Bearer $CROND_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"channel": "webhook",
"url": "https://prod-XX.westus.logic.azure.com/...",
"payload_template": "teams"
}'

The teams payload template formats alerts as an Adaptive Card (the modern format Teams expects from Workflows). Includes color-coded title, monitor name, status, last successful ping timestamp, and a link button.

@mentioning a team or user

Adaptive Cards posted via Workflows can include <at>mentions, but they require the user's Azure AD object ID, not display name. Add to the alert config:

"mention_aad_id": "00000000-0000-0000-0000-000000000000",
"mention_name": "OnCall Engineer"

Get the AAD object ID from Microsoft Entra ID → Users → <user> → Object ID. For team-wide mentions, use the team's group ID instead.

Troubleshooting

  • 200 from webhook but no message in Teams: the workflow accepted the request but Adaptive Card schema rejected it. Check Workflow → Run history for the underlying error.
  • 403 / Authentication failed: the workflow owner left the tenant. Have a current member re-create the workflow and update the URL in crond.io.
  • Card looks plain (no colors): the channel may be on the Teams classic client, which renders Adaptive Cards less richly. New Teams client renders correctly.