Uptime alerts in Microsoft Teams
Post down and recovery alerts to a Teams channel through a Workflows webhook, the way Microsoft now recommends instead of Office 365 connectors.
Set it up
- In Teams, open the channel's menu, choose Workflows and pick a template that posts to a channel when a webhook request is received.
- Choose the team and channel, finish the workflow and copy the URL it gives you. The trigger must allow Anyone to call it.
- In OpenUptime, open Alerting, choose Add channel and pick Microsoft Teams.
- Name the channel and paste the workflow URL.
- Save, then press Test: a test message arrives within seconds, and the delivery log below the channels shows whether it went through.
What arrives
🔴 Checkout API is down — Expected 200, got 503
✅ Checkout API has recovered
Good to know about Microsoft Teams
- Alerts arrive as an Adaptive Card. Monitor names and addresses are escaped, so they cannot add formatting or links.
- A workflow whose trigger requires a signed-in user answers 401 or 403; the delivery log says so when that happens.
- Teams rejects messages over 4,000 characters, so longer alerts are shortened.
On every channel
- Every channel is available on every plan, Free included.
- Choose per monitor which channels it alerts, or turn a channel on for every new monitor.
- Until someone acknowledges an incident, it can repeat on the mobile app (up to 10 times, by email too if you choose) and escalate to other channels in up to 3 levels.
- A failed delivery is retried, and the delivery log shows what was sent to which channel and why anything failed.
Get Microsoft Teams alerts
Add a monitor, connect the channel and press Test. The Free plan includes every alert channel.
Questions
Do Office 365 connector webhooks still work?
Microsoft is retiring them. Use a Workflows webhook, which is what this channel is built for.
Why does the test fail with 401 or 403?
The workflow's trigger only accepts requests from signed-in users. Edit the workflow and set who can trigger it to Anyone.
Microsoft Teams 宕机告警
通过 Workflows Webhook 把宕机和恢复告警发到 Teams 频道,这是微软目前推荐的方式,用来替代 Office 365 连接器。
配置步骤
- 在 Teams 中打开频道菜单,选择“工作流”,挑一个“收到 Webhook 请求时发布到频道”的模板。
- 选择团队和频道,完成工作流并复制生成的地址。触发器必须设置为允许“任何人”调用。
- 在 OpenUptime 中打开“告警”,点击“添加渠道”,选择 Microsoft Teams。
- 给渠道起个名字,粘贴工作流地址。
- 保存后点击“测试”:几秒内就会收到一条测试消息,渠道列表下方的投递记录会显示是否发送成功。
收到的内容
🔴 Checkout API is down — Expected 200, got 503
✅ Checkout API has recovered
关于 Microsoft Teams 的说明
- 告警以 Adaptive Card 形式送达。监控名称和地址都经过转义,不会被当成格式或链接。
- 如果工作流触发器要求登录用户,会返回 401 或 403,投递记录里会明确提示。
- Teams 会拒收超过 4000 字符的消息,所以更长的告警会被截短。
所有渠道通用
- 所有渠道在所有套餐中都可用,包括免费版。
- 可以为每个监控选择要通知的渠道,也可以让某个渠道默认对所有新监控开启。
- 在有人确认事件之前,告警可以在手机 App 上重复提醒(最多 10 次,也可以选择同时发邮件),并最多分 3 级升级到其他渠道。
- 投递失败会自动重试,投递记录会显示发到了哪个渠道、失败的原因是什么。
常见问题
Office 365 连接器的 Webhook 还能用吗?
微软正在停用它们。请改用 Workflows Webhook,这个渠道就是为它设计的。
为什么测试时返回 401 或 403?
工作流的触发器只接受已登录用户的请求。编辑工作流,把“谁可以触发”改为“任何人”。