Skip to main content

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

  1. Open the Frappe Cloud Dashboard.
  2. Navigate to Settings → Developer Settings.
  3. Click Add Webhook.
  4. Enter your public webhook endpoint URL.
  5. Select one or more webhook events that you want to receive.
  6. Optionally, configure a webhook secret for request authentication.
  7. Save the webhook configuration.

Activating the Webhook

After creating the webhook:

  1. Open the webhook record.
  2. Click Activate.
  3. Select Validate Webhook.
  4. Wait for the validation request to reach your endpoint.
  5. 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

  1. Configure a webhook endpoint in Frappe Cloud.
  2. Expose your backend endpoint publicly.
  3. Validate the webhook using the Webhook Validate event.
  4. Activate the webhook.
  5. Receive and process webhook events as they occur.
Rating: 0 / 5 (0 votes)