> ## Documentation Index
> Fetch the complete documentation index at: https://learn.workflow.dog/llms.txt
> Use this file to discover all available pages before exploring further.

# Transform Properties

> Run another workflow once for each property in an object.

The **Transform Properties** action applies a selected workflow to every
top-level property of an object. It preserves each original key and replaces
its value with the selected workflow's output data.

<Note>
  This is a sub-workflow action. The selected workflow runs separately for each
  property and must use a **Sub-Workflow** trigger. Use **Return Data** in that
  workflow to provide the transformed value.
</Note>

## Inputs

| Input                 | Type     | Required | Description                                            |
| --------------------- | -------- | -------- | ------------------------------------------------------ |
| **Selected Workflow** | Workflow | Yes      | The workflow used to transform each property.          |
| **Object**            | Object   | Yes      | The object whose top-level properties are transformed. |

## Outputs

| Output                 | Type   | Description                                       |
| ---------------------- | ------ | ------------------------------------------------- |
| **Transformed Object** | Object | The original keys mapped to sub-workflow outputs. |

## Configure the selected workflow

For each property, the selected workflow's **Data In** contains:

```json theme={null}
{
  "key": "propertyName",
  "value": "original property value"
}
```

Use `value` for the transformation and `key` when the logic depends on which
property is being processed. Connect the transformed value to **Return Data**.
That returned data becomes the new value under the original key.

For example, if the input is:

```json theme={null}
{
  "firstName": "  Ada ",
  "lastName": " LOVELACE "
}
```

A selected workflow that trims and lowercases its `value`, then returns that
string, produces:

```json theme={null}
{
  "firstName": "ada",
  "lastName": "lovelace"
}
```

## Execution behavior

* Only top-level properties are iterated.
* Properties are processed one at a time in object-entry order.
* If the selected workflow returns no output data, that property's new value is
  `null`.
* If any sub-workflow run fails, **Transform Properties** fails rather than
  returning a partial object.
* Normal workflow recursion-depth limits still apply.

<Tip>
  **Return Data** can return a primitive, list, or object. Design that returned
  value as the exact replacement each original property should receive.
</Tip>
