In some cases, you might want to create a loop in a Bridge workflow.
The most common scenario is building a workflow that should be repeated for many items, such as many rows in a sheet or many records in another system.
Another scenario is in a chat based interaction with a user.
Both can be solved in Bridge but in different ways.
Sometimes a trigger should cause a workflow to be run for multiple items at once. For example, you might want a workflow to run on a regular schedule to update multiple rows in a sheet.
To achieve this create one workflow that is triggered by the schedule and collects all the rows needed. This will be your parent workflow.
Add the module Run Child Workflow and enter the name of the workflow you want to run once for each row collected.
In the field Number of Runs you can specify the number of times to run the child workflow. If left blank the child workflow will run once. If you enter the reference to an array of data the child workflow will be run once for each entry in the array.
In the child, to reference the array data in that workflow, go to the Run Log and expand the Trigger data.
Repeated Chat Interaction
The second way to create a loop is when a workflow should repeat a question to a chat user but varying the question each time.
This can be achieved by creating a loop within the workflow. You do this by clicking on the module you want to end each iteration with, pressing down the ALT button (Option on Mac) while clicking on the module or state you want to circle back to.
For example, with the image below:
1. Click on Add Comment.
2. Hold down the ALT button (Option on Mac) and click on the state QuestionStatus.