Microsoft Teams: Using workflows with Power Automate
Microsoft announced the deprecation of connectors. See the Deprecation note Retirement of Office 365 connectors within Microsoft Teams
LAST TESTED ON CHECKMK 2.4.0P22
To configure Webhook notifications within Checkmk, please see our official documentation on Notifications via Microsoft Teams.
We have adjusted the notification plugin for Microsoft Teams to use workflow as part of Werk 17155.
Overview
This guide walks through how to configure Microsoft Teams notifications in Checkmk using Power Automate workflows, which replace the deprecated Office 365 connectors. It shows how to create a Teams workflow with a webhook, connect it to Checkmk, and validate that notifications are successfully delivered to a Teams channel.
Power Automate
If you are using Power Automate, then configure it flow like this:
And this is the page where the flow is succeeded, and the messages gets dropped in:
Here is the screenshot from Teams Channel:
If the flow doesn't work, you may get some errors like these:
Working JSON (in case somebody wants to POST to the webhook directly):
[
{
"contentType": "application/vnd.microsoft.card.adaptive",
"contentUrl": "null",
"content": {
"$schema": "http://adaptivecards.io/schemas/adaptive-card.json",
"type": "AdaptiveCard",
"version": "1.3",
"body": [
{
"type": "TextBlock",
"text": "Checkmk: google/PING CRIT",
"weight": "bolder",
"size": "large",
"style": "heading",
"wrap": true
},
{
"type": "TextBlock",
"text": "Problem notification",
"weight": "bolder",
"wrap": true
},
{
"type": "TextBlock",
"text": "Checkmk: google/PING ",
"wrap": true
},
{
"type": "ColumnSet",
"separator": true,
"columns": [
{
"type": "Column",
"width": "auto",
"items": [
{
"type": "TextBlock",
"text": "Details",
"wrap": true,
"weight": "bolder"
}
]
},
{
"type": "Column",
"width": "stretch",
"items": [
{
"type": "TextBlock",
"text": "__Host__: google",
"wrap": true,
"spacing": "none"
},
{
"type": "TextBlock",
"text": "__Service__: PING",
"wrap": true,
"spacing": "none"
},
{
"type": "TextBlock",
"text": "__Event__: ",
"wrap": true,
"spacing": "none"
},
{
"type": "TextBlock",
"text": "__Output__: Test for MS teams",
"wrap": true,
"spacing": "none"
},
{
"type": "TextBlock",
"text": "__Perfdata__: ",
"wrap": true,
"spacing": "none"
}
]
}
]
},
{
"type": "FactSet",
"facts": [
{
"title": "Affected host groups",
"value": "check_mk"
}
],
"separator": true
}
],
"actions": [
{
"type": "Action.OpenUrl",
"title": "View service details in Checkmk",
"url": "http://klapp-0323/v23p13/check_mk/index.py?start_url=view.py?view_name%3Dservice%26host%3Dgoogle%26service%3DPING%26site%3Dv23p13",
"role": "Button"
}
],
"msteams": {
"width": "Full"
}
}
}
]