Loop for each

Use loop actionsA tool for building the processes, logic, and direction within workflows. to repeatedly run a set of child actionsUsers who have successfully verified their domain ownership using the verification code from Nintex Workflow Cloud.. The Loop for each action iterates through each item in a collectionA variable containing multiple items, such as email addresses. Collection variables are useful for storing and operating on query results. For example, you can set up collection variables for names, email addresses, and index values to store results from querying a list. You can then loop through items in a particular collection variable (names, emails, or index values). variable, running its child actions during each iteration. When all items have been processed, the workflow proceeds to the next action after the Loop for each container.

With the SharePoint Online actions, you can use Loop for each action to process collection items within ObjectsA variable that groups several related variables of any type into a hierarchical structure. Objects can contain other Objects..

If you are looking for a particular item, you can optionally stop the Loop for each action when that item is found.


To master the use of the Logic and flow actions, take the SELF: Workflow Complex Logic - Nintex Workflow Cloud course in Nintex University.

Before you start 

Configure the Loop for each action

Note: Actions using the Loop for each variable(s) should be used only within that Loop for each action construct. Moving such associated actions outside the loop construct will cause configuration errors.

You can add the Loop for each action to a workflow for the following scenarios:

Stop processing the collection early

You can skip the rest of the items in the collection once you've found what you need. For example, if your goal is to find the item "425-555-1234" within a collection of phone numbers, then you can stop processing the collection variable once the item is found.

  1. Click the Loop for each action.

  2. For Stop processing, select a Boolean variable.

    Note: By default, a single Loop for each action can process a single target collection containing a maximum of 250 items.

  3. Add logic to your workflow that sets this variable to Yes when the condition for stopping is achieved.

    For example, within the loop construct of the Loop for each action, you might add the Branch by condition action, with the Set a variable action on the Yes branch, where the condition is satisfied when you find the item you want. In the Set a variable action, you can set the Boolean variable to Yes.