Skip to main content

Loop

Loop blocks let you iterate over a list of items. Only the Foreach loop type is supported. Open any automation in Automation from the top navigation and click Add Condition, Record or Action to add a loop block.

Using a loop

  1. Click Add Condition, Record or Action below any block.
  2. Select Loop.
  3. Set up the loop in the right panel.

Configuration

FieldDescription
Loop TypeThe type of loop. Only Foreach is available.
Array SourceSelect the array to iterate over. Must be an array variable available from a previous block (for example, a list returned by a Record block).
Item AliasThe name used to reference the current item in each iteration (for example, currentItem). Access fields using {{currentItem.field}}.

Examples

Iterate over fetched records

If you have a block that fetches a list of users, you can use a loop to send an email to each user.

Loop: For each user in fetchedUsers
Action: Send Email
To: {{user.email}}
Subject: Hello!
  • Conditions — Add logic inside or outside loops
  • Records — Fetch lists of records to iterate over