Alert! Your flow is not running

Automatically re-enable flows that were suspended in Power Automate

Do you want to re-enable flows that were suspended automatically? Have you noticed that flows that aren’t running are automatically switched off?

Switched off flows

This can be very annoying! you have a flow that doesn’t run very often and after 30 days these flows are being switched off!

I’ve never understood this feature and even wore, as far as I know there is no way of disabling the disabling of the flows.

So, how do we stop this or avoid flows not running and being stopped?

Re-enable flows

I was thinking that we could just create a flow. Actually, maybe we should create two flows to re-enable flows that have been stopped.

Why two?

Well, what if my flow doesn’t run for 30 days? Alternatively I can schedule my re-enable flow to run daily and I will not have a problem.

Building the Re-enable flow

I’m going to create a scheduled flow that will ruin daily.

Automatically re-enable flows that were suspended in Power Automate Microsoft Power Automate created scheduled flow to re enable flows

Then I’m going to collect all the flows that I’ve got using the Get Environments and the List Flows as Admin actions.

List My environments

From the output we can now see some of the details of my flows.

Automatically re-enable flows that were suspended in Power Automate Microsoft Power Automate Output list flows action

Ok, that is good but that gives me a lot of data to process. A typical mistake to now make id to extend that apply to each with another apply to each so that we nest our apply to each steps. Unless you want to make a lot of coffees, you better use the Pieter’s method.

We will only need the flow name, the environment name and the status. Using the select I’m just going to create records for these three properties.

Automatically re-enable flows that were suspended in Power Automate Microsoft Power Automate image

Looking in the run mode this will give us an array of just the properties that we want.

Automatically re-enable flows that were suspended in Power Automate Microsoft Power Automate image 3

However we are not interested in the started flows, we just want to ones that have been suspended. Flows that have a stopped status were stopped by someone suspended flows are flows that were stopped by Microsoft because they didn’t run or they caused too many failures.

To get just the suspended flows I’m going to add a filter, just before the select action.

Automatically re-enable flows that were suspended in Power Automate Microsoft Power Automate image 4
Automatically re-enable flows that were suspended in Power Automate Microsoft Power Automate image 5

All we need to add in the Compose is the following code:


Note that you will have to type this as the dynamic content will not show the out of scope content.

Ok, I could still transform my json from that compose a bit, but I’m going to be lazy this time. Just a nested apply to each to process the flows for each environment and switch them back on.

The flow part of this will look like this. Using the turn on flow action

re-enabled flows

There are 4 pieces of code here. in the Apply to each 2:


In the apply to each 3 :


In the Turn On flow:


and for the Flow :


And as a result all my flows have been re-enabled within a minute.

More thoughts

You could of course also add an email telling the users that the flow was suspended by accident and that they can ignore that email that was sent out to them.

23 thoughts on “Automatically re-enable flows that were suspended in Power Automate

  1. I just started receiving notifications this week that some of my manual flows have been turned off because they hadn’t been run. This info came at the right time for sure. Thank you!

  2. Hi Pieter. Thank you for sharing this!

    However I’m getting a forbidden error on “Turn On Flow” action. Like this:
    {“code”:”ConnectionAuthorizationFailed”,”message”:”The caller with object id ’63ec116a-6408-4330-bc28-b5e3ff689011′ does not have permission for connection ‘ceb4cd77-d6ae-4c12-b3ef-ff49e89a3f4c’ under Api ‘shared_logicflows’.”}

    I have Power Platform admin and Power BI Administrator roles.

      1. But the purpose of this flow is to re-enable flows suspended by Microsoft for users running under Microsoft 365 license. If I buy Power Automate license, my flows will not be suspended anyway.

      2. It looks like you would need premium to do this. I would need to look into that ownership thing. Potentially if the flow can take ownership of other flows then that might work.

  3. This solution is great if you want ALL of your suspended flows to be re-enabled. I create a lot of “proof of concept” type flows which – if suspended – I wouldn’t want to re-enable. What I ended up doing was creating a list in MS Lists to “inventory” all of my flows and track their status. I have a yes/no column in that list labeled “Mission Critical” which I set to Yes for “production” flows. This lets me run a daily check of only those flows and re-enable them if they are suspended.

    The only piece of data I can’t seem to find a way to get is the timestamp of the last run of a flow (it would be useful to have in that list). This isn’t included in the “Get flow” output. I’ve suggested adding it in the Flow Ideas forum in the Power Automate Community, but who knows if it’ll ever get picked up.

    1. It would be useful if run data could be enabled. I am quite sure that John Liu’s tools to manage flows will get the run details. So that must mean that the APIs can be used to develop what you want.

  4. Hi Pieter, I want to achieve similar functionality but the difference is- for a particular solution in a particular environment. Can you please suggest something if it is feasible? Thanks.

  5. Hi Pieter, Thankyou for sharing this.
    I have a similar requirement but the difference is I want to do it for the flows in particular solution & particular Environment. I am still learning Power automate, so not sure if this is feasible.
    Can you please shed some light on this if this is achievable. Thanks.

  6. Dear Pieter, thank you for sharing this wonderful process! I have implemented exactly the same way and the flow is running successfully. In first run, it enabled one suspended flow as well. However some flows suspended after that, didn’t get enable. Any idea why is that? they are in other users account..

  7. Hi Pieter, thanks for the prompt reply! The flow finds the flows available only in selected connection account (which is a Global Admin account). I am assuming that, since we are using ‘List flows as an Admin’ action, it will list all the flows in our environment. Correct me if I am wrong 🙂
    Do I need to assign any specific license to this account? it has a per-user plan of power automate.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

%d bloggers like this: