Note: This article is intended to be an alternate companion piece to the video on the same subject located here.
In July of this year, Microsoft announced that they would be retiring support for Office 365 connectors within MS Teams before the end of the year; this will render all external connectors, including incoming webhooks, basically useless.
In their place, Microsoft expects its customers to use what they call ‘Workflows’, which is nothing more than instances of Microsoft’s Power Automate running behind the scenes.
This article will cover how to properly configure MS Teams for alert notifications using ThousandEyes.
Step 0: Pre-requisites
- A ThousandEyes account with an admin role in order to create an integration.
- A Microsoft 365 account with a PowerAutomate license and access to an MS Teams tenant.
Step 1: MS Teams Configuration
- Log in to the MS Teams app.
- Navigate to the Teams section
- Create or navigate to your target Team’s channel.
- Click on the ‘...’ button in the upper-right corner and select ‘Workflows’.
- Select ‘Post to a channel when a webhook request is received’.

6. Wait for the context window to load, change the workflow name (if desired) and click ‘Next’.

7. Wait a few seconds for the context window to load again, confirm you have selected the correct Team and target channel, click ‘Add workflow.

8. Wait another few seconds for the confirmation message and copy the generated URL for use in the next step.

Step 2: URL Encoding
- Paste the recently generated URL into a notepad.
- Review the URL and replace the ‘%2F’ values in the URL’s ‘sp’ parameters with ‘/’. Example: ‘%2Ftriggers%2Fmanual%2Frun’ becomes ‘/triggers/manual/run’ (bold emphasis added for visual clarity).

Step 3: ThousandEyes Configuration
- Log in to the ThousandEyes platform.
- Navigate to the Integrations section.
- Select the ‘+ New integration’ and then ‘Custom Webhook’.


4. Give your new integration a name. Pro-tip: Keep the name simple!
5. Fill the URL field with the modified URL from Step 2.
6. Select ‘Microsoft Teams’ in the ‘Preset Configurations’ drop-down menu.

7. Override the ‘body’ field with the following:
{
"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",
"description":"",
"body":[
{
"type": "Container",
"items": [
{
"type": "TextBlock",
"text": "ThousandEyes Alert Notification",
"weight": "bolder",
"size": "large"
}
]
},
{
"type": "ColumnSet",
"columns": [
{
"type": "Column",
"width": "auto",
"items": [
{
"type": "Image",
"url": "https://app.thousandeyes.com/static/images/logo_128x128.png",
"size": "medium"
}
]
}
]
},
{
"type": "TextBlock",
"text": "Alert{{#eq type.id 2}} Triggered{{else}} Cleared{{/eq}}{{#if alert.test}} for {{alert.test.name}}{{/if}}",
"weight": "normal",
"size": "large"
},
{
"type": "FactSet",
"facts": [{
"title": "Alert ID",
"value": "{{alert.id}}"
}, {{#if alert.test}} {
"title": "Test Name",
"value": "{{alert.test.name}}"
}, {{/if}} {{#if alert.test}} {
"title": "Domain",
"value": "{{#each alert.targets}}{{description}}{{#unless @last}}, {{/unless}}{{/each}}"
}, {{/if}} {
"title": "Alert Rule",
"value": "{{alert.rule.name}} - {{formatExpression alert.rule.expression}}"
}, {{#if alert.details}} {
"title": "Details",
"value": "{{alert.details.size}}"
}, {{/if}} {
"title": "Severity",
"value": "{{alert.severity.display}}"
}
],
"separator": true
}
],
"actions": [
{
"type": "Action.OpenUrl",
"title": "View Active Alerts",
"url": "https://app.thousandeyes.com/alerts/list/active"
}
]
}
}
]
}
8. Click on 'Test', to confirm you are getting an ‘Accepted 202’ response.

9. Return to MS Teams and verify you see a card with the bogus alert information being created by the workflow.

And that’s it! If you’d like to see the video walkthrough of these same steps, you can review that here.