How can I use a loop within my automation ?

Moosend's Automations allow you endless flexibility, enabling you to design the coolest, most effective automations, in the quickest and easiest way possible! Sometimes, it may make sense for you to create a loop between two steps in your workflow, in order to further optimize the way in which it operates. 


Let's see how you can do that!


1. Click and hold the arrow icon at the bottom of the step in your workflow which you wish to link to an earlier step in order to create a loop.


2. Keeping the icon clicked, drag your cursor back in your workflow, and release it  (drag and drop) onto the earlier step that you wish to link the end of your workflow to.




3. In the pop-up window which appears, set the duration of your loop.

You have two options:


i. Click on the Stop looping when tab (the default option) and type in the number of minutes, hours, days or months (select the appropriate option from the drop-down menu) that you wish the loop to continue for.

ii. Alternatively, click on the Loop for at most tab, and then, in the appropriate field, type in the maximum number of times that you wish the loop to occur.


4. Click on the Save button to save the loop you just created.


Note that hovering your cursor over the looped step at the end of your workflow, colors the loop bright green, so that it may be more easily discerned within your workflow.


You have now created a loop between these two steps of your automation's workflow, which means that the steps included between them, will be repeatedly run for each user, for as long as you have set them to! In our example, the loop will run for a maximum of 5 times and will check if the Number of campaigns is more than 2. 

Don't forget to check out the super-easy way to merge two of the steps contained within an automation, as well!