Category: Transform
Node id: reduce
Reduces an array to a single value using sum, product, concatenation, first, or last operations
What it does
- Five reduction types: sum, product, concat, first, last
- Object-field and direct-value reduction modes
- Configurable separator for string concatenation
- Null/missing value handling during reduction
Use cases
- Sum up billing amounts across claim line items
- Concatenate diagnostic text from multiple encounters
- Extract the first or last item from an ordered result set
Runtime
Output ports
Settings
Basic
Advanced
Errors
Runtime notes
- Output also includes count (number of values reduced) and reduce_type echo; for concat it adds separator
- When field is set, the node extracts that field from each object; when empty, array elements are used directly
- Non-numeric values are silently skipped for sum/product; count reflects only successfully converted values
- first/last on an empty array returns result=null with found=false
See Build any workflow for how to put nodes together and Ports, types and data flow for how port types connect.