Ask the Community
Groups
Setting up Slack webhook notifications - Connect IT Community | Kaseya
<main> <article class="userContent"> <p><em>For partners subscribed to Select or Enterprise plans.</em></p> <p>Introduction</p> <p>This article will walk you through the steps for configuring IT Glue and Slack to send webhook notifications to a Slack channel when specific events occur. For an introduction to workflows, refer to our <a rel="nofollow" href="https://kaseya.vanillacommunities.com/kb/articles/aliases/itglue/hc/en-us/articles/360004933677">Quick guide for workflows</a>.</p> <p>In this article, we will refer to the JSON API - 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 with this feature.</p> <p>Prerequisites </p> <ul><li>You must have Manager or Administrator access to configure IT Glue workflows.</li> </ul><p>Instructions </p> <h3 data-id="enable-incoming-webhooks">Enable Incoming Webhooks</h3> <ol><li>In your main Slack screen, click on your company name at the top of the left-hand menu.<br><br><p><img src="https://us.v-cdn.net/6032361/uploads/migrated/9DJ0JHCGGQQB/screen-shot-2019-05-22-at-8-29-20-am.png" alt="Screen_Shot_2019-05-22_at_8_29_20_AM.png" class="embedImage-img importedEmbed-img"></img></p> </li> <li>Navigate to <strong>Administration > Manage apps</strong>.<br><br><p><img src="https://us.v-cdn.net/6032361/uploads/migrated/875VT6G8VBD4/screen-shot-2019-05-22-at-8-35-01-am.png" alt="Screen_Shot_2019-05-22_at_8_35_01_AM.png" class="embedImage-img importedEmbed-img"></img></p> </li> <li>In the Apps screen, click on <strong>Build</strong> in the top-right corner and then on the <strong>Start Building</strong> button.<br><br><p><img src="https://us.v-cdn.net/6032361/uploads/migrated/VA9EFTCKSP8T/configure-apps-jade-test-company-inc-slack.png" alt="Configure_Apps___Jade_Test_Company_Inc__Slack.png" class="embedImage-img importedEmbed-img"></img></p> <p><img src="https://us.v-cdn.net/6032361/uploads/migrated/852ODB451SI5/slack-api-slack.png" alt="Slack_API___Slack.png" class="embedImage-img importedEmbed-img"></img></p> </li> <li>In the <strong>Create a Slack App</strong> screen, enter an app name and select your Slack Workspace in the drop-down. Click <strong>Create App</strong>.<br><br><p><img src="https://us.v-cdn.net/6032361/uploads/migrated/U4AKGNQXFW1S/slack-api-applications-slack.png" alt="Slack_API__Applications___Slack.png" class="embedImage-img importedEmbed-img"></img></p> </li> <li>In the <strong>Basic Information</strong> screen, click on <strong>Incoming Webhooks</strong>.<br><br><p><img src="https://us.v-cdn.net/6032361/uploads/migrated/041OFDSXHE56/slack-api-applications-jade-test-company-inc-slack.png" alt="Slack_API__Applications___Jade_Test_Company_Inc__Slack.png" class="embedImage-img importedEmbed-img"></img></p> </li> <li>Click the toggle switch to <strong>On</strong> beside the <strong>Activate Incoming Webhooks</strong> section. Once turned on, a <strong>Webhook URLs for Your Workspace</strong> section will appear. Click on the <strong>Add New Webhook to Workspace</strong> button.<br><br><p><img src="https://us.v-cdn.net/6032361/uploads/migrated/T5TQCY8IJXUV/slack-api-applications-jade-test-company-inc-slack-2.png" alt="Slack_API__Applications___Jade_Test_Company_Inc__Slack-2.png" class="embedImage-img importedEmbed-img"></img></p> </li> </ol><h3 data-id="create-an-incoming-webhook">Create an Incoming Webhook</h3> <ol><li>In the following screen, select a channel that the app will post to and then click the <strong>Authorize</strong> button.<br><br><p><img src="https://us.v-cdn.net/6032361/uploads/migrated/PYISDM72CRCE/jade-test-company-inc-slack.png" alt="Jade_Test_Company_Inc__Slack.png" class="embedImage-img importedEmbed-img"></img></p> </li> <li>You will be sent back to the app settings page. Your new Webhook URL will appear in the <strong>Webhook URLs for Your Workspace</strong> section that will look something like the below example URL. Then, click the <strong>Copy</strong> button. <div> <pre class="code codeBlock" spellcheck="false" tabindex="0"><a href="/home/leaving?allowTrusted=1&target=https%3A%2F%2Fhooks.slack.com%2Fservices%2FT00000000%2FB00000000%2FXXXXXXXXXXXXXXXXXXXXXXXX">https://hooks.slack.com/services/T00000000/B00000000/XXXXXXXXXXXXXXXXXXXXXXXX</a></pre> </div> <br><img src="https://us.v-cdn.net/6032361/uploads/migrated/P2U4K872XAWW/slack-api-applications-jade-test-company-inc-slack-3.png" alt="Slack_API__Applications___Jade_Test_Company_Inc__Slack-3.png" class="embedImage-img importedEmbed-img"></img></li> </ol><p>Keep this window open to refer the instructions on how to construct the JSON payload.</p> <h3 data-id="setting-up-a-workflow">Setting up a workflow</h3> <ol><li>Log in to IT Glue and navigate to <strong>Account > Workflows</strong>. Then, click on <strong>+ New</strong>.<br><br><p><img src="https://us.v-cdn.net/6032361/uploads/migrated/HD4TUWOKZD4U/workflows-it-glue.png" alt="Workflows___IT_Glue.png" class="embedImage-img importedEmbed-img"></img></p> </li> <li>Choose a workflow trigger: <ul><li> <strong>Documents</strong> - Triggers when a document is published or updated</li> <li> <strong>Flag</strong> - Triggers when a flag is added, updated, or removed from a document</li> <li> <strong>Passwords</strong> - Triggers when a password is added or updated</li> <li> <strong>Domain Expirations</strong> - Triggers when the specified lead time is met on a domain's expiration date</li> <li> <strong>SSL Expirations</strong> - Triggers when the specified lead time is met on a SSL expiration date</li> <li> <strong>Configuration Expirations</strong> - Triggers when the specified lead time is met on a configuration's (warranty) expiration date</li> <li> <strong>Flexible Asset Expirations</strong> - Triggers when the specified lead time is met on a flexible asset's expiration date</li> </ul></li> <li>Enter the required information for your chosen trigger: <ul><li> <strong>Trigger Name</strong>: Enter a descriptive name for the notification. The name will be shown in the workflows management page and should be globally unique across workflows to make identification easy. <p><br><img src="https://us.v-cdn.net/6032361/uploads/migrated/W5UQYDVROURH/workflows-trigger-name.png" alt="Workflows_Trigger_Name.png" class="embedImage-img importedEmbed-img"></img></p> </li> <li> <strong>Notification Failure Email</strong>: If there is a bounce back from the notification, an email will be sent to this email address from notifications@itglue.com <p><br><img src="https://us.v-cdn.net/6032361/uploads/migrated/QPW5949TXZLU/workflows-failure-email.png" alt="Workflows_Failure_Email.png" class="embedImage-img importedEmbed-img"></img></p> </li> <li> <strong>Notify At (Lead Time)</strong>: Only applies to expiration-based triggers. Specify the number of days in advance that you want to be notified when an asset is nearing its expiration. <p><br><img src="https://us.v-cdn.net/6032361/uploads/migrated/6BF0Q1LM3RCQ/workflows-it-glue-6.png" alt="Workflows___IT_Glue-6.png" class="embedImage-img importedEmbed-img"></img></p> </li> <li> <strong>Also notify on assets that:</strong><br><ul><li> <strong>Expire sooner than the lead time: </strong>This will schedule a one-time job that will notify you of existing assets that are about to expire. Click the <strong>Estimate How Many</strong> button to estimate how many notifications will be triggered when the first job runs. Depending on how much data you have, this might be a large number. Estimates may increase slightly if the below is checked as well.</li> <li> <strong>Have already expired:</strong> This will schedule a one-time job that will notify you of existing assets that are already expired. After the first job runs, edit the workflow so that it fits your business needs. For example, you may decide not to be notified when configuration items that are past their warranty date are uploaded. <p><br><img src="https://us.v-cdn.net/6032361/uploads/migrated/ZZLIE3UEMVF7/workflows-it-glue-3.png" alt="Workflows___IT_Glue-3.png" class="embedImage-img importedEmbed-img"></img></p> </li> </ul><div> <strong>Note: </strong>This expiration-based trigger is only required in the <strong>Domain Expiration</strong>, <strong>SSL Expiration</strong>, <strong>Configuration Expiration</strong>, and <strong>Flexible Asset Expiration</strong> workflows.</div> </li> </ul></li> <li>To add a filter, click the <strong>+ Filter</strong> button (left side of the screen) and select your filter criteria using the drop downs. To add additional filter criteria, click the plus icon. <p><br><img src="https://us.v-cdn.net/6032361/uploads/migrated/59AVD7HXNK9R/workflows-it-glue-5.png" alt="Workflows___IT_Glue-5.png" class="embedImage-img importedEmbed-img"></img></p> </li> <li>Click on <strong>Slack Notification</strong>. <p><br><img src="https://us.v-cdn.net/6032361/uploads/migrated/R0ZDUAQVHT11/workflows-it-glue.png" alt="Workflows___IT_Glue.png" class="embedImage-img importedEmbed-img"></img></p> </li> <li>Configure the action to create the JSON payload that will be passed to the webhook when the trigger condition is met.</li> </ol><ul><li> <strong>Action Name</strong> - Enter a descriptive name for the action (e.g. Notify in Asana task 10 days in advance).</li> <li> <strong>Webhook URL</strong> - Enter the Webhook URL copied from Zapier.</li> <li> <strong>JSON Payload</strong> - Enter a key/value pair. Use multiple key/value pairs to split data across multiple fields (e.g. task name and task notes). <div> <strong>Note:</strong> This key/value pair includes variables that will pull values from the asset that is triggering the notification. The available variables are listed at the bottom of the screen when you click <strong>"Need Help? Click Here to See Available Variables"</strong>. If you're having trouble formatting the message, check out Slack's documentation on formatting messages <a href="/home/leaving?allowTrusted=1&target=https%3A%2F%2Fapi.slack.com%2Fdocs%2Fmessage-formatting" rel="noopener nofollow">here</a>. Please note that line breaks are not currently supported.</div> <p><img src="https://us.v-cdn.net/6032361/uploads/migrated/E4LKBJ8XIN87/1.png" alt="1.png" class="embedImage-img importedEmbed-img"></img></p> </li> <li>Click <strong>Next</strong>.</li> <li>Click the <strong>Test Action</strong> button to perform the job your action is set to do with some test data. <p><br><img src="https://us.v-cdn.net/6032361/uploads/migrated/HLRXJK29HY51/workflows-test-action.png" alt="Workflows_Test_Action.png" class="embedImage-img importedEmbed-img"></img></p> </li> <li>Turn your workflow <strong>ON</strong> and then click <strong>Finish</strong> to save all your changes. <p><br><img src="https://us.v-cdn.net/6032361/uploads/migrated/6GTG6GN23OZG/workflows-it-glue-7.png" alt="Workflows___IT_Glue-7.png" class="embedImage-img importedEmbed-img"></img></p> </li> </ul><p>Your team will now start receiving notifications to Slack within the next 24 hours. Note that notifications based on document or password triggers will be sent in real time.</p> <p>From there, you can use a system of emoji reactions to let team members claim, investigate, and mark problems as resolved, or have conversations about specific notifications.</p> <p>Common Questions</p> <div> <div> <div> <p><strong>I have set up expiration notifications for flexible assets. Currently, it seems that the notifications are for all flexible assets. Can different notifications be set for different flexible assets?</strong></p> </div> <div> <p>Refer to the instructions above to make sure you configured a filter when you set up the workflow. You can use filters to identify which flexible asset type will be notified on.</p> </div> </div> <div> <div> <p><strong>I can't get links working in Slack. The link is there, but it is not clickable. Annoying!</strong></p> </div> <div> <p>You can modify the JSON payload in IT Glue to wrap the link in the Slack markdown for creating a link, which is <Link URL|Link Text>.</p> <p>For example:</p> <ul><li>To hyperlink the word <em>Link</em>, you would use this as the link markdown:<br><code class="code codeInline" spellcheck="false" tabindex="0"><[resource_url]|Link></code> </li> <li>To hyperlink the <code class="code codeInline" spellcheck="false" tabindex="0">[resource_name]</code> variable, which is the name of the asset, you would use this as the link markdown:<br><code class="code codeInline" spellcheck="false" tabindex="0"><[resource_url]|[resource_name]></code> </li> <li>To hyperlink the URL itself, you would use this as the link markdown:<br><code class="code codeInline" spellcheck="false" tabindex="0"><[resource_url]|[resource_url]></code> </li> </ul></div> </div> <div> <div> <p><strong>Can I use the IT Glue logo in my notifications? </strong></p> </div> <div> <p>Yes, you can download either of the following icons to upload to Slack. This will help your team visually verify where the messages originated:</p> <p><br><img src="https://us.v-cdn.net/6032361/uploads/migrated/MTOQXW2NQFWY/gluebot-slack.png" alt="gluebot-slack.png" class="embedImage-img importedEmbed-img"></img><img src="https://us.v-cdn.net/6032361/uploads/migrated/CK9VZHQ7HESJ/itglue.png" alt="itglue.png" class="embedImage-img importedEmbed-img"></img></p> </div> </div> </div> </article> </main>