“Do I really have to manually resubmit Power Automate flows that expired after 30 days, can’t I somehow do it automatically?”
If you built a few flows that expect some user input, some interaction, e.g. in a form of a task, you probably also noticed the run limitation. Power Automate flow won’t run for more than 29.5 days. Once it reaches this limit, it’ll stop. Nothing else will happen, even if it means leaving some mess behind.
But often you want the flow to finish, to do all the steps, meaning you have to resubmit the flow. Is it really necessary to do it manually though? Can’t the flow do it by itself?
Identify the long running actions
The first step is to identify which part of the flow is causing the delay. It was easy in the error handling solution using a Scope, but that approach can’t be used here. From the Scope perspective expiration is just another type of failure…

Failure is not the error you want to catch, you’re interested specifically in the expiration. That’s why you must find the responsible action(s) to handle them the right away.

Add the resubmit action
Once you identify the dangerous actions in the flow, it’s time to start “catching” their expiration. Add a parallel branch with actions that’ll run only if the action ‘has timed out’ (3 dots -> Configure run after).

You can do some cleanup in this branch, send an information email, but mainly resubmit the flow.
Power Automate has an action called ‘Resubmit Flow’ in the ‘Power Automate Management’ group of actions, that’ll do exactly what the name suggests.

It has 4 parameters, three of them available with an expression directly in the flow, the fourth one a bit harder to get.

If configured correctly, it’ll resubmit the current flow run every time the action runs.
But how to run it before the whole flow expires?
There’s a difference between expiring an action and the whole flow though. If the flow expires, nothing else will happen, no action will trigger. To trigger the resubmit you must expire the action before the flow itself.
Most of the Power Automate actions give you an option to define a timeout period (3 dots -> Settings -> Timeout). By adding a duration in the ISO 8601 format you can force a timeout at your will. It can be seconds, minutes, hours, days… yet in the flows you should never go over 29.5 days. I’d even recommend to set the timeout to 29 days maximum to have some space for complex flows.
29 days in ISO duration format:
P29D
29 days 12 hours in ISO duration format (the max. time when the flow will stop):
P29DT12H

With such configuration the action will expire before the flow, it’ll go into the time out branch, resubmit the flow, and terminate itself. A new instance of the flow will take over for another 29 days.

Summary
If your flows are failing because of the runtime, it’s a good idea to add automated resubmit. Unlike dealing with errors, where you always want to check the flow before resubmit, expirations won’t cause a loop of failures. Expiration means only that somebody/something didn’t do their tasks, often a human delay not related to the process. They just need more time, which you can give them if you automatically resubmit the expired Power Automate flow.
1 thought on “How to automatically resubmit expired Power Automate flow”