Transform

Reshapes data into a new structure without writing Python code. Use it to extract fields, rename keys, merge values from multiple upstream nodes, or build exactly the payload shape a downstream node expects.

When to Use

Use Transform when:

  • You need to rename or restructure the output of a trigger or action before passing it downstream
  • You want to combine fields from multiple upstream nodes into one object
  • You need to flatten nested data or create a new shape from existing values

For more complex logic (loops, conditionals, calculations), use Code instead.

Inputs

HandleTypeDescription
inputanyThe upstream value to transform. Optional — you can also reference any upstream variable via template bindings.

Output

HandleTypeDescription
resultanyThe transformed output value

The result is accessed in downstream nodes as {{ transform.* }}.

Settings

SettingTypeDescription
modeenumobject — build a new object from a template. expression — evaluate a single expression and return its result.
templatecode editor (JSON)The transformation definition. Supports template bindings throughout.

Template Syntax

In object mode, the template is a JSON object where each value can be a {{ }} binding:

{
  "userId": "{{ webhook.body.data.object.customer }}",
  "amount": "{{ webhook.body.data.object.amount_received }}",
  "currency": "{{ webhook.body.data.object.currency }}",
  "eventType": "{{ webhook.body.type }}"
}

This produces a new object with only the fields you need, extracted from the upstream webhook payload.

In expression mode, the template is a single expression string:

{{ webhook.body.data.object.customer }}

This passes the single value — not wrapped in an object — to the output handle.

Example

Extract and rename fields from a Stripe payment_intent.succeeded event:

{
  "customerId": "{{ webhook.body.data.object.customer }}",
  "amountCents": "{{ webhook.body.data.object.amount_received }}",
  "currency": "{{ webhook.body.data.object.currency }}",
  "paymentId": "{{ webhook.body.data.object.id }}"
}

The downstream Send Email node can then reference {{ transform.customerId }} directly without needing to navigate the full Stripe payload structure.

Common Gotchas

  • If a referenced variable does not exist (e.g., the upstream node did not produce it), the binding evaluates to null. Use If to guard against missing fields.
  • Transform does not loop over arrays. If you need to map over a list, use Code.

See Also

  • Code — transform with Python logic
  • If — branch based on transformed values
On this page