Simple USD Amount Summation Workflow

somdn_product_page

This n8n workflow is designed to demonstrate how to handle multiple data items and compute a total sum within a workflow. It starts with a manual trigger, allowing the user to initiate the process on-demand. The workflow then generates mock data representing different amounts in USD using a Function node. Subsequently, another Function node processes these data items to calculate the total sum of all USD amounts. This total is finally outputted as a JSON object.

**Step-by-step explanation:**

1. The workflow begins with a manual trigger node, enabling users to start the process interactively.

2. The ‘Mock data’ Function node creates three sample data items, each containing an ‘amount_USD’ value.

3. These items are passed to the ‘Summing function’ node, which iterates through the list, adding each amount to a total sum.

4. The final total sum is outputted as a JSON object with a single key, ‘total_value’.

**Use case:**

This workflow is useful for scenarios where you need to dynamically process multiple financial amounts or data points and calculate their total, such as summing transactions or expenses entered in a staging environment before further processing or reporting.

Node Count

0 – 5 Nodes

Nodes Used

function, manualTrigger