Configuration of MS Teams with cnMaestro Webhooks

Microsoft Teams is a unified communication and collaboration platform that combines persistent workplace chat, video meetings, file storage, and application integration.

To send a message through your Office 365 Connector or incoming webhook, you post a JSON payload to the webhook URL.

Following is a simple example of configuring MS Teams integration with cnMaestro Webhooks using a custom Template.

1. In Microsoft Teams, choose More options () next to the channel name and then choose Connectors.1.jpg

2. Scroll/search through the list of Connectors to Incoming Webhook, and choose Add.2.jpg

3. Enter the Webhooks name field, upload image (if needed), and choose Create.3.JPG

4.JPG 

4. Copy the Webhook URL, this needs to be used as URL in cnMaestro Webhook in the next steps. and click on Done.

5.jpg

5. Login to cnMaestro and Navigate to Application >Settings >Webhooks.

6. Click Add Webhook. Paste the URL from Teams and Expand Advanced Configuration.

6.JPG

Teams expect a custom JSON payload, The simple one is as follows

{

“text” : "<message>"

}

For this example, we are using the following custom template with variables $DEVICE_IP and $ALARM_SEVERITY in the formatted message.

{

"text" : "$DEVICE_IP has generated an alarm of severity

$ALARM_SEVERITY”

}

7. Once an alarm occurs, the following message will appear in the configured Teams channel. Notice the variables have been replaced with actual values.last.jpg

Learn more about Teams Webhook and more at https://docs.microsoft.com/en-us/microsoftteams/platform/webhooks-and-connectors/how-to/add-incoming-webhook.

7 Likes