The Microsoft Teams integration allows you to send Catchpoint alerts as messages to specific Teams channels. Adaptive Cards are the preferred method for sending data to Teams channels via Incoming Webhooks. Here's a guide to set up and send an Adaptive Card via a webhook.
Teams Setup
-
Open Teams and go to the channel where you want to send the Adaptive Card.
-
Click on the three dots (...) at the upper right for and select Workflows.
-
Find and select the template labeled "Post to a channel when a webhook request is received", then configure the Workflow.
- Change the Flow Name if desired
- Change the Account if needed
- Confirm the workflow is targeting the correct Team and Channel
- Click Add Workflow


-
When finished, Teams will display a Webhook URL which you will use to post data from Catchpoint. Copy this Webhook URL and then click Done

Catchpoint Setup
- Log into the Catchpoint portal and click on Integrations in the left menu
- Ensure that Webhook is selected and click Add URL > Alert Webhook
- Input a Name for this Webhook
- In the URL field, paste the Webhook URL you copied in the previous section
- In the Format section, select Template
- In the dropdown menu, select New Template
- Input a Name for this template and ensure the Format is set to JSON
- Paste the JSON Template included in this article into the Template field, and make any desired modifications to the JSON.
- Click Add
- In the On Failure Alert field, input the name of the contact that should be alerted if this webhook fails to connect.
- Click Save
JSON Template
{
"type": "message",
"attachments": [
{
"contentType": "application/vnd.microsoft.card.adaptive",
"contentUrl": null,
"content": {
"$schema": http://adaptivecards.io/schemas/adaptive-card.json,
"type": "AdaptiveCard",
"version": "1.2",
"body": [
{
"type": "TextBlock",
"text": "[Catchpoint Alert: Synthetic Test](${TestLink})\n[${TestId}] ${TestName}",
"wrap": true,
"color": "${switch(${notificationLevelId}, '0', 'warning', '1', 'attention', '3', 'good')}",
"style": "heading"
},
{
"type": "TextBlock",
"text": "${switch(${notificationLevelId},'0','warning','1','critical','3','improved')}",
"wrap": true,
"color": "default"
},
{
"type": "TextBlock",
"text": "Alert Type: ${AlertType}",
"wrap": true
},
{
"type": "TextBlock",
"text": "Test Node: ${NodeDetails('${NodeName}')} (${NodeDetails('${NodeClientAddress}')})",
"wrap": true
},
{
"type": "TextBlock",
"text": "Alert Timestamp: ${ReportDateUtc}",
"wrap": true
},
{
"type": "TextBlock",
"text": "Test URL: [${TestUrl}](${TestUrl})",
"wrap": true
},
{
"type": "TextBlock",
"text": "_Error Key_: ${NodeDetails('${NodeErrorKey}')}",
"wrap": true
},
{
"type": "TextBlock",
"text": "_Error Value_: ${NodeDetails('${NodeErrorValue}')}",
"wrap": true
},
{
"type": "TextBlock",
"text": "_Waterfall Charts_: [${WaterfallChartUrl}](${WaterfallChartUrl})",
"wrap": true
}
]
}
}
]
}
Explanation for some of the Card Components
- Title: The card has a bold title indicating the type of alert.
- Description: A message explaining what the alert is about.
- FactSet: A structured way to show key-value pairs such as alert type, test node, timestamp, and URL.
- Error Key/Value: Additional context such as error details and waterfall charts.
- Action Button: A button labeled "View Test" to allow the user to navigate directly to the test URL.
Important Considerations
• Webhook URL: Always ensure your webhook URL is correct and from the correct Teams channel.
• Adaptive Card Version: Ensure that you are using the correct Adaptive Card schema version (in this case, version 1.2).
• Testing: Test your Adaptive Card in a sandbox or test channel to ensure it renders correctly in Teams.
Alert Macro Usage
The above JSON can be modified to include more information using macros: https://docs.catchpoint.com/docs/alert-webhook-macro-index