// make.com integration
The Group & Aggregate Array module groups an array by a field and calculates sums, averages, counts and more in one step. It replaces the classic Iterator + Aggregator chain in Make.com with a single module and a single operation.
You pass in an array, choose a field to group by, and define one or more aggregations. The module returns one collection per group, each containing the group key, the item count, and one result field per aggregation.
Because everything happens inside one module call, the whole aggregation costs one operation, no matter how many items the array contains. The equivalent Iterator + Aggregator pattern costs one operation per item, so a 500 item array would burn 500+ operations. This module always costs 1.
| Field | Description | How to use it |
|---|---|---|
| Connection | Links the module to the CustomJS service | Select or create a connection using your API key |
| Items (Array) | The array to aggregate | Map an array from a previous module directly, or paste a JSON string. Both work |
| Group By Field | The field to group items by | Use dot notation for nested fields, e.g. customer.name. Leave empty to put everything into a single group |
| Aggregations | A repeatable list of calculations to run per group | For each entry, pick an Operation (Sum, Average, Min, Max, Count non-empty, Count distinct, First, Last, Collect values, Join as text), a Field as a dot path (e.g. order.total), and optionally an Output Key to name the result field. Without an Output Key the result is named operation_field, like sum_total |
| Deduplicate By | Removes duplicate items before aggregating | Provide a field path. Items with the same value at this path are reduced to one before any grouping happens |
| Include items per group | Adds the raw items of each group to the output | Boolean, default off. Turn it on if a later module needs the original items of each group |
| Sort groups by | Orders the resulting groups | Enter a result field name such as key, count or sum_total, then pick a Sort direction (Ascending or Descending) |
Say a previous module returns a list of orders and you want revenue per customer:
Input (Items):
[
{ "customer": { "name": "Acme Corp" }, "total": 120.50, "status": "paid" },
{ "customer": { "name": "Acme Corp" }, "total": 79.90, "status": "open" },
{ "customer": { "name": "Globex" }, "total": 300.00, "status": "paid" }
]
Settings:
customer.nameSum, Field total, Output Key sum_totalCount distinct, Field status, Output Key status_countOutput (Groups):
[
{ "key": "Acme Corp", "count": 2, "sum_total": 200.4, "status_count": 2 },
{ "key": "Globex", "count": 1, "sum_total": 300, "status_count": 1 }
]
| Output | Description |
|---|---|
| Groups | An array of collections, one per group. Each contains key, count, plus one field per aggregation |
| Group Count | How many groups were created |
| Total Items | How many items were processed after deduplication |
| Removed Duplicates | How many items were removed by Deduplicate By |
"19,90", so European decimal commas do not break your sums.See the Make.com integration overview for setup instructions, and check out the other utility modules: AI JSON Parser, Parse Localized Number, Format Date & Convert Timezone and File to Base64. For a full walkthrough with real scenarios, read How to group and sum arrays in Make.