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. 

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 Trigger section, add the following details: 
    • Name: Enter a descriptive name for the trigger (e.g. Slack 60 day 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 60, you will receive notice 60 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, IT Glue will check whether there are any assets that are within 5 days or less of their expiration.
    • Admin email: This email address will be alerted if notices fail.

      Example:

      Slack_Define_Trigger.png

  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 

In this section, 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. You don't have to know anything beyond that to begin experimenting.

  1. In the Action section, enter the following details:
    • Name: Enter a descriptive name for the action (e.g. Notify about domain expirations 60 days in advance).
    • Dispatch: Choose Slack webhook.
    • Webhook URL: Enter the Webhook URL copied from Slack.
    • JSON Payload: Enter a key/value pair. The value you associate with the text key is the message that will be posted to your Slack channel.

      Example:

      Slack_Define_Action.png

      This key/value pair includes variables that will pull values from the asset that’s triggering the notification. The available variables are listed at the bottom of the screen where you input this information. Having trouble formatting the message? Try reading the Slack documentation. Note: Line breaks not currently supported.

  2. Click Save Action
  3. Click the Send test button to test the action. If the notification goes through, the connection has been established.

If the notification is active, your team will start to receive notifications to Slack within the next 24 hours. Note that notifications based on document or password triggers will be sent in real time.

                     

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