Sending data to a Slack channel
Last updated
Last updated
This documentation references external sources.
Nexthink does not control the accuracy of third-party documentation or external updates that can result in inconsistencies.
Report any errors or inconsistencies to Nexthink Support.
This document demonstrates how to send data to a Slack channel, using Nexthink webhook capability, to stand out from other messages in the channel.
Create a new Slack app in the workspace where you want to post messages.
From the Features page, toggle Activate Incoming Webhooks on.
Click Add New Webhook to Workspace.
Pick a channel that the app will post to, then click Authorize.
Copy the generated Incoming Webhook URL for future reference. That is, for the connector credential and webhook configuration in the Nexthink web interface.
Webhook URL example: https://hooks.slack.com/services/T00000000/BXXXXXXXXXX/PLVXXXXXXXXXXXXXXXXXXXXX
From the Nexthink web interface:
From the connector credential configuration page, fill out the fields using the information from the connection you created in Slack.
Choose the HTTPS option from the Protocol drop-down.
Paste the root https://hooks.slack.com/
into the URL address field from Webhook URL from Slack configuration.
Choose Basic option from the Authorization drop-down.
Type in Test
in the fields Username and Password, as these fields are not required when configuring Incoming Webhooks for Slack.
Save the credential.
From the webhook configuration page, fill out the fields using the information from the connection you created in Slack and the connector credential defined in Nexthink:
Fill in the NQL Condition following the Configuring webhook NQL conditions documentation.
After filling in the NQL Condition, the system lists the allowed placeholders for the Payload.
Choose the configured connector credential for Slack from the Credentials drop-down.
Select the POST from the Method drop-down.
Paste into the Resources field, the URL endpoint from the Slack configuration without the root URL address. For example:
services/T00000000/BXXXXXXXXXX/PLVXXXXXXXXXXXXXXXXXXXXX
Add the message you want to send in Payload. See the example below. alert.alerts
Send Test to make sure the message is pushed into Slack.
Refer to the Slack API documentation for more information about supported payloads.