Skip to content

Transform

Type key: transform_node
Group: Data
Category: data
Tier: CORE

The Transform node remaps, renames, and restructures data from one format to another using a declarative field mapping configuration. It is ideal for preparing data for API calls, restructuring responses, or projecting only the fields needed downstream.

Handles

HandleDirectionDescription
inputInputReceives the source data
outputOutputEmits the transformed data structure

Configuration

FieldTypeDefaultDescription
mappingsarray[]Array of mapping objects
keep_unmappedbooleanfalseInclude fields not explicitly mapped in the output

Mapping Object

json
{
    "source": "input.customer.email",
    "target": "email",
    "expression": null,
    "mode": "single"
}
PropertyTypeDescription
sourcestringDot-notation path to the source field
targetstringName of the output field
expressionstring/nullOptional expression to transform the value
modeenumsingle (one value) or array (collect array of values)

Mapping Modes

single (default)

Copies a single value from source to target.

json
{
    "source": "input.user.firstName",
    "target": "first_name"
}

array

Extracts a specific field from each element of an array and collects the values.

json
{
    "source": "input.items[*].product_id",
    "target": "skus",
    "mode": "array"
}

If input.items = [{product_id: "A"}, {product_id: "B"}], then skus = ["A", "B"].

Expressions

When expression is set, the source value is passed through an expression before being assigned to the target. The expression uses the same syntax as the Expression node:

json
{
    "source": "input.price",
    "target": "price_with_tax",
    "expression": "{{value}} * 1.22"
}
json
{
    "source": "-",
    "target": "full_name",
    "expression": "{{input.first_name}} + ' ' + {{input.last_name}}"
}

Use {{value}} to refer to the extracted source value, or {{input.field}} to reference any field from the input.

Currency Formatting

You can format values as currency directly in Transform expressions:

yaml
source: total_amount
target: total_amount_label
expression: "$currency({{value}}, 'EUR', 'it_IT', 2)"

Example output: 4.048,00 €

Function signature:

text
$currency(value, currencyCode = 'EUR', locale = 'it_IT', decimals = 2)
  • value: numeric value to format
  • currencyCode: ISO-like code (e.g. EUR, USD, GBP, CHF, JPY)
  • locale: formatting style hint (e.g. it_IT, en_US, de_DE)
  • decimals: number of decimal digits

Important: locale must be a string literal in quotes:

yaml
expression: "$currency({{value}}, 'USD', 'en_US', 2)"   # ✅ correct
yaml
expression: "$currency({{value}}, 'USD', en_US, 2)"     # ❌ invalid (missing quotes)

Convenience alias for italian/euro:

yaml
source: total_amount
target: total_amount_label
expression: "$currency_it({{value}}, 2)"

Examples by locale:

yaml
expression: "$currency({{value}}, 'EUR', 'it_IT', 2)"  # 4.048,00 €
expression: "$currency({{value}}, 'USD', 'en_US', 2)"  # $ 4,048.00

Important: currency helpers do not divide by 100 automatically. If your source is in cents, divide explicitly:

yaml
expression: "$currency({{value}} / 100, 'EUR', 'it_IT', 2)"

Supported mapped currency symbols include: EUR, USD, GBP, CHF, JPY, CNY, CAD, AUD, NZD, SEK, NOK, DKK, PLN, CZK, RON, HUF, TRY, BRL, INR, RUB, ZAR, MXN, SGD, HKD.

If a code is not mapped, the function uses the currency code itself as suffix/prefix.

Examples

API Request Body Preparation

Input (from Data Model):

json
{
    "id": 1,
    "first_name": "Alice",
    "email": "alice@example.com",
    "created_at": "2025-01-01"
}

Mappings:

yaml
source: input.id          → target: userId
source: input.first_name  → target: name
source: input.email       → target: emailAddress

Output:

json
{ "userId": 1, "name": "Alice", "emailAddress": "alice@example.com" }
Transform node — API body transformationTransform node — API body transformation

💾 Try this example

Download the workflow JSON — open an empty workflow and import the file.

Extract with Expression (Price + Tax)

yaml
source: input.price
target: total_price
expression: "{{value}} * 1.22"

Combine Two Fields

yaml
source: -
target: full_name
expression: "{{input.first_name}} + ' ' + {{input.last_name}}"

Collect Array of IDs

yaml
source: input.orders[*].id
target: order_ids
mode: array

Result: "order_ids": [1, 2, 3, 4]

Keep Unmapped Fields

When keep_unmapped: true, all fields present in the input that are not explicitly mapped are included in the output alongside the mapped fields. Useful when you only need to add or rename a few fields.

Notes

  • source: "-" means the field has no source — the value is computed entirely from the expression
  • The Transform node processes a single record — if input contains an array in data, wrap it with a For Each node first
  • Unlike the Expression node (which adds new fields to existing input), the Transform node produces a new object containing only the mapped fields (unless keep_unmapped: true)

Proprietary software — source-available. All rights reserved.