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.
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.
| Handle | Type | Description |
|---|---|---|
input | any | The upstream value to transform. Optional — you can also reference any upstream variable via template bindings. |
| Handle | Type | Description |
|---|---|---|
result | any | The transformed output value |
The result is accessed in downstream nodes as {{ transform.* }}.
| Setting | Type | Description |
|---|---|---|
mode | enum | object — build a new object from a template. expression — evaluate a single expression and return its result. |
template | code editor (JSON) | The transformation definition. Supports template bindings throughout. |
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.
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.
