Accumulate¶
Builds and updates an accumulation container by appending a new value each time it runs. It accepts any value type to add, and combines it with an existing accumulation or starts a new one if none is provided. None values are skipped, leaving the accumulation unchanged or initializing an empty one.

Usage¶
Use this node to progressively collect values across your workflow, such as gathering items generated over multiple steps or iterations. Feed the prior 'accumulation' output back into the node while providing a new 'to_add' item each run. Pair with other accumulation nodes (e.g., Head, Tail, To List) for inspection and transformation.
Inputs¶
| Field | Required | Type | Description | Example | 
|---|---|---|---|---|
| to_add | True | WILDCARD | The value to append to the accumulation. Accepts any type. If None, the node does not add anything. | 42 | 
| accumulation | False | ACCUMULATION | An existing accumulation container to extend. If not provided, a new accumulation is created. If a non-ACCUMULATION value is supplied, it becomes the first item. | {'accum': ['a', 'b']} | 
Outputs¶
| Field | Type | Description | Example | 
|---|---|---|---|
| accumulation | ACCUMULATION | The updated accumulation container with items under the 'accum' key in order of insertion. | {'accum': ['a', 'b', 'c']} | 
Important Notes¶
- ACCUMULATION is a special container shaped like a dictionary with key 'accum' holding a list of items.
- None inputs for 'to_add' are ignored. If no prior accumulation exists, the result is an empty accumulation.
- If 'accumulation' is provided as a non-ACCUMULATION value, it is treated as the first item and combined with 'to_add'.
- Item order is preserved: new items are appended to the end.
- On internal errors, the node returns an empty accumulation and logs the error.
Troubleshooting¶
- Unexpected empty result: If 'to_add' is None and no prior accumulation is provided, the result is an empty accumulation by design.
- Not appending as expected: Ensure 'accumulation' is a valid ACCUMULATION object (e.g., {'accum': [...]}) to strictly append; otherwise, a non-ACCUMULATION input will be treated as the first list element.
- Type mixing concerns: This node accepts any value type; if downstream nodes expect a specific type, validate or convert items after accumulation.
- Missing items when passing None: None is intentionally skipped. Provide a valid value in 'to_add' to append.