Articles on: Microsoft integrations

Webhook Integration

Enabling the Webhook Integration allows absentify to call a script on your server when one or more events happen in the absentify system.

Webhooks can be thought of as event listeners or push notifications. They allow you to build or set up integrations, which subscribe to certain events on absentify. When one of those events is triggered, we'll send an HTTP POST payload to the webhook's configured URL.

Webhooks can be used to update an external system or even send alerts to your email address. You'll receive notifications from absentify whenever requests are created or updated, allowing you to build integrations on top of absentify.


Let's get started



Configuring webhooks can be done simply through the absentify Settings page.

First, log in as an admin, then click on Settings in the top header bar, followed by Integrations.

Click on Configure URL.

From the dropdown menu, select the desired event that you'd like to link with your endpoint:

All
Request created
Request status changed

Input the desired endpoint and click Add to complete the integration.

Webhook Response



When absentify triggers a webhook URL on your site, it will send data in the following format:

{
   "body":{
      "id":"a2032774-7d41-4820-8858-0e0ec37e64d3",
      "request_creator_member":{
            "email":"sample@user.com",
            "name":"Sample User",
            "id":"c67c0681-db0b-4bc5-8759-020643f618b0",
            "custom_id":""
      },
      "createdAt":"2023-02-10T21:29:32.774Z",
      "updatedAt":"2023-02-10T21:29:32.772Z",
      "start":"2023-02-13T00:00:00.000Z",
      "start_at":"afternoon",
      "end":"2023-02-13T00:00:00.000Z",
      "end_at":"end_of_day",
      "duration":0.5,
      "year":2023,
      "details":{
         "status":"APPROVED",
         "deducted":0.5,
         "reason":"",
         "approval_process":"Linear_all_have_to_agree",
         "request_approvers":[
            {
               "id":283860,
               "approver_member":{
                  "email":"sample@user.com",
                  "name":"Sample User",
                  "id":"c67c0681-db0b-4bc5-8759-020643f618b0",
                  "custom_id":""
               },
               "reason":null,
               "status":"APPROVED",
               "status_change_date":null,
               "predecessor_request_approver_id":null
            }
         ],
         "requester_member":{
            "email":"sample@user.com",
            "name":"Sample User",
            "id":"c67c0681-db0b-4bc5-8759-020643f618b0",
            "custom_id":"",
            "allowances":[
               {
                  "allowance":30,
                  "brought_forward":10.5,
                  "compensatory_time_off":0,
                  "remaining":38.5,
                  "taken":2,
                  "year":2023
               },
               {
                  "allowance":30,
                  "brought_forward":14.5,
                  "compensatory_time_off":0,
                  "remaining":10.5,
                  "taken":34,
                  "year":2022
               },
               {
                  "allowance":30,
                  "brought_forward":38.5,
                  "compensatory_time_off":0,
                  "remaining":68.5,
                  "taken":0,
                  "year":2024
               },
               {
                  "allowance":14.5,
                  "brought_forward":0,
                  "compensatory_time_off":0,
                  "remaining":14.5,
                  "taken":0,
                  "year":2021
               }
            ]
         },
         "leave_type":{
            "id":"b9362b30-251d-4ba8-929b-181d9afcc924",
            "name":"Holiday"
         },
         "cancel_reason":null,
         "canceld_date":null,
         "canceld_by_member":null
      }
   }
}

Updated on: 28/02/2024

Was this article helpful?

Share your feedback

Cancel

Thank you!