How can we help you today?

Webhooks


The article covers so-called webhooks – what they are, how they are used, and how you can create, edit, and delete them in Absencelist. Please note that these actions can only be performed by system users with the role of Administrator or Owner.

What is a webhook?

Webhooks are essentially a subscription system. You choose which events you want to subscribe to, and when such an event occurs, messages are sent from Absencelist to another system containing information about what happened. An event can, for example, be that a new absence request has been submitted, a new user has been created, or a request has been approved.


When this happens, the Absencelist creates a message containing information about the event: what happened, who was involved, and when it occurred, and then sends this information in real time to the system you choose. You only receive messages for the events you choose to subscribe to.


Even though this may sound like the reminders you, as a user, receive from the system, webhooks are not the same thing. Webhooks contain technical information and are intended to be used for integrations between different systems and services, not to be read directly by people.

What ultimately happens with a webhook's message is up to the receiving system to decide, but usually, it is used to update information in an HR system or similar. With webhooks, only your imagination (and the system receiving our webhook) sets the limits.


Which events can I subscribe to?

You can choose to receive a webhook from the Absencelist when one or more of the following occurs:

  • An absence request is created
  • An absence request is updated (including deleted)
  • An absence request gets a new status (ONLY when a request is approved, denied, or pending approval)
  • A new user is created
  • An existing user is updated (including deleted)
  • An absence type is created
  • An absence type is updated (including deleted)
  • Company settings are adjusted
  • A webhook is created
  • A webhook is updated (including deleted)

You choose which events you want to subscribe to and can select one or multiple in the same webhook. Do you have more questions? Please contact our support!


Create webhooks
  1. Log in to Absencelist as an administrator
  2. Go to Settings  and then click on Webhooks  in the left menu
  3. Click on Add
  4. Give your webhook a name
  5. Enter the web address where you want the message to be sent
  6. Enter the secret code (more about this below)
  7. Select which events you want to subscribe to
  8. Save!

The secret code mentioned in step 6 is used to ensure that it is actually the Absencelist that is sending the information to the system receiving the webhook. 


When a webhook is created, we also include the secret code on the "envelope" of our message, and the receiving system also knows what the secret code is. The recipient then compares our secret code with what it expects; if they match, the message most likely actually comes from Absencelist.


It doesn’t matter what  the secret code is, but the important thing is that both the Absencelist and the system you send webhooks to know what the shared secret is. 


NOTE. Once you have created your webhook, you can no longer see what the secret code is, so save it in a secure place first. 

When you save your new webhook, a "ping" event is also sent to the web address you specified in step 5. 


Edit webhooks

Under Settings > Webhooks, all your existing webhooks are listed. Here, you can see the name, the web address where messages are sent, the events each webhook subscribes to, a log, a trash can for deleting a webhook, and most importantly, the green pen for editing all of this.


When you edit a webhook, you can modify everything you could choose when you created a new webhook. The only exception is that you must unlock the field to change the secret code. To change the existing secret code, click on Change secret code and confirm the change by entering the current code and the new code you want to change to.


When you edit a webhook, no "ping" event is sent like when you created it for the first time.


Delete webhooks

Under Settings > Webhooks, an Administrator or Owner can click on the trash can to delete a webhook. Please note that deleted webhooks cannot be restored! 


My webhook is not working!

The Absencelist saves a log of all events sent via a webhook. Click on the log button for the webhook you want to troubleshoot, and you will see the history of the last 20 events and the contents of these messages.

Did you find it helpful? Yes No

Send feedback
Sorry we couldn't be helpful. Help us improve this article with your feedback.