Aggregate — Collects the items into one — fields into lists, or the whole items — turns many items into one. Twenty orders become one item with a list of order numbers, so one Slack message or one email can name them all, instead of twenty. It is the opposite of Split Out.
Who can do this
Workspace Admins and Editors, on every plan.
Steps
- Select + after the items to collect. In the step picker, open Data and select Aggregate.
- Choose Collect:
- Fields into lists (the default) — in Fields, type the field names, separated by commas, such as
order_no, total. Each becomes a list: the item that comes out hasorder_noholding every order number, andtotalevery total. - Whole items — the item that comes out has
items, a list of every item as it came in.
- Fields into lists (the default) — in Fields, type the field names, separated by commas, such as
- Optional: in Group by, put one field, such as
customer. One item comes out per customer, with that customer's values and how many items they had. - Select Run this step, then check Output.
Output
One item — or, with Group by, one per value of the field — with a list under each field you named, or items for whole items. A field named by a path, such as customer.name, gives its list under the last part: name.
With Group by, each item also has the group's value under the field's name and count, how many items were in the group — for example customer: Northwind Logistics, count: 4. Groups come out in the order their first item arrived.
Good to know
- It runs once for all the items that reach it. Inside a loop it collects that batch only.
- A list holds up to 10,000 values. More than that stops the step; use Group by, Limit the items first, or Loop Over Items to collect in batches. With Group by, the limit is per group.
- An item without the field adds nothing to that field's list, so two lists can end up different lengths. Empty text is kept. To keep each item's values together, choose Whole items.
- Group by compares values as text: 1499 and "1499" fall in the same group.
- To total or count instead of list, use Summarise.
- To turn a list into one line for a message, use Join a list — see Change, split or clean up text.
If something goes wrong
| What the run says | Why | What to do |
|---|---|---|
| A list would hold … values; Aggregate collects up to 10,000. Group them, or Limit the items first. | More than 10,000 items reached the step, or one group. | Add a Group by, or put a Limit or Loop Over Items before it. |
| Fields is empty when the step ran — an earlier step may not have given the value it names. | Fields into lists is chosen and Fields is empty. | Name the fields, or choose Whole items. |
| Needs setup: fill in fields. | Fields into lists is chosen and Fields is empty at publishing. | Fill it in, or choose Whole items. |