Summarize orders
Group order totals by currency without mixing different currencies.
Original starter · no credentials · manual execution
The sample transformation is tested against the output below. Import and execution in your specific n8n version still need verification.
When to use it
Create a compact report from a known list of orders.
What is in the workflow?
- Manual Trigger: start a test deliberately.
- Sample data: synthetic rows in a Code node.
- Summarize orders: a Code node with the transformation.
- Read first: a Sticky Note with setup and limitations.
Sample input
[
{
"amount": 29.5,
"currency": "USD"
},
{
"amount": 10.5,
"currency": "USD"
},
{
"amount": 16,
"currency": "EUR"
}
]Expected output
A separate summary for USD and EUR, with order counts.
[
{
"currency": "USD",
"orders": 2,
"total": 40
},
{
"currency": "EUR",
"orders": 1,
"total": 16
}
]Import and adapt
- Download the JSON and use Import from File in your n8n editor.
- Review the Code nodes, then execute manually with the included sample.
- Compare the final output to the example above.
- Replace Sample data with your own source only after reviewing the input contract.
Before using real data
No currency conversion, tax calculation or accounting reconciliation is performed. Two-decimal rounding is a demo assumption.
This template does not send messages or contact external services. Adding a source or destination changes its behavior; test the complete workflow in your instance.