Configuring Frappe Cloud Webhooks
Frappe Cloud sends webhook events as HTTP POST requests whenever a subscribed event occurs. Your application can receive these events and trigger custom business logic or integrations.
Webhook Payload Format
Every webhook request contains a JSON payload with the event name and its associated data.
{
"event": "Site Plan Change",
"data": {
// Details of the resource
}
}
Prerequisites
Before configuring a webhook, ensure your backend application is ready to receive incoming HTTP POST requests.
- Your webhook endpoint must be running and accessible over the internet.
- Your application must respond successfully to the Webhook Validate event.
Validation Requirement
Frappe Cloud sends a Webhook Validate event before activating a webhook. Your endpoint must return a successful response (HTTP 200) for the validation to succeed.
Setting Up a Webhook
- Open the Frappe Cloud Dashboard.
- Navigate to Settings → Developer Settings.
- Click Add Webhook.
- Enter your public webhook endpoint URL.
- Select one or more webhook events that you want to receive.
- Optionally, configure a webhook secret for request authentication.
- Save the webhook configuration.
Activating the Webhook
After creating the webhook:
- Open the webhook record.
- Click Activate.
- Select Validate Webhook.
- Wait for the validation request to reach your endpoint.
- If validation succeeds, click Activate Webhook.
Once activated, Frappe Cloud will begin sending all subscribed events to your endpoint.
Webhook Authentication
For additional security, you can configure a secret key when creating or editing a webhook.
If a secret is configured, Frappe Cloud includes it in every webhook request using the following HTTP header:
X-Webhook-Secret
Your application should verify this header before processing the webhook request.
Best Practice
Always validate the X-Webhook-Secret header before processing webhook payloads. Reject any request with an invalid or missing secret to protect your application from unauthorized requests.
Webhook Workflow
- Configure a webhook endpoint in Frappe Cloud.
- Expose your backend endpoint publicly.
- Validate the webhook using the Webhook Validate event.
- Activate the webhook.
- Receive and process webhook events as they occur.