Slack Integration as Webhook

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

  1. 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. 

  2. Click Create New App then select "From an app manifest". 

image.png
  1. Go through the steps and change the app name to the desired value. Press Next then Create.

image.png
  1. On the app home page, navigate to "Incoming Webhooks" using the menu on the left under "Features".

  2. Press "Add New Webhook to Workspace" and add the app to the workspace you wish to publish SnapComms messages.

  3. Copy the webhook URL that is generated.
     

SNAPCOMMS SETUP

  1. Inside the Content Manager, navigate to Management > Integrations > Webhooks. 

  2. Under "Generic Webhook", assign a name and paste the URL from the Slack webhook into the URL text input.

  3. Select JSON as Payload Type and toggle on the Customise JSON Payload.

  4. 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:
image.png

  1. Once you've entered all the required fields, click Save. 

image.png
 

Was this article helpful?
0 out of 0 found this helpful

Comments

0 comments

Article is closed for comments.