Hookdeck
Transformations overviewTransformation syntaxCreate a transformationEdit a transformationDelete a transformationTroubleshoot a transformation

Transformations overview

A transformation lets you modify the payload of a webhook prior to delivery.

Preview access

Transformations are a preview feature, and should not be used for mission-critical use cases at this time.

By using transformations in preview, you accept that:

  • You are limited to 1 million transformations per month.
  • Your transformations can be disabled at any time without prior notice.
  • The Hookdeck team may view and audit your transformation code (but not your environment variables).
  • The Hookdeck team might introduce backward-incompatible changes to the transformation functionality or API.
  • Events that trigger transformation issues cannot be retried yet.

Preview video

How transformations work

You can use transformations to change payload formats (e.g. converting XML to JSON); unify models across sources (e.g. conforming WooCommerce orders and Shopify orders to a single standard); add compatibility with an API (e.g. by adding keys or reformatting the payload); and more.

Filter rules are run after any transformation has been performed.

Syntax

Hookdeck allows for arbitrary transformations on request data using JavaScript (ES6). For a complete overview, see transformation syntax.

Limitations

Transformations have some important limitations to keep in mind.

  • The transformation runtime cannot perform any IO, or access any external resources such as the network or file system.
  • The execution runtime is limited to 1 second.
  • Transformation code is limited to 100 KB.
  • Transformations run in environments known as isolates, which carry their own set of limitations, detailed below.

Environment

Hookdeck sandboxes your transformation process within a V8 runtime environment known as an isolate. Isolates allow multiple JavaScript VM instances to operate in parallel, sharing low-level resources while remaining fundamentally distinct and secure.

Isolates deliver a host of performance and security advantages, but they also come with some noteworthy limitations.

While external JS libraries can be bundled with webpack for use inside your transformations, not all bundled libraries will function out of the box. Libraries that call unsupported APIs (such as the Node.js API) may require shimming using polyfills as a means of adding support. And for some libraries, this workaround may not function due to other limitations, such as:

  • dependencies for which polyfills cannot add support.
  • resource limitations.
  • process timeouts.

In the event that memory or time limits are exceeded, the isolate will terminate the execution of your code.

Guide To Zendesk Webhooks Features And Best Practices

In this guide, you will learn about Zendesk webhooks features, their behavior and what are the best practices for working with them.

Supported methods

The following methods are supported out of the box.