For Each

Creates a loop that runs for each object in an array.


The For Each Node can be used to iterate an array of objects.

In the example above, we have a hypothetical API Workflow that is configured to output on a POST method call. The For Each Node is inputted at the loop input with an array of email addresses. For each item in the array, the output iteration is called. The execution path after the iteration output must come back to the loop input to complete the iteration. In our example, we send an email for each email address in our array. After all records in the array are processed, the For Each Node outputs on done, completing its job.

The For Each Node is forgiving on input. If you a supply a single object to the loop input instead of an array, the For Each Node will simply output the object on the iteration output, then output on done once loop inputs again.

For more ways to manipulate, filter, select, and more on arrays, check out the Array Operations Node.