Looping (Iterators)

If you ever need to work with a Lists of items in a Relay.app workflow (e.g. a list of email attachments or a list of rows that were found in the spreadsheet), an Iterator is a tool that lest you take an action for each item.

To use an Iterator, you need to do two things:

  1. Select the list that you want to iterator over (e.g. the output of a Find step or AI step)

  2. Configure the actions that should happen for each item

Creating the Iterator

To create an Iterator, select it from the 'Flow Control' menu:

Selecting Iterator in the Flow Control menu.

Selecting the Items

Once you've added the iterator, the first thing you need to do is to select the list of items, which will typically be the output of one of your previous steps.

Selecting the list from my previous step

[Optional] Choosing a subset of the List

In most cases, you 'll want to apply the same actions to every element in the list, but in some cases, you'll want to apply the action to a specific subset of items in the list. To do that, change 'Run steps for' to 'A subset of items in the list' and configure your filter criteria.

Running the Iterator for a subset of items in the list

Configuring the Actions

Finally, you can set up the actions inside the iterator by pressing the add step button inside the iterator block.

Once you add your steps, you'll need to access the data from the current iteration in your automations. To do that, make sure you're selecting a value with the iterator icon.

Using the email from the current iteration to draft the reply.

Once you've added your automations into the iterator block, you're done!

Video Demo

Here's a very short video demo of how to set one up.

Last updated

Was this helpful?