How can I exit a repeater and continue the flow of a scenario?

I have a scenario where I need several actions to be repeated X amount of times. X is decided based on input that the trigger webhook is receiving.
I set up the repeater with 2 modules after it, so that the 2 modules will repeat.
After X repetitions I want to add more actions that will run just once.
Is it possible to exit or break the loop and continue the normal flow of a scenario?

Welcome to the Make community!

If you don’t need the output bundles of the repeated modules, you could use a router immediately after the trigger module to run a separate route after the repeater module in the first route.

Alternatively, you can use any aggregator and select the repeater as the source module.

Aggregators are modules that accumulate multiple bundles into one single bundle. An example of a commonly-used aggregator module is the Array aggregator module.

2 Likes

Thanks for your reply, however I believe that I wasn’t fully clear on my issue.
Please see following screenshot


Based on the data that I am receiving I am creating X records on Fireberry and on Airtable. I want that after the creation of these records to send an email alert. If I will place the at the end of the scenario it will be sent X amount of times, but I want it to be sent only once, and only after the creation of all records.

Now while typing this reply I realized that perhaps my solution will be to create a filter after the airtable module to check if the repeater iteration equals X… Do you think that will solve the issue?
something like that:

Then option #2 as I described above will be your solution.

The Tools “Set variable” module is replaced by your Fireberry and Airtable modules, and then you put an Aggregator after that, but you select the source module as your Repeater. After your repeater has completed processing all the bundles, only then the aggregator module will continue (put your email module after the aggregator).

3 Likes

Fantastic!!
That is exactly what I needed. Thanks!
Can you perhaps explain how or why the aggregator is closing the loop?

2 Likes

It just waits until all the bundles have been collected from the source module.

3 Likes