<div><div><div><div><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><div><p><strong><span style="font-size: 11pt;">In this guide we will cover:</span></strong></p><p><strong><span style="font-size: 11pt;">- How to setup a webhook to trigger a runbook</span></strong></p><p><br></p><p><br></p><p><span style="font-size: 11pt;">Within the Runbooks module of Halo you can generate a link to the runbook from which you can send payloads to. To begin configuring this, create a new runbook by navigating to Configuration > Integrations > Custom Integrations and then click into the module, the screen shown will be:</span></p><p><br></p><p><span style="font-size: 11pt;"><img src="https://halo.haloservicedesk.com/api/attachment/image?token=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6Ijg4ZDI4OTQ0LTU4ZDAtNGYxZC04YjQ2LWEzMjlhZjUxNjdiNyJ9.ckli_mFZiEjaibOgdMi6eFR6JeM5b2jfy-Zj9Bn830c" class="fr-fic fr-fil fr-dib"></span></p><p><span style="font-size: 10pt;"><strong>Fig 1. Custom integrations page.<br></strong></span></p><p><span style="font-size: 11pt;"><br></span></p><p><span style="font-size: 11pt;">Click into "Integration Runbooks" and then click "New" in the top right hand side. From here you will be redirected to the details tab of the new runbook, from which you can set the Runbook start access field.</span></p><p><br></p><p><span style="font-size: 11pt;"><img src="https://halo.haloservicedesk.com/api/attachment/image?token=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6ImQzMmNiMjZmLTgyNjAtNDA5Yy1iOTJhLTkzNmMyZWVlMzI5NyJ9.Mzh9A7yIJ2zkod6WQNNt_XoUCmfzfJrfpBkgdmd-x0Q" class="fr-fic fr-fil fr-dib"></span></p><p><span style="font-size: 10pt;"><strong>Fig 2. Runbook start access.</strong></span><strong><span style="font-size: 10pt;"><br></span></strong></p><p><span style="font-size: 11pt;"><br></span></p><p><span style="font-size: 11pt;">The access can be set to "Can only be started from Halo and from a public endpoint" this will generate the URL for the runbook, which is used to allow a runbook to be triggered from a POST being made to the endpoint. After saving the runbook, the URL will display like this.</span></p><p><br></p><p><span style="font-size: 11pt;"><img src="https://halo.haloservicedesk.com/api/attachment/image?token=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6ImVlZmJlYzMyLTcyMzYtNGY5MS04MWNjLWMyZmQ1MmM3YTllMSJ9.f7GqB0kFC0c5xgpsO6Xd-6R_LGzHynp0mskDwZfpGtE" class="fr-fic fr-fil fr-dib"></span></p><p><span style="font-size: 10pt;"><strong>Fig 3. Obtain URL for the runbook.</strong></span><strong><span style="font-size: 10pt;"><br></span></strong></p><p><span style="font-size: 11pt;"><br></span></p><p><span style="font-size: 11pt;">This can be set as the Payload URL of a webhook. To create a webhook navigate to Configuration > Integrations > Webhooks and then click new from the top right hand side of the screen. The Payload URL can be populated with the runbook URL and set the method to Post.</span></p><p><br></p><img src="https://halo.haloservicedesk.com/api/attachment/image?token=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjhlNzFlNTdjLWMzN2QtNDBhMi1hNzBmLWRlZDVkN2ViMTU4MyJ9.q0R1Y1927qOqnvrhkVDgcz6NPukxfCkmqEqHcOgKNqU" class="fr-fic fr-fil fr-dib"><p><br></p><p><span style="font-size: 10pt;"><strong>Fig 4. Populate payload URL for webhook with runbook URL.</strong></span><strong><span style="font-size: 10pt;"><br></span></strong></p><p><span style="font-size: 11pt;"><br></span></p><p><span style="font-size: 11pt;">For this example the event trigger for the webhook will be "Invoice Created".</span></p><p><br></p><p><span style="font-size: 11pt;"><img src="https://halo.haloservicedesk.com/api/attachment/image?token=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjVkNGRlODk4LTBlNDMtNDNmZC04MzA3LTZlMWE2M2ZiOTdjYSJ9.QoWL2q2EvFo_7QQHOGAmjy_Iy96_pqLn6nz5LAA2z0w" class="fr-fic fr-fil fr-dib"></span></p><p><span style="font-size: 10pt;"><strong>Fig 5. Trigger for webhook.</strong></span><strong><span style="font-size: 10pt;"><br></span></strong></p><p><span style="font-size: 11pt;"><br></span></p><p><span style="font-size: 11pt;">This will send the Payload for the newly created invoice to the runbook endpoint, which will then trigger the runbook. At the point of the runbook starting, the runbook level variables can be adjusted accordingly. After creating the runbook, the webhook and then creating a new invoice, you will be able to see the payload for your runbook via the "Log" tab of the runbook.</span></p><p><br></p><p><span style="font-size: 11pt;"><img src="https://halo.haloservicedesk.com/api/attachment/image?token=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6ImZhODMzZjY2LWE4YzItNDhkZS04YTQ2LTFkNGQxMGFkNzNmNyJ9.r1rkhTwn1SpkpcxTW7imQyj9AYKGLLm5pAmJdPZ7DT4" class="fr-fic fr-fil fr-dib"></span></p><p><span style="font-size: 10pt;"><strong>Fig 6. Log tab of runbook</strong></span><strong><span style="font-size: 10pt;"><br></span></strong></p><p><span style="font-size: 11pt;"><br></span></p><p><span style="font-size: 11pt;">This log can be clicked into, and the payload is visible within the request data tab of the log.</span></p><p><br></p><img src="https://halo.haloservicedesk.com/api/attachment/image?token=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6ImJmMGUwODNlLTI5ZTQtNDE1Zi1iZTEyLTU5ZmVmODQ4ZWVmYSJ9.04fMoVZchHX-tmsgdWVYuS2klJpJ-y3Xo7x22fmue58" class="fr-fic fr-fil fr-dib"><p><br></p><p><span style="font-size: 10pt;"><strong>Fig 7. Payload within log</strong></span><strong><span style="font-size: 10pt;"><br></span></strong></p><p><span style="font-size: 11pt;"><br></span></p><p><span style="font-size: 11pt;">Within the request tab, you will see the Payload.</span></p><p><span style="font-size: 11pt;"><br><img src="https://halo.haloservicedesk.com/api/attachment/image?token=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6ImNlY2FkYTcxLTczZWItNGQ0Zi04OWIyLWEwNGY3YWMzMDZhYyJ9.EDaTykRaSKWQYytDr5Ic7ThfU474a63-gtc4yTgSBV4" class="fr-fic fr-fil fr-dib"></span></p><p><span style="font-size: 10pt;"><strong>Fig 8. Payload in request tab</strong></span><strong><span style="font-size: 10pt;"><br></span></strong></p><p><span style="font-size: 11pt;"><br></span></p><p><span style="font-size: 11pt;">We can then create a runbook level variable, which in this case is the Invoice ID, which displays as the object_id in the above payload.</span></p><p><br></p><p><span style="font-size: 11pt;"><img src="https://halo.haloservicedesk.com/api/attachment/image?token=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjkzOGZmN2Y2LTE2MGQtNDdjMC1iNjc2LWY4NjY4ODNiMmRmMSJ9.PDmOCASK8L0lTe1SKpvR1Ffe3ZB9UYmci8pGiMR4_sQ" class="fr-fic fr-dii" style="width: 1205px; height: 220.198px;" width="1203" height="220"></span></p><p><span style="font-size: 10pt;"><strong>Fig 9. Creating runbook level variable</strong></span><strong><span style="font-size: 10pt;"><br></span></strong></p><p><span style="font-size: 11pt;"><br></span></p><p><span style="font-size: 11pt;">The variable for the runbook will now display as <<Name>> which in the above example would be <<Invoice ID>>. It is important to include the << >> before and after the value you are extracting from the request payload.</span></p></div></div></div></div></div>