Add to Collection
Use the Add to Collection step to append an item to a collection that was created by a Create Collection step earlier in the flow. Each execution of Add to Collection adds exactly one entry; place the step inside a loop or add several instances to build up the collection incrementally.
Typical use cases include:
- Appending a record reference found by a previous step to a collection for later batch processing.
- Building a list of formatted text values that will be joined into an email body or API payload.
- Collecting results from multiple branches of a flow into a single collection.
Configure the step
Open the flow editor, add Add to Collection, and fill in the configuration card.
Description
- Purpose: Explain what this particular addition does in the flow.
- When to fill it: Always. The description is shown in the editor and execution history.
- Tips: Be specific, for example,
Add matched customer to recipients.
Collection
- Purpose: Selects which collection to append to. Must be a SmartField placeholder pointing to the output of a Create Collection step (e.g.
{{create-coll_test}}). - When to fill it: Required. The selector cannot use a dotted path — collections are always top-level outputs of a Create Collection step.
- Tips: Use the assist-edit (...) or
Alt+Sto open the SmartField picker and paste the placeholder as-is.
Resolved type
- Purpose: Read-only. Shows the element type and (for Reference collections) the linked table that AutoFlow derived from the Collection placeholder. Use it as a sanity check before configuring the Value.
- When to fill it: Auto-derived. If the field is empty or shows a warning, the Collection placeholder doesn't resolve.
Value
- Purpose: The item to append. The expected shape depends on the resolved collection type:
- Value collection — any text. Supports
{{name}}placeholders that resolve when the step runs, so you can mix literal text and SmartField references (e.g.Customer {{customer.No}} – {{customer.Name}}). - Reference collection — a single SmartField placeholder pointing to a Reference SmartField that links to the same table as the collection (e.g.
{{find-records-in_results}}for a Sales Header collection when FindRecords is configured for table 36).
- Value collection — any text. Supports
- When to fill it: Required.
- Tips: Use the assist-edit (...) or
Alt+Sto open the SmartField picker. The configuration card warns when the placeholder doesn't resolve, when it resolves to the wrong type (Value vs. Reference), or when the linked table doesn't match the collection's table.
Outputs
Add to Collection does not produce its own outputs. It appends data to the collection created by the corresponding Create Collection step. Downstream steps should reference the Create Collection output to access the full collection.
Best practices
- Trust the resolved type: AutoFlow derives the element type from the collection placeholder. Don't try to mix Value text into a Reference collection — the configuration card surfaces a warning and the flow refuses to publish.
- Order matters: Items are indexed sequentially (0, 1, 2, …) in the order the Add to Collection steps execute. Design your flow accordingly if order is important.
- Use in loops: When processing a set of records, place Add to Collection inside the loop body to collect each result automatically.