The Snapcomms - Slack as a webhook integration allows you to send a message to a Slack channel when publishing an alert from the Content Manager. The following sections of this article detail the setup in both Slack and SnapComms to complete the integration.
SLACK SETUP
-
Navigate to https://api.slack.com/apps and log into your organization - this is where you will create your own Slack Application to connect to SnapComms.
-
Click Create New App then select "From an app manifest".
-
Go through the steps and change the app name to the desired value. Press Next then Create.
-
On the app home page, navigate to "Incoming Webhooks" using the menu on the left under "Features".
-
Press "Add New Webhook to Workspace" and add the app to the workspace you wish to publish SnapComms messages.
-
Copy the webhook URL that is generated.
SNAPCOMMS SETUP
-
Inside the Content Manager, navigate to Management > Integrations > Webhooks.
-
Under "Generic Webhook", assign a name and paste the URL from the Slack webhook into the URL text input.
-
Select JSON as Payload Type and toggle on the Customise JSON Payload.
-
Create a JSON payload. Slack has documentation on how to create suitable payloads found here, https://api.slack.com/reference/messaging/payload. SnapComms also provides custom texts to insert into webhook messages such as #message# as shown in the sample below. This will print the text entered under the Message input textbox found when publishing a SnapComms alert to Webhook. Other special texts can be found when you hover over the text input for the custom JSON Payload.
Sample JSON Payload:
{ "text": "#message#", "blocks": [{ "type": "section", "block_id": "section567", "text": { "type": "mrkdwn", "text": "#message#" } }] }
Sample SnapComms Alert Publish to webhook:
-
Once you've entered all the required fields, click Save.
Comments
0 commentsArticle is closed for comments.