Loop Workflow

Loop Workflow

Loop Workflow lets you go through a list of items and perform a set of actions for each one automatically. Instead of handling each item manually, the loop repeats the same actions for every record in a JSON array.

5 (1).png

How It Works

Your data needs to be in a JSON array format like this:

[

  {

    "id": "001",

    "name": "Downtown Branch",

    "address": "123 Main Street, New York, NY",

    "phone": "+1 212-555-0101",

    "hours": "Mon-Sat 9am-6pm"

  },

  {

    "id": "002",

    "name": "Westside Branch",

    "address": "456 West Ave, Los Angeles, CA",

    "phone": "+1 310-555-0188",

    "hours": "Mon-Fri 10am-7pm"

  },

  {

    "id": "003",

    "name": "Uptown Branch",

    "address": "789 North Blvd, Chicago, IL",

    "phone": "+1 312-555-0174",

    "hours": "Mon-Sun 8am-8pm"

  }

]

The Loop Workflow takes that array and runs through it once per record. If you have 3 items, the actions inside the loop run 3 times, each time using data from a different record.

The Loop Item Field

Inside the loop, there is a special system field called Loop Item. This dynamically holds the current record's data on each pass, so the right information is always used at the right time.

6 (1).png

For example, inside your workflow you might send a message like this:

{{loop_item.name}}

{{loop_item.address}}

{{loop_item.phone}}

{{loop_item.hours}}

On the first loop it fills in Downtown Branch's details, on the second loop Westside Branch, and so on.

7 (1).png

Common Use Cases

  • Displaying a list of store locations to a user

  • Sending follow-up messages for each item in an order

  • Processing appointment slots from a booking array

  • Building dynamic product catalogs from a JSON response