Webhook and Notification for Leave Application
By ERPNext Administrator on May 22, 2025
ExpertWebhooks
Webhooks are "user-defined HTTP callbacks". For a select DocType, you can create a webhook that triggers on specific document events under certain conditions, if required.
When the doc_event occurs, the source site makes an HTTP request to the URI configured for the webhook. Users can configure these webhooks to use events on one site to invoke behavior on another.
Configuring a Webhook
Integrations > Webhook > Webhook
Or
https://erpnext.technobrave.asia/app/webhook
This guide explains how to configure Webhooks for the Leave Application doctype in ERPNext version 13.
The Webhooks will be triggered on the following events:
after_insert
– when a new Leave Application is saved.- ==> https://erpnext.technobrave.asia/app/webhook/HOOK-0006
on_change
– when an existing Leave Application is updated or changed.- ==> https://erpnext.technobrave.asia/app/webhook/HOOK-0001
on_trash
– when a Leave Application is deleted.- ==> https://erpnext.technobrave.asia/app/webhook/HOOK-0004
Webhook Details
- Doctype:
Leave Application
- Request URL: Enter the endpoint of your external system where data will be sent.
==> From Pabbly : https://connect.pabbly.com/workflow/sendwebhookdata/IjU3NjYwNTY4MDYzZTA0MzI1MjZiNTUzNTUxMzQi_pc
- Request Method: Choose
POST
- Condition (Optional): You can set specific conditions if you only want to trigger under certain leave types, statuses, etc.
- Parameter (Webhook Data) :
Integration with Pabbly workflow :
==> https://connect.pabbly.com/v2/app/dashboard
The Pabbly workflow is integrated with ERPNext (via Webhook), a Google Calendar named "ERPNext Leave Notification", and Discord (DX server).
Please note that the workflow quota in Pabbly is limited to 100 tasks per month.
- New leave application ==>
after_insert :
when a new Leave Application is saved.
The webhook will send a request to the Pabbly workflow named HOOK-0001 ERPNext Leave Application (New Req).
==> Step 1: Automatically create a Google Calendar event.
==> Step 2: Send a notification to the designated Discord channel.
- Update/Change leave application ==>
on_change :
when an existing Leave Application is updated or changed.
The webhook will send a request to the Pabbly workflow named HOOK-0006 ERPNext Leave Application (Update doc).
==> Step 1: Automatically update a Google Calendar event.
==> Step 2: Send a notification to the designated Discord channel.
- Delete leave application ==>
on_trash
– when a Leave Application is deleted.
==> The webhook will send a request to the Pabbly workflow named HOOK-0004 ERPNext Leave Application (Delete doc)
==> Step 1: Automatically delete a Google Calendar event.
==> Step 2: Send a notification to the designated Discord channel.
The email used to log in to Pabbly Workflow and manage the Google Calendar is the ERPNext administrator account: erpnext.tba@gmail.com (owned by P'Gapp).
More articles on User Guide for System Admin