Docs

Changing the payload, headers or URL with transformations

Required role and plan

View
Viewer or higher (variable values are shown to Developer or higher only)
Save, test, delete
Developer or higher
Plan
Pro and above

Set up a transformation

  1. Open the endpoint and choose the Transformation tab.
  2. Write handler(webhook) in Code. You can start from Templates (add headers, reshape the payload, skip events, use variables).
  3. Optionally add names and values under Variables. Read them in the handler from webhook.env.
  4. Under Input, enter an Event type and Sample data (JSON), select Test, and check the Result and Logs tabs. Nothing is delivered during a test.
  5. Turn on Apply transformation and save.

If you try to leave the tab or the page with unsaved changes, a confirmation dialog appears.

What you can change on webhook

PropertyDescription
methodHTTP method. Can be changed to POST, PUT or PATCH.
urlEndpoint URL. Only the path and query can be changed.
payloadThe payload to deliver. Can be changed.
headersHeaders to add.
cancelSet to true to cancel the delivery (not counted as a failure).
eventType, env, transformationsParamsRead only.

The signature is computed on the changed payload.

Limits

  • Up to 51,200 characters of code. No network access.
  • Each run has CPU and memory limits.
  • Up to 50 variables, 4 KB in total.
  • If the code fails, the message is neither delivered nor retried. Messages shows the kind of error.

Turn off or remove

Turn off Apply transformation to deliver payloads unchanged. Remove deletes the code, and later deliveries are sent unchanged. Turning off and removing work on any plan.