Ask the Community
Groups
Setting up Microsoft Teams 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>Use this article as a guide to configuring IT Glue and Microsoft Teams so that you can send webhook notifications to a Microsoft Teams 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><em>Example of a Teams expiration alert (click to enlarge)</em></p> <p><a rel="nofollow" href="http://kaseya.vanillacommunities.com/kb/articles/aliases/itglue/hc/article_attachments/360005776357/MS_Teams_Workflows_Expiry.png"><img src="https://us.v-cdn.net/6032361/uploads/migrated/9RRI51IVSOD9/ms-teams-workflows-expiry.png" alt="" data-featherlight="/hc/en-us/article_attachments/360005776357/MS_Teams_Workflows_Expiry.png" class="embedImage-img importedEmbed-img"></img></a></p> <p>Prerequisites</p> <ul><li>You must have a Manager or Administrator IT Glue role to configure workflows.</li> <li>Microsoft Teams <a rel="nofollow" href="/home/leaving?allowTrusted=1&target=https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fmicrosoftteams%2Foffice-365-set-up">must be enabled</a> for your organization.</li> </ul><p>Instructions</p> <h3 data-id="configuring-microsoft-teams"><strong>Configuring Microsoft Teams</strong></h3> <ol><li>In Microsoft Teams, select a team and a channel for that team (the channel you want notifications sent to).</li> <li>Click the ellipsis icon on the right side of the highlighted channel name.</li> <li>From the <strong>More Options</strong> menu, click <strong>Connectors</strong>.<br><br><img src="https://us.v-cdn.net/6032361/uploads/migrated/RFBGT7Z7D9Z0/microsoft-teams-connectors-2.png" alt="Microsoft_Teams_Connectors-2.png" class="embedImage-img importedEmbed-img"></img></li> <li>Navigate to <strong>Incoming Webhook</strong> connector and click <strong>Configure</strong>.<br><br><img src="https://us.v-cdn.net/6032361/uploads/migrated/NCLWZAL6YNY3/ms-teams-incoming-webhook.png" alt="MS_Teams_Incoming_Webhook.png" class="embedImage-img importedEmbed-img"></img></li> <li>Give the webhook a name and a custom icon. Then, click <strong>Create</strong>.<br><br><img src="https://us.v-cdn.net/6032361/uploads/migrated/SC0Y19D6JFLC/ms-teams-new-webhook-2.png" alt="MS_Teams_New_Webhook-2.png" class="embedImage-img importedEmbed-img"></img></li> <li>Click on the <strong>Copy</strong> icon next to the webhook URL. You will need it to configure IT Glue.<br><br><img src="https://us.v-cdn.net/6032361/uploads/migrated/2E3EHYX32YWL/ms-teams-copy-url-2.png" alt="MS_Teams_Copy_URL-2.png" class="embedImage-img importedEmbed-img"></img></li> <li>Click <strong>Done</strong>.</li> </ol><h3 data-id="setting-up-a-workflow">Setting up a workflow</h3> <p>The next step is to determine the specific IT Glue event that will trigger an action.</p> <ol><li>Log in to IT Glue and navigate to <strong>Account > Workflows</strong>. Then, click on the green <strong>+ New</strong> button. <p><br><img src="https://us.v-cdn.net/6032361/uploads/migrated/BXRR4Y7BN7TV/workflows-it-glue.png" alt="Workflows___IT_Glue.png" class="embedImage-img importedEmbed-img"></img></p> </li> <li>Choose a workflow trigger:<br><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/5ALUG24YVVNN/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/1KYFPU2SVZ7G/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/Q3JEKBJ2YQFP/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/EIB229GSQSBG/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/JP0GWT9QWWOD/workflows-it-glue-5.png" alt="Workflows___IT_Glue-5.png" class="embedImage-img importedEmbed-img"></img></p> </li> <li>Click on <strong>Webhook</strong>. <p><br><img src="https://us.v-cdn.net/6032361/uploads/migrated/GQCF5V79NRF3/webhook-choose-action.png" alt="Webhook_Choose_Action.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 Teams.</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>.</div> <p><img src="https://us.v-cdn.net/6032361/uploads/migrated/FJZF5B2J3BJX/workflows-it-glue-1.png" alt="Workflows___IT_Glue__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/POHPORNZZZFZ/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/3LYVWVIQYK1R/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 Teams 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 emoji reactions to let team members claim, investigate, and mark problems as resolved, or have conversations about specific notifications.</p> <p>For further reading, check out <a href="/home/leaving?allowTrusted=1&target=https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2FMicrosoftTeams%2Foffice-365-custom-connectors%23develop-custom-connectors" rel="noopener nofollow">Microsoft: Develop custom connectors in Microsoft Teams</a> and <a href="/home/leaving?allowTrusted=1&target=https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fmicrosoftteams%2Fplatform%2Fconcepts%2Fcards%2Fcards-format%23html-formatting-for-connector-cards" rel="noopener nofollow">HTML formatting for Connector Cards</a>.</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 Teams. 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 format the link in the markdown for creating a link, which is [Link Text](Link URL). 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">[Link]([resource_url])</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_name]]([resource_url])</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 Teams. This will help your team visually verify where the messages originated:<br><img src="https://us.v-cdn.net/6032361/uploads/migrated/15LQOKJUHXFM/gluebot-slack-512x512.png" alt="gluebot-slack-512x512.png" class="embedImage-img importedEmbed-img"></img><img src="https://us.v-cdn.net/6032361/uploads/migrated/B37ZA4CX9M38/2.png" alt="2.png" class="embedImage-img importedEmbed-img"></img></p> </div> </div> </div> </article> </main>