Hi Team,
I would like to know if there is a way to limit the schedule flow to a specific number of times.
Let's say I have a flow that runs every day. I would like it to run 10 times and then stop. Please help.
Thanks.
Solved! Go to Solution.
Hi!
You mean a recurrence trigger based flow?
You can store nr of executions in an external repository (excel, CDS, sharepoint list, etc)
Now, everytime your triggee is executed, first step is to read the counter from external repository, then increment its value, add a Condition action block to evaluate if new counter value is greater than 10, now on the true branch add a Terminate action block. At the bottom of the flow, just after the Condition action block, place your current logic.
Hope this helps
Proud to be a Flownaut!
Hi again!
There is another approach without an externañ repository. So if you know the first date your flow is to be execute, you can design your flow to calculate current date execution by means of utcNow() wdl expression, then taking start date as reference, check if current date execution is the same or any of the 9 following days.
THis second approach is better explained here
In this case you can even move this logic to the trigger, by means of conditional trigger functionality... so if the condition is not met flow will not be executed. GReat explanation here
https://www.timlinenterprises.com/microsoft-power-automate-flow-trigger-conditions/
Hope this helps
Proud to be a Flownaut!
Hi!
You mean a recurrence trigger based flow?
You can store nr of executions in an external repository (excel, CDS, sharepoint list, etc)
Now, everytime your triggee is executed, first step is to read the counter from external repository, then increment its value, add a Condition action block to evaluate if new counter value is greater than 10, now on the true branch add a Terminate action block. At the bottom of the flow, just after the Condition action block, place your current logic.
Hope this helps
Proud to be a Flownaut!
Hi again!
There is another approach without an externañ repository. So if you know the first date your flow is to be execute, you can design your flow to calculate current date execution by means of utcNow() wdl expression, then taking start date as reference, check if current date execution is the same or any of the 9 following days.
THis second approach is better explained here
In this case you can even move this logic to the trigger, by means of conditional trigger functionality... so if the condition is not met flow will not be executed. GReat explanation here
https://www.timlinenterprises.com/microsoft-power-automate-flow-trigger-conditions/
Hope this helps
Proud to be a Flownaut!
Power Automate User Groups are coming! Make sure you’re among the first to know when user groups go live for public preview.
User | Count |
---|---|
45 | |
10 | |
9 | |
8 | |
7 |
User | Count |
---|---|
73 | |
22 | |
13 | |
11 | |
11 |