> ## Documentation Index
> Fetch the complete documentation index at: https://docs.paradime.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Payload Transformations

> Filter or reshape Paradime webhook payloads before delivery using JavaScript transformations to route events and adapt them to your downstream destination.

export const Arcade = ({src, title}) => <div style={{
  position: 'relative',
  paddingBottom: 'calc(56.2225% + 41px)',
  height: 0,
  width: '100%'
}}>
    <iframe src={src} title={title} frameBorder="0" loading="lazy" allow="clipboard-write" allowFullScreen style={{
  position: 'absolute',
  top: 0,
  left: 0,
  width: '100%',
  height: '100%',
  colorScheme: 'light'
}} />
  </div>;

Payload transformations let you filter or modify webhook events **before they are delivered**. The transformation runs inside Paradime, so if you cancel the event, no request is sent to your destination.

## When to use transformations

Use a transformation to suppress webhook deliveries you don't need to act on. Two common cases:

| Case                                            | Why skip it                                  |
| ----------------------------------------------- | -------------------------------------------- |
| `bolt.run.completed` with `status: "passed"`    | Only failures need alerting                  |
| Turbo CI runs (`schedule.turbo_ci` is non-null) | CI jobs are not production schedule failures |

## Example: Skip passed runs and Turbo CI

The handler below cancels delivery for both categories above.

```javascript theme={"system"}
function handler(webhook) {
  var payload = webhook.payload;

  // Skip passed runs (only failed runs need alerting)
  if (payload.status === "passed") {
    webhook.cancel = true;
    return webhook;
  }

  // Skip Turbo CI jobs (these are CI runs, not production schedule failures)
  if (payload.schedule && payload.schedule.turbo_ci !== null) {
    webhook.cancel = true;
    return webhook;
  }

  return webhook;
}
```

Setting `webhook.cancel = true` stops delivery entirely. The event is dropped, so no HTTP request is made to your endpoint.

## How to apply a transformation

1. Go to **Webhooks** and click the webhook you want to configure.
2. Open the **Advanced** tab.
3. Toggle **Enable transformation** on.
4. Click **Edit transformation** and paste your handler function.
5. Save.

> **Tip:** Changes take effect immediately on the next event. Test with a manual run before relying on it in production.

<Arcade src="https://demo.arcade.software/7YL6KA5OSV6ON7xmhXjQ?embed&embed_mobile=tab&embed_desktop=inline&show_copy_link=true" title="Payload Transformations" />


## Related topics

- [Getting Started](/developers/webhooks/getting-started.md)
- [Models and Transformations](/guides/dbt-fundamentals/getting-started-with-dbt/models-and-transformations.md)
- [Zapier CLI](/developers/paradime-cli/zapier-cli.md)
- [GCP Cloud Function CLI](/developers/paradime-cli/gcp-cloud-function-cli.md)
- [bolt.run.completed](/developers/webhooks/bolt-run-completed.md)
