Mapper Node
Mapper Node
Section titled “Mapper Node”Module ID: ion.action.mapper
The Mapper node transforms input data into a new structure using the visual mapping component.
Overview
Section titled “Overview”Use the Mapper node when you need to transform data between different formats, extract specific fields, or restructure payloads for downstream nodes or API calls.
The Mapper uses a visual interface (see Mapper Component) to define transformations.
Handles
Section titled “Handles”| Handle | Description |
|---|---|
input | Source data to transform |
Outputs
Section titled “Outputs”| Handle | Description |
|---|---|
output | Transformed data |
error | Invalid configuration or mapping error |
Configuration
Section titled “Configuration”The Mapper node stores its configuration as a map with pre-computed transformation result:
// node.data structure{ params: any // The resulting mapped data}Behavior
Section titled “Behavior”- Receives input data
- Parses node.data configuration
- Extracts the
paramsfield - Outputs the params to
outputhandle
The visual Mapper component handles the complex transformation logic, producing a params object that this node outputs.
Example
Section titled “Example”Input Data
Section titled “Input Data”{ "shopify_order": { "id": 12345, "customer": { "name": "John Doe", }, "line_items": [...] }}Mapped Output (params)
Section titled “Mapped Output (params)”{ "order_id": "12345", "customer_name": "John Doe",}Common Patterns
Section titled “Common Patterns”API Payload Transformation
Section titled “API Payload Transformation”[Get Order] → [Mapper] → [Create Shipment]Data Extraction
Section titled “Data Extraction”[Webhook] → [Mapper: extract relevant fields] → [Process]Error Cases
Section titled “Error Cases”| Error | Cause |
|---|---|
| ”Invalid Form File” | node.data format incorrect |
| ”Mapper not configured” | Missing params field in configuration |
See Also
Section titled “See Also”- Mapper Component - Visual mapping interface
- Flow Nodes Overview