This guide assumes you’re comfortable with basic syntax, filters, and the pipe operator. If you’re new to variable mapping, start with Basic Syntax.
Combining Multiple Data Sources
Reference and combine data from triggers, multiple nodes, and nested structures:- Trigger + Multiple Nodes
- Conditional Data Selection
- Cross-Node Filtering
- Aggregated Metrics
Mapping
Nested Filter Patterns
Apply multiple levels of filtering for complex queries:- Sequential Filters
- Parent-Child Filtering
- Cross-Reference Filtering
- Nested Existence Checks
Mapping
Explanation
Dynamic Property Access
Access properties using computed or variable names:- Property Name from Trigger
- Conditional Property Selection
- Array Index from Variable
Mapping
Example Data
Result
Recursive Operations
Work with deeply nested or recursive structures:- Find All Occurrences
- Deep Property Search
- Recursive with Filtering
Mapping
..) to find all occurrences at any nesting level.Performance Optimization
Optimize your variable mappings for better performance:- Specific vs Recursive
- Filter Early
- Simple Filters
- Reuse vs Recalculate
Better Performance
Slower Performance
Performance Best Practices
Use Direct Paths
Use Direct Paths
Filter Before Processing
Filter Before Processing
Minimize Wildcards
Minimize Wildcards
Cache Complex Queries
Cache Complex Queries
Store expensive query results in intermediate nodes rather than repeating the same complex expression multiple times.
Test with Real Data
Test with Real Data
Performance characteristics change with data size. Test your mappings with realistic data volumes.
Error Handling Strategies
Build robust mappings that handle missing or invalid data gracefully:- Trailing Pipe for Missing Data
- Existence Checks with Filters
- Handle Empty Arrays
- Default Values in Flow Logic
"" (empty string). Array returns comma-separated string "item1,item2". Object returns "[object Object]".This prevents properties from being removed when data is missing, but does NOT provide custom defaults.?(@.nested && @.nested.prop)
Empty arrays - Check .length before accessing indexes
Null values - Filter with ?(@.value!==null) to exclude nulls
Type mismatches - Use type selectors ?(@string()) to filter by type
Out-of-bounds array access - Check array length, use negative indexes for last items
Complex String Building
Advanced patterns for building dynamic strings:- Multi-Line Templates
- Conditional Sections
- Formatted Lists
- JSON-like Output
Mapping
Mapping Strategies for Large Datasets
Handle large arrays and datasets efficiently:- Pagination Pattern
- Selective Extraction
- Filter Before Extract
- Aggregation Strategy
Node 1: Get Slice
Node 2: Process Page
Testing and Debugging
Strategies for testing and debugging complex mappings:- Incremental Testing
- Isolation Testing
- Debug Output
- Type Checking
Step 1: Test Basic Path
Step 2: Add Filter
Step 3: Add Property Access
Step 4: Add String Building
Debugging Checklist
1
Verify Data Structure
Use Flow Debugger to inspect actual data from previous nodes
2
Test Path Components
Break complex paths into pieces and test each part
3
Check Filter Logic
Verify filter conditions return expected results
4
Validate String Concatenation
Test pipe operator segments individually
5
Handle Edge Cases
Test with missing data, empty arrays, null values
6
Monitor Performance
Check execution time for complex expressions
Advanced Use Cases
- Data Transformation Pipeline
- Dynamic Routing
- Data Enrichment
- Conditional Workflow
Node 1: Extract
Node 2: Filter
Node 3: Transform
Node 4: Aggregate
Best Practices Summary
Performance
- Use specific paths over recursive
- Filter early in expressions
- Cache expensive queries
- Test with realistic data sizes
Reliability
- Use trailing pipes for optional data
- Check existence in filters
- Handle empty arrays
- Validate assumptions
Maintainability
- Use descriptive node IDs
- Document complex mappings
- Break into steps
- Test incrementally
Debugging
- Test pieces individually
- Use debug output fields
- Verify data structures
- Monitor performance
What’s Next?
Examples
See comprehensive real-world examples
Reference
Complete syntax tables and troubleshooting
Filters & Expressions
Review filtering techniques
Flow Builder
Learn about building complete flows
Questions? Check the Reference or visit our Help Center.