Browse Guides

Trigger a Microsoft Power Automate flow using Halo Webhooks
Reading mode
Copy Link
Link Copied!
Print
Feedback
This guide has multiple versions available:
<style>p { margin: 0; }span.fr-emoticon.fr-emoticon-img { background-repeat: no-repeat !important; font-size: inherit; height: 1em; width: 1em; min-height: 20px; min-width: 20px; display: inline-block; margin: -0.1em 0.1em 0.1em; line-height: 1; vertical-align: middle; } span.fr-emoticon { font-weight: normal; font-family: "Apple Color Emoji", "Segoe UI Emoji", "NotoColorEmoji", "Segoe UI Symbol", "Android Emoji", "EmojiSymbols"; display: inline; line-height: 0; } blockquote { border-left: solid 2px #5e35b1; color: #5e35b1; margin-left:0; padding-left:5px;}blockquote blockquote{ border-color: #00bcd4; color: #00bcd4;}blockquote blockquote blockquote{ border-color: #43a047; color: #43a047;} table.grid{ border-collapse: collapse;} table.grid td, table.grid th { border: 1px solid #ddd;} .fr-fic.fr-dib{ display: block; margin: 5px auto;}.fr-fic.fr-dib.fr-fir{ text-align: right; margin: 5px 0 5px auto;}.fr-fic.fr-dib.fr-fil{ text-align: left; margin: 5px auto 5px 0;}.fr-fic.fr-dii{ float: none; margin: 5px auto;}.fr-fic.fr-dii.fr-fil{ float: left; margin: 5px auto;}.fr-fic.fr-dii.fr-fir{ float: right; margin: 5px auto;}img.fr-dib.fr-fir { margin-right: 0; text-align: right;}img.fr-dib.fr-fil { margin-left: 0; text-align: left;}img.fr-dib { margin: 5px auto; display: block; float: none;}img.fr-bordered { box-sizing: content-box; border: solid 5px #CCC;}img.fr-shadow { box-shadow: 10px 10px 5px 0px #cccccc;}img.fr-rounded { border-radius: 10px; -moz-border-radius: 10px; -webkit-border-radius: 10px; -moz-background-clip: padding; -webkit-background-clip: padding-box; background-clip: padding-box;}</style><p><strong>In this guide we will cover:</strong></p><p><strong>- Pre-Requisites</strong></p><p><strong>- Setup</strong></p><p><strong>- Use data from the webhook payload in the flow</strong></p><p><br></p><p><br></p><p>Halo can be integrated with Microsoft Power Automate allowing you to create automated flows that interact with the Halo API. Halo webhooks can be used to have events in Halo trigger the start of a flow in Power Automate. In this guide we will cover how to configure this.&nbsp;</p><p><br></p><p>If you are looking to execute actions in Halo using a flow in Power Automate you will need to configure a custom connector. Information on how to setup custom connectors for this purpose can be found <a data-fr-linked="true" href="https://usehalo.com/haloitsm/guides/1714" id="isPasted" target="_blank" rel="noopener noreferrer">here</a>.&nbsp;</p><p><br></p><p><strong><span style="font-size: 14pt;">Pre-requisites</span></strong></p><p>- Power Automate Premium&nbsp;</p><ul><li>If the flow does not need user specific context (such as impersonating users) and is a cloud flow only one premium licence should be required. The user who owns and runs the flow will need to have a Power Automate premium licence. However, this will depend on your flow.&nbsp;</li><li style="color: rgb(0, 0, 0);">Having a flow triggered using a webhook from an external system is a premium feature. If you are not on Power Automate premium you will not have access to the trigger required for this.</li></ul><p><br></p><p><strong><span style="font-size: 14pt;">Setup&nbsp;</span></strong></p><p>Webhooks can be used to trigger a flow in Power Automate without the use of a customer connector. However, as there is no custom connector to authenticate the webhook, additional steps will need to be added to your flow to authenticate the webhook in line with the authentication method you are using.&nbsp;</p><p><br></p><p>First create your new flow in Microsoft Power Automate, and add a trigger.&nbsp;</p><p><img src="https://halo.haloservicedesk.com/api/attachment/image?token=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjQ2ZmVlY2Y1LWI4NzMtNDgyMy1hMzRlLWFmNWY4ODBhYzMxNCJ9.llXnQ67NXiG7flKVaMA4GlKl-2K3HBg67OdpCvQPn8k" class="fr-fic fr-fil fr-dib" width="1153" style="width: 1155px; height: 522.178px;" height="522"></p><p><strong><span style="font-size: 10pt;">Fig 1. Add a trigger to a new flow in Power Automate</span></strong></p><p><br></p><p>Here you will need to add the trigger &#39;When an HTTP request received&#39;.</p><p><img src="https://halo.haloservicedesk.com/api/attachment/image?token=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6ImEwYmViMWVkLWZjZmYtNDI2ZS04M2JlLTNlMDQ2NTUzODFmNSJ9.L8cQipnGJWbtb02KFvNdYygMkG5GTgk2D_gR5n7_zOY" class="fr-fic fr-fil fr-dib" width="478" style="width: 480px; height: 487.641px;" height="488"></p><p><strong><span style="font-size: 10pt;">Fig 2. Trigger for Flow</span></strong></p><p><br></p><p>As the flow will be triggered by an external source &#39;Who can Trigger The Flow&#39; will need to be set to &#39;Anyone&#39;.&nbsp;</p><p><br></p><p>Power automate requires you add at least one action in order to save the flow, add an action to the flow, this could just be a small delay if you do need any actions to be carried out. Now save the flow.</p><p><br></p><p>Now re-select the trigger in the flow, as the flow has been saved a HTTP URL will be generated and visible against the trigger. This is the URL our webhook need to be sent to to trigger the flow.&nbsp;</p><p><img src="https://halo.haloservicedesk.com/api/attachment/image?token=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6Ijk1OTE4MWIzLWY3N2ItNDk4Yy1iY2E3LWIyYTkzY2YzOTFlZiJ9.9TNQPo3P1MH66l7nD8_LTHxO-jSdQ1xH-Fv7EwMW1yk" class="fr-fic fr-fil fr-dib" width="611" style="width: 613px; height: 508.016px;" height="508"></p><p><strong><span style="font-size: 10pt;">Fig 3. Trigger after saving</span></strong></p><p><br></p><p>Copy this URL and head back to Halo. Now we will need to create a webhook in Halo.&nbsp;</p><p><br></p><p>In Halo head to configuration &gt; integrations &gt; webhooks &gt; new. Here, give your webhook a name and paste the HTTP URL from your flow into the &#39;Payload URL&#39; field in Halo. The authentication method chosen for your webhook will need to be in line with your flow. If choosing no authentication additional steps do not need to be added to your flow. When using an authenticated method you will need to include steps in your flow that authenticate the incoming webhook.&nbsp;</p><p><img src="https://halo.haloservicedesk.com/api/attachment/image?token=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjY3MThiYmJlLTNiYjYtNGY3Zi05ZGZhLTAzMWZjYWQ1ODcwYSJ9.7gDUeHdMilr3XQnwe2x5HtqS6bcJEEczCFiWtH6v56s" class="fr-fic fr-fil fr-dib" width="913" style="width: 915px; height: 530.681px;" height="531"></p><p><strong><span style="font-size: 10pt;">Fig 4. Webhook setup in Halo</span></strong></p><p><br></p><p>Now you can choose what event in Halo triggers this webhook.</p><p><br></p><p>Scroll down to the &#39;Events&#39; section within the webhook setup, here, add an event to the events table. When this event occurs this webhook will trigger. In the figure 5 example when a new P1 ticket is logged, the webhook will trigger.&nbsp;</p><p><img src="https://halo.haloservicedesk.com/api/attachment/image?token=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjIwMzEwYzZlLWNlZTUtNDczNS04MjU0LTQ4YThjYjRkYjllYSJ9.xrL2AOsfnR524aktfc1EGMS2zIbaLalQesaMdKFjdcw" class="fr-fic fr-fil fr-dib" width="1385" style="width: 1387px; height: 695.21px;" height="695"></p><p><strong><span style="font-size: 10pt;">Fig 5. Event to trigger webhook</span></strong></p><p><br></p><p>Conditions can be added to the event set here too, so only events that meet set criteria will trigger the webhook.&nbsp;</p><p><br></p><p>Now when this event occurs in Halo, the webhook will &nbsp;trigger the flow in Power Automate.&nbsp;</p><p><br></p><p>Remember, if you have added authentication to your webhook, you will need to configure the flow to evaluate this authentication before the flow can progress.&nbsp;</p><p><br></p><p><strong><span style="font-size: 14pt;">Use data from the webhook payload in the flow</span></strong></p><p>The webhook that triggers the flow will contain information about the event that triggered it (in Halo) in it&#39;s payload. This data can be extracted from the payload to be used in the flow in Power Automate.&nbsp;</p><p><br></p><p>To do this add the &#39;Parse JSON&#39; action to the flow in Power Automate.</p><p><img src="https://halo.haloservicedesk.com/api/attachment/image?token=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6ImFhNTY1M2I2LWJlMTAtNDQ5OS1hNzRjLTFmMjE5ZGZhYWVkZiJ9.VY7rh3jLf6qIw1LeUmFPXxOU_cRsaNk_VVdeP8V87y8" class="fr-fic fr-fil fr-dib" width="571" style="width: 573px; height: 338.833px;" height="339"></p><p><strong><span style="font-size: 10pt;">Fig 6. Add Parse JSON action to flow</span></strong></p><p><br></p><p>The &#39;content&#39; for the action will need to use the payload of the webhook that triggered used for the flow. To do this choose &#39;insert dynamic content&#39; into the content field, then you will be able to select the &#39;body&#39; of the trigger for the flow.&nbsp;</p><p><br></p><p>An example payload for the webhook can be entered in the schema field here to generate a Schema for the incoming JSON, used to improve the accuracy of Power Automate&#39;s interpretation of the JSON. You can obtain an example payload by triggering the webhook in Halo, then head to the webhook setup in Halo &gt; Deliveries tab &gt; select an entry &gt; &nbsp;the &#39;Request&#39; tab shows the payload of the webhook.&nbsp;</p><p><br></p><p>Data from the payload can then be extracted and stored in variables using variable actions.&nbsp;</p>
Thank you! Your submission has been received!
Oops! Something went wrong while submitting the form.