Use the loop action to repeat parts of your workflow in Automator on Mac
Use the loop action to run a portion of a workflow repeatedly. You can set the action to loop a specified number of times or to have it run for a set amount of time.
The loop action repeats actions that come before it in the workflow. Actions that are placed after the loop action in the workflow don’t run until the conditions have been met for the workflow to exit the loop.
Click Actions in the top-left corner of the Automator window, then click Utilities in the Library.
Drag the Loop action into your workflow, then do one of the following:
To have a dialogue appear when the action runs asking the user whether to loop or continue, choose “Ask to continue”.
To automatically repeat without asking, choose “Loop automatically”, enter a number in the “Stop after” field, then choose the type of condition where you want the workflow to stop repeating.