Skip to content
Back to site

Transform Studio

Transform Studio shows what a transformation turns a payload into, and what an endpoint would receive. Running it sends nothing, so it is safe on a production transformation.

In the dashboard it is Develop → Transform Studio. In the API it is POST /api/v1/projects/{projectId}/transform-preview and POST /api/v1/projects/{projectId}/transform-preview/delivery-dry-run; see the API reference.

Mode What it answers What it needs
Preview What the transformation produces from this payload. An input payload, and a saved transformation, a template or a script.
Dry run What the HTTP request to a given endpoint would look like: body, headers and signature. The same, plus an endpoint.

Preview needs only read access. A dry run returns a valid signature made with the endpoint’s real signing secret, enough to forge a body that endpoint accepts, so it requires write access and a READ_WRITE API key. See Authentication.

  1. Put a payload in. Paste one, or press Load Event and pick a real event from the project. A real payload finds mistakes a hand-written sample does not.

  2. Choose what to run. Pick a saved transformation, or write into the expression box:

    • A box that starts with { or [ is a JSON template, the same ${$.path} template a transformation carries. See Transformations.
    • Anything else is a single extraction, such as $.data, the form a destination’s payloadTransform takes.
    • Empty is pass-through: the payload comes back formatted and unchanged.
  3. Run it. The output panel shows the result, whether it differs from the input, and any errors. An extraction that matched nothing returns null and says so: in a template that is not an error, so this is where you notice it.

The Language switch chooses Template or JavaScript. In JavaScript mode the box becomes a code editor, and the studio runs the worker’s engine with the same sandbox and TRANSFORM_SCRIPT_* limits, so a script that works here works on a delivery. The JavaScript contract says what handler(webhook) gets and must return.

  • ⌘/Ctrl+Enter runs, ⌘/Ctrl+S saves.
  • Four tabs: Input, Output, Diff and Console. A successful run opens Output; a failed one opens Console.
  • console.log, info, warn, error and debug go to the Console tab, including what a script logged before it threw.
  • A failure names its reason and highlights the line in your script.
  • A script that returns { cancel: true } is reported as a cancellation, not an error. On a real delivery nothing would be sent, retried or put in Failed Messages.

Switch the mode to Dry run and pick a target endpoint. The result is the request it would receive:

  • the transformed body,
  • the headers, including your custom headers,
  • the X-Signature over that body, made with the endpoint’s current signing secret,
  • the endpoint’s URL, and the name and version of the applied transformation.

Nothing is sent. A disabled endpoint can be dry-run too, with a warning.

Running changes nothing; saving is a separate press.

  • Save script writes the editor back into the selected transformation. That publishes a new version, as saving through the API does; see version history.
  • Save as transformation creates a new one in this project under a name you give. Subscriptions and destinations can then use it.
  • With no transformation selected, what you type is a scratch draft and is lost with the page.
  • It does not pick the transformation a real delivery would use. It applies the one you name. Subscription settings and rules are not consulted, so a rule that overrides the transformation is invisible here.
  • A dry run is not byte-for-byte. A real delivery also carries X-Event-Id, X-Delivery-Id, X-Sequence-Number and Idempotency-Key, which exist only once there is a delivery. Use it to check the body and signing secret.
  • The signature is always the t=…,v1=… form. An endpoint on the Standard Webhooks scheme is signed with webhook-id, webhook-timestamp and webhook-signature, which the dry run does not produce. See Signatures.
  • Nothing is sent, so nothing is confirmed. It cannot tell you whether the endpoint accepts the body. For a real request, use the test console or send a test event.
  • The endpoint has to be in this project. An endpoint from a sibling project is reported as not found, the same answer another organization’s endpoint gets, so the dry run cannot be used to discover which ids exist.