Transform Steps
Map, normalize, and validate data in workflows
Transform Steps
Transform steps manipulate and reshape data as it flows through your workflow. They support field mapping, data normalization, validation, and enrichment operations.
Configuration
| Field | Type | Required | Description |
|---|---|---|---|
id | string | Yes | Unique step identifier |
type | string | Yes | Must be "transform" |
name | string | Yes | Human-readable name |
config.action | string | No | Transform action (default: transform) |
config.sourceData | string | Yes | Template expression for source data |
config.targetSchema | object | No | JSON Schema for target structure |
config.mappingRules | array | No | Field mapping rules |
config.normalizations | array | No | Data normalization rules |
config.validationRules | array | No | Validation rules |
config.strict | boolean | No | Fail on any transformation error |
Transform Actions
| Action | Description |
|---|---|
transform | Full transformation with mapping and normalization |
map | Simple field-to-field mapping |
normalize | Standardize data formats |
validate | Validate data against schema |
enrich | Add computed or external data |
Transform Types
Transforms can be categorized by type:
| Type | Description |
|---|---|
mapping | Field-to-field transformations |
normalization | Data standardization |
enrichment | Adding external or computed data |
aggregation | Combining multiple values |
custom | Custom transformation logic |
Mapping Rules
Mapping rules define how fields are transformed from source to target:
Mapping Rule Fields
| Field | Type | Required | Description |
|---|---|---|---|
id | string | No | Unique rule identifier |
source | string | Yes | JSONPath or dot notation to source field |
target | string | Yes | JSONPath or dot notation to target field |
transform | string | No | Transformation operation (default: direct) |
customTransform | string | No | Natural language transformation description |
default | any | No | Default value if source is missing |
required | boolean | No | Whether source field is required |
condition | string | No | Condition for applying this rule |
Field Transforms
| Transform | Description | Example |
|---|---|---|
direct | Copy value as-is | "John" → "John" |
uppercase | Convert to uppercase | "John" → "JOHN" |
lowercase | Convert to lowercase | "John" → "john" |
trim | Remove whitespace | " John " → "John" |
capitalize | Capitalize first letter | "john" → "John" |
titlecase | Title Case Each Word | "john doe" → "John Doe" |
snake_case | Convert to snake_case | "firstName" → "first_name" |
camelCase | Convert to camelCase | "first_name" → "firstName" |
number | Parse as number | "123" → 123 |
string | Convert to string | 123 → "123" |
boolean | Parse as boolean | "true" → true |
array | Wrap in array | "value" → ["value"] |
flatten | Flatten nested array | [[1], [2]] → [1, 2] |
custom | Custom transformation | Use with customTransform |
Conditional Mapping
Apply mappings conditionally:
Default Values
Provide fallback values for missing fields:
Normalization Rules
Normalization rules standardize data formats:
Normalization Types
| Type | Description | Example |
|---|---|---|
date | Standardize date format | "01/15/2024" → "2024-01-15" |
currency | Format currency values | 1234.5 → "$1,234.50" |
phone | Standardize phone numbers | "(555) 123-4567" → "+15551234567" |
address | Normalize address format | Standardize street, city, zip |
name | Standardize name format | "JOHN DOE" → "John Doe" |
email | Normalize email addresses | "John@EXAMPLE.com" → "john@example.com" |
url | Standardize URLs | Add protocol, normalize case |
percentage | Format percentages | 0.156 → "15.6%" |
Normalization Rule Fields
| Field | Type | Required | Description |
|---|---|---|---|
id | string | No | Unique rule identifier |
field | string | Yes | Field path to normalize |
type | string | Yes | Type of normalization |
format | string | No | Target format (e.g., YYYY-MM-DD for dates) |
locale | string | No | Locale for formatting (e.g., en-US) |
options | object | No | Additional normalization options |
Date Normalization Examples
Currency Normalization Examples
Validation Rules
Validate transformed data against constraints:
Validation Rule Types
| Rule | Description | Value Example |
|---|---|---|
required | Field must exist and not be null | N/A |
type | Field must be specific type | "string", "number", "boolean" |
pattern | Field must match regex | "^[A-Z]{2}$" |
range | Numeric range | { "min": 0, "max": 100 } |
enum | Must be one of listed values | ["active", "inactive", "pending"] |
custom | Custom validation expression | "{{value}} > 0" |
Validation Rule Fields
| Field | Type | Required | Description |
|---|---|---|---|
id | string | No | Unique rule identifier |
field | string | Yes | Field path to validate |
rule | string | Yes | Validation type |
value | any | Depends | Validation parameter |
message | string | No | Custom error message |
Target Schema
Define the expected output structure:
Using Templates
Use pre-built transform templates:
Transform Output
Transform steps output detailed reports:
Output Fields
| Field | Description |
|---|---|
transformed | The transformed data matching target schema |
mappingReport | Report of field mapping operations |
normalizationReport | Report of normalization operations |
validationErrors | List of validation errors |
isValid | Whether the transformation is valid |
metadata | Transformation statistics |
Common Patterns
Data Mapping Between Systems
Map Stripe customer to QuickBooks format:
Data Cleanup and Standardization
Validation Before API Call
Enriching Data
Add computed fields:
Flattening Nested Data
Strict Mode
Enable strict mode to fail on any transformation error:
In strict mode:
- Missing required fields cause failure
- Transformation errors stop execution
- Validation errors cause failure
Without strict mode (default):
- Missing fields use defaults or are skipped
- Transformation errors are logged but continue
- Validation errors are reported but don't stop execution
Troubleshooting
Mapping Not Working
- Check field paths - Use dot notation for nested fields
- Verify source data - Add a debug transform to inspect data
- Check transform type - Ensure correct transform for the data type
Data Type Issues
- Use explicit transforms - Add
number,string,booleantransforms - Check for null values - Use
defaultfor missing fields - Validate input - Add validation step before transform
Performance
- Minimize rules - Combine mappings where possible
- Use templates - Pre-built templates are optimized
- Skip unnecessary fields - Only map fields you need