Setting up Slack webhook notifications

For partners subscribed to Select or Enterprise plans.

The new notifications feature includes a customized webhook for Slack so that you can connect any IT Glue notification to any Slack channel. 

Important

  • Make sure you read Setting up notifications for an introduction to IT Glue notifications. 
  • In this article, we will refer to the JSON API, which is basically a universal connector for data on the internet. JSON API is a specification for how a client should request that resources be fetched or modified, and how a server should respond to those requests.

Prerequisites 

  • You must have Manager or Administrator access to configure notifications. 

Instructions 

Configuring Slack

  1. In Slack, click on Add an app or custom integration in the channel you want to create the notification in.



  2. In the window that opens, click on Build (in the top-right corner). This takes you to api.slack.com.

    Slack_API.png

  3. Select the Incoming WebHooks option from the navigation bar, and then click the incoming webhook integration link. 

    API_Incoming_webhooks.png

  4. Select the Slack channel you wish to connect to and then click the Add Incoming WebHooks integration button.



  5. On the next screen, copy the WebHook URL. You should keep this window open to refer to the instructions on how to construct the JSON payload.

  6. (Optional) If you scroll down the page, Slack will let you upload an image that is used for messages from that specific integration. We've attached a couple of icons that you can use. After you upload an image, click Save Settings to apply the change.

Defining the trigger

  1. Open IT Glue and navigate to Account > Notifications.
  2. Click on + New to open the Create Notification screen.



  3. In the Edit Trigger section (step 1), add the following details: 
    • Name: Enter a descriptive name for the trigger (e.g. domain expiration alert).
    • Trigger: Select the trigger you want to use. 
    • Lead time: This field only applies to expiration triggers. Enter the number of days in advance you want to receive notice. For example, if you enter 3, you will receive notice 3 days in advance of the expiration date.
    • Already expired: Check this box if you don't want any lead time (you want to receive notice on the expiration date).
    • Enroll assets that already meet this criteria: Check this box if you want to also receive notices on anything that has gone past the lead time. So, if your lead time is 5 days, and you enable this option, you will include any assets that are within 5 days or less of their expiration.
    • Admin email: This email address will be alerted if notices fail.
  4. Check the Active box.
    • You can leave this box unchecked to make changes without sending incomplete notifications (and also to disable notifications without deleting them).
  5. Click Save Trigger.

Defining the action 

  1. In the Edit Actions section (step 2), enter the following details:
    • Name: Enter a descriptive name for the action (e.g. Slack notification).
    • Dispatch: Choose Slack webhook.
    • Webhook URL: Enter the Webhook URL copied from Slack.
    • JSON Payload: Edit the key and value pair if required. Defaults are provided that will post a simple message to your Slack channel.

      Screen_Shot_2017-09-20_at_4.44.57_PM.png

      • If you want to make any changes, note that your JSON payload must contain the word text as one of the keys, at minimum. The value you associate with this key is the text that will be posted to your Slack channel. 
      • Note that enclosing the document URL token [resource_url] with <> will allow the link to become clickable.
      • For help changing the payload, make sure you read the Slack documentation on the page you copied the Webhook URL from.  
  2. Click the Send test button to test the action.
  3. Click Save Action

If the notification is active, your team will start to receive notifications to Slack. If the members of the Slack channel don't have access to all organizations, they may not be able to open all notification links.

If we can't reach your webhook URL, we'll try again in a little while. If we can't reach it several times, we'll send an email to the admin email you entered.

                     

Note: You can download either of the following icons to upload to Slack as described further above. This will help your team visually verify where the messages originated:

gluebot-slack-512x512.pngitglue-slack-512x512.png

Was this article helpful?
2 out of 3 found this helpful