flowprepRuns in your browser
THE FLOWPREP FIELD GUIDE

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?

  1. Manual Trigger: start a test deliberately.
  2. Sample data: synthetic rows in a Code node.
  3. Summarize orders: a Code node with the transformation.
  4. 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

  1. Download the JSON and use Import from File in your n8n editor.
  2. Review the Code nodes, then execute manually with the included sample.
  3. Compare the final output to the example above.
  4. 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.

References

← All starter workflows