Search K
Appearance
Appearance
The Collection Operations node allows workflows to create, manage, and manipulate in-memory collections (such as lists of objects, strings, or numbers) dynamically during execution. It provides a simple way to initialize collections, add or remove elements, and query or serialize them for downstream tasks.
This node is designed for scenarios where you need to:
It supports most basic collection manipulations found in common programming environments.
| Operation | Description |
|---|---|
| Initialize | Creates a new collection variable of a specified type (e.g., List<string>). |
| Add | Adds a single value to an existing collection. |
| AddRange | Adds multiple values (from another collection or array). |
| Remove | Removes a specific value from the collection (first match). |
| RemoveAt | Removes an item at a specific index. |
| Clear | Removes all elements from the collection. |
| Count | Returns the number of items in the collection. |
| Contains | Checks if a given value exists in the collection. |
| Get | Returns the item at a specified index. |
| GetAll | Returns all elements of the collection. |
| Join | Joins the collection into a single string, separated by a specified delimiter. |
| ToJson | Serializes the collection into a JSON string. |
| Label | Type | Description | Required | Visible When |
|---|---|---|---|---|
| Operation | Picklist | The operation to perform. | ✅ | Always visible |
| Collection Name | Text | The variable name for the collection (used to reference it later). | ✅ | Always visible |
| Collection Type | Picklist | Type of collection to create. Options: List<object>, List<string>, List<int>, List<double>. | ❌ | Initialize |
| Value | Text / Object | The value to add, remove, or check for. | ❌ | Add, Remove, Contains |
| Values | Text / Array | Multiple values to add at once (e.g., ["A","B","C"]). | ❌ | AddRange |
| Index | Number | The index position for retrieving or removing an element. | ❌ | RemoveAt, Get |
| Separator | Text | The character(s) used to join list elements. Default: , . | ❌ | Join |
| Output Variable Name | Text | Optional variable name to store the result of the operation (e.g., count, joined string, JSON, etc.). | ❌ | Visible for all operations |
Depending on the operation:
| Operation | Output Type | Description |
|---|---|---|
| Initialize, Add, AddRange, Remove, RemoveAt, Clear, GetAll | Collection | Returns the updated list. |
| Count | Integer | The total number of elements. |
| Contains | Boolean | true if the value exists, otherwise false. |
| Get | Object | The value at the specified index. |
| Join | String | The concatenated string result. |
| ToJson | String | JSON string representation of the collection. |
If Output Variable Name is provided, the result will be stored in that variable for use in subsequent nodes.
Initialize →
InitializeMyListList<string>Add →
AddMyList"First Item"AddRange →
AddRange["Second","Third","Fourth"]Count →
CountItemCountResult: MyList = ["First Item", "Second", "Third", "Fourth"]ItemCount = 4
Join →
JoinMyList, JoinedTextToJson →
ToJsonMyListMyListJsonResult:
JoinedText = "First Item, Second, Third, Fourth"MyListJson = ["First Item","Second","Third","Fourth"]Operation and Collection Name must be provided.Get or RemoveAt, the index must exist in the list."Unsupported operation: <operation>".List<int> or List<double>).CollectionOperations is often paired with Loop, Condition, or DataOperations nodes for more complex automation logic.| Feature | Description |
|---|---|
| Purpose | Manage and manipulate lists and collections dynamically during workflow execution. |
| Common Uses | Accumulating data, filtering lists, joining strings, serializing arrays. |
| Key Inputs | Operation, Collection Name, Value/Values, Output Variable Name. |
| Outputs | Modified collections or computed results (count, boolean, string, JSON). |
✅ Example Use Case: Combine with a Loop Node to aggregate results from repeated API calls, build a list of items, and convert the list to JSON before sending to another service.