By ERPNext Administrator on May 22, 2025
Expert

Webhooks

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:

  1. after_insert – when a new Leave Application is saved.
  2. ==> https://erpnext.technobrave.asia/app/webhook/HOOK-0006
  3. on_change – when an existing Leave Application is updated or changed.
  4. ==> https://erpnext.technobrave.asia/app/webhook/HOOK-0001
  5. on_trash – when a Leave Application is deleted.
  6. ==> https://erpnext.technobrave.asia/app/webhook/HOOK-0004


Webhook Details

  1. Doctype: Leave Application
  2. Request URL: Enter the endpoint of your external system where data will be sent.

 ==> From Pabbly : https://connect.pabbly.com/workflow/sendwebhookdata/IjU3NjYwNTY4MDYzZTA0MzI1MjZiNTUzNTUxMzQi_pc

  1. Request Method: Choose POST
  2. Condition (Optional): You can set specific conditions if you only want to trigger under certain leave types, statuses, etc.
  3. 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.


  1. 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.

 

  1. 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.


  1. 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



More articles on User Guide for System Admin
Comments

No comments yet. Start a new discussion.

Add Comment