Posting a message to an MS Teams channel
This documentation references external sources. Nexthink does not have control over the accuracy of third-party documentation, nor any external updates or changes that might create inconsistencies with the information presented on this page. Please report any errors or inconsistencies to Nexthink Support.
This document demonstrates how to post a message to an MS Teams channel using a webhook.
In MS Teams
Once the new channel has been created, it’s time to create an incoming webhook for it.
Using the three dots on the channel, choose Connectors.
The new page will be displayed with the available connectors to be configured for that channel. Look for Incoming Webhook and click on Configure.
Give a name to the incoming webhook (required) and change the icon to be displayed (optional), then click Create.
At the bottom of the module, a new section is displayed with the following information:
An example of the URL would be: https://nexthink.webhook.office.com/webhookb2/5d4e17ca-3fb8-4799-b1a6- 9e393959c4b3@13387b29-82d9-4ca5-9fa0- b7b5635742ef/IncomingWebhook/5fcc84f00dfb4ad9bbdcd94a86e53864/69227ead- 2e93-461f-91e1-f03494393957
In Nexthink
Configure the Webhook Credential
Click on Connectors and select the Webhook Credentials entry:
Fill in the page fields with the following values:
Instance Name: <name of your credential>
Instance URL: https://nexthink.webhook.office.com/
Authorization*: BASIC
Username*: test
Password*: test
*These fields are not necessary when configuring Incoming Webhooks. For the time being, insert the values as shown above. A “No Auth” option will be provided soon.
Create the Webhook
Fill in the Name and Description.
Fill in the NQL Condition following the Webhooks NQL examples documentation.
Select the Credential name configured in the section above.
Fill the Method, Resource, and Payload following the Method, resource, and payload documentation.
Click on Send Test to make sure the message is pushed into MS Teams.
Confirm the arrival of the message.