You are here:
Loop Element
Start a loop path for iterating over items in a collection variable. For each iteration, the flow temporarily stores the item in the loop variable. To run actions on each item’s field values, use other elements in the loop.
Required Editions
This video explains how a loop works in a flow that examines and runs actions on each item in a collection. The video also covers how to update or delete the evaluated data.
View this video in a separate tab.
A collection is a list of items, such as field values or email addresses. A loop uses a loop variable to store the values for the current item in the collection. When the loop finishes examining an item, the loop copies the field values for the next item into the loop variable. To reference each collection item in elements along the loop path, use the loop variable. To keep changes made along the loop path, add the loop variable as an item in a new collection variable. For example, if you're looping through contact records and have an assignment element that updates a field on the Current Item from Loop contact, save that new value before it gets overwritten by the next record's values. To save the updated record field value, after updating the field, add the Current Item from Loop record to a record collection called ContactsToUpdate. Then, after the loop, use an Update Records element to update everything in the ContactsToUpdate record collection.
| Field | Description |
|---|---|
| Collection Variable | The collection that you want to loop through. This field accepts any collection variable. |
| Direction | Determines whether the flow starts with the first item or the last item in the collection variable. |
| Loop Variable | The variable that the flow uses to contain the current item’s values during a loop iteration.
|
- Simultaneously Update Fields in Multiple Records Example
This example creates a flow that updates fields in multiple records by reassigning account ownership based on business rules.

