Use a forever control to repeat a step in a loop until it meets the required conditions.
The Forever control has the loop parameter index which is the index of the current loop iteration. It is an integer that starts at 0.
Once the condition you set is met, the loop end control allows the automation to exit the forever control, and continue on the automation canvas.
Enter an output name.
Set a value for the output parameter.