Skip to content

Loop

Loop takes a list of records and hands them one at a time to the components you connect after it. When those components finish with a record, the loop moves on to the next one, until the whole list has been covered. It is always used together with Loop End, which closes the loop.

Use it when you need to repeat several steps for each item in order, one after another, for example when each step depends on the previous one or when you want to send something for every record.

When to use it

  • Send a personalized email to each contact in a list.
  • Review the day’s orders one by one and log each one in another tool.
  • Process several documents in order, applying the same steps to each one.
  • Go through lists inside lists, by placing one loop inside another.

Configuration

FieldWhat it does
DataThe list of records you want to go through. A single record is also accepted.

Output

  • Item: the record for the current round. Connect it to the first component of the steps that repeat.
  • Done: fires when every record has been covered and delivers the list that came back to the loop from Loop End. Connect it to whatever should happen at the end, such as a notice that the process is finished.

How to set it up

  1. Connect the list to Data on the Loop.
  2. Connect Item to the first component of the steps you want to repeat.
  3. Connect the last of those steps to the Data input of Loop End.
  4. Connect the Item output of Loop End back to the Loop to close the cycle.
  5. Connect Done to whatever should happen when the loop finishes.

Example

You have a sheet with 30 customers who must receive a payment reminder. You connect the sheet to Loop. Each customer leaves Item towards an agent that writes the reminder and an email component that sends it. The email component connects to Loop End, which goes back to the Loop. Once all 30 have been sent, Done triggers a message to the person in charge of collections.

Good practices

  • If you only need to apply the same operation to the whole list and the order does not matter, try the component’s own Batch Mode first: it processes all items at once.
  • Test with a short list first to check that the steps inside the loop work.