Variables

Collect Block

Collect adds a value or list of values to a collection variable and can deduplicate by a key.

At a glance

Best for
List accumulation
Input
Value or list variable
Deduping
Optional unique key
Error handle
No

What it does

Collect builds up a list as a Flow runs. Missing or non-list targets start as an empty list.

A lone variable reference preserves its type. If it resolves to a list, Collect spreads its items into the collection.

Use it when

  • Accumulate items across Loop iterations.
  • Merge rows from several extraction steps.
  • Deduplicate objects by a stable field.

Do not use it when

  • You only need to set one variable; use Set Variable.
  • You need file output; use Create Spreadsheet or Save File after Collect.
  • Items do not have a stable key but deduplication is required.

Settings

Collect needs a target list variable, a value to add, and optional duplicate and maximum-item behavior.

Target variable

Required: Yes
Variables
Variable name
Description
List variable to append to.

Value

Required: Yes
Variables
Yes
Description
Value or list of values to add.

Unique by

Required: No
Variables
No
Description
Dot-path key used to deduplicate object items.

Duplicate strategy

Required: No
Variables
No
Description
Keep first, keep last, or merge non-empty values.

Max items

Required: No
Variables
Yes
Description
Caps how many items can be collected.

Outputs

Collect updates the target list and reports collection stats.

{{targetVariable}}array

Updated collection list.

statsobject

Counts for added, skipped duplicate, updated, total, and cap status.

Example Flow

Collect is useful inside loops or after several branches produce compatible items.

  1. Create or extract item values.
  2. Collect them into one list.
  3. Export the final list after the loop or branches finish.

Errors and fixes

Start with symptoms visible in the editor or Inspector, then check the earliest Block that produced the wrong page state, variable, or output.

Duplicates still appear.

Check
Check the Unique by path and whether the key is non-empty on every item.
Fix
Use a stable key field or adjust duplicate strategy.

The list stops growing.

Check
Check Max items and cap status.
Fix
Raise or remove the cap if more items should be collected.

Local and cloud runs

Local and cloud runtimes both support spread-list collection and unique-key deduplication.