Let's POWER Automate

From no-code to low-code

Menu
  • Expressions
  • Filters
  • General
  • Application specific solutions
    • Dataverse
    • Excel
    • Forms
    • Outlook
    • Planner
    • Power Apps
    • SharePoint
    • Teams
  • Triggers
  • Ready to use solutions
    • Approval Process Template
    • Task Delegation App
    • The Ultimate Power Automate expressions cheat sheet
    • Power Automate HTTP requests to SharePoint cheat sheet
    • Power Automate HTTP requests to Graph API cheat sheet
  • ABOUT ME
  • Get help with your flow
  • POWER PLATFORM SERVICES
Menu

Building a flow to restore deleted Power Automate flows

Posted on November 5, 2023December 7, 2023 by Tom

“Oops, it’s gone. My Power Automate flow is no longer to be found, how can I see whether it was deleted and how to restore it?”


This article is motivated by one very stressful evening during the preparation of the approval template. While I was editing the flow to replace one environment variable, something happened. Something bad. Out of the blue, the flow was gone. Instead of a flow I spent tens of hours creating I saw an error message – the flow doesn’t exist. And I went into a panic mode. So this article is for me too, to not panic again in the future just because a flow goes missing.

Note: you must be an environment administrator to use this flow.

What happens to deleted flow?

When you delete a flow, it isn’t lost forever. It’s only “soft-deleted” and it stays in that state for 21 days. If you notice that a flow is missing in these 21 days, you can restore them. If it takes you longer you’re out of luck – the flow is gone forever.

I personally find it interesting that you can’t see and restore these flows through the Power Platform environment admin page, yet you can do it with another flow.

How to find and restore deleted flow

You can manage other flows from a flow through the ‘Power Automate Management’ group of actions. Additionally to the already used ‘Turn On Flow’, it has also an action ‘Restore Deleted Flow as Admin’.

Select the environment, select the flow, and restore it.

The small problem is that the flow doesn’t exist anymore – how can you select it from a dropdown…? You can’t.

You’ll have to add one more action, ‘List flows as Admin’. Add it to the flow and configure it to ‘Include Soft-Deleted Flows’.

Filter the results with ‘Filter array’ to find the flow by its name, and use the ‘Flow name’ (which is actually the flow id) to recover it.

Power Automate restore deleted flow

The flow will be restored, although turned off. Turn it on and you’re done.

Get daily overview of deleted flows

When reading about the 21 days after which flows are completely gone, you might think that it’d be nice to keep track of these flows. To avoid any surprises that a flow that’s running once a month won’t run anymore as it was deleted.

It’s doable with a scheduled flow using similar set of actions. Start with a daily trigger and list all flows as admin.

Since this time you’re interested only in deleted flows, and ideally those deleted the previous day, use a combined filter.

@and(equals(item()?['properties/state'], 'Deleted'),greater(item()?['properties/lastModifiedTime'], addDays(utcNow(), -1, 'yyyy-MM-dd')))

Create an HTML table with the flows and send yourself an email.

Power Automate restore deleted flow

This way you can keep track of all the deleted flows. You don’t have to guess their names as you’ll get them in an email. If needed, restore them with the first flow in this article.

Summary

It’s a bit sad that you can’t restore deleted flow directly from the admin portal, but luckily you can build a Power Automate flow to do it for you. This article explained two such flows. One flow to do the actual restoration, but you’ll need at least the flow name to do that. That’s why it’s helpful to build also the second flow, to keep track of every deleted flow, without the need to know its name to the last letter.


πŸš€ Master Power Automate

Join 2,000+ professionals getting actionable Power Automate tutorials, solutions, cheat sheets & tips every week.

No spam. Unsubscribe anytime.

6 thoughts on “Building a flow to restore deleted Power Automate flows”

  1. Nakul says:
    November 7, 2023 at 4:41 am

    Is there any similar flow to recover the deleted canvas app?

    Reply
    1. Tom says:
      November 19, 2023 at 2:04 pm

      Hello Nakul,
      I’ll find out probably once I accidentally delete one… πŸ™‚

      Reply
  2. Dan says:
    November 8, 2023 at 1:21 pm

    I learned something very useful today, excellent article Tom! πŸ™‚

    Reply
  3. Ram says:
    February 1, 2024 at 11:37 am

    Hello Tom, I love your blogs and a huge fan of yours. Did you ever create a flow to create back up and restore it ?

    Reply
    1. Jerome Rancourt says:
      February 7, 2024 at 9:34 pm

      Hi Ram,
      Actually, you don’t really need to bakup a sharepoint list because there is historic version where you could manage to restore it to a previous version.
      For excel file, i did a “back-up” flow that i send to myself by email in order to recover a lost or damaged excel file.
      I can’ backup a flow, but i use “PowerDocu” that create a word file that describe every action of my flow. This way I can recreate it in the image of my reference file.
      Hope this help !

      Reply
    2. Tom says:
      February 28, 2024 at 8:52 am

      Hello Ram,
      I did in the meantime, you’ll find them on this blog. πŸ™‚

      Reply

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

πŸš€ Master Power Automate

Join 2,000+ professionals getting actionable Power Automate tutorials, solutions, cheat sheets & tips every week.

No spam. Unsubscribe anytime.

Still exchanging emails to get things approved?

Use the Approval Process Template and the Task Delegation App to skip the hard part and deploy an automated, fully functional approval solution on a SharePoint list in minutes! And then the next one, and the next one...

Approval Template Preview ✨ Learn more ✨

Turn ideas into flows with ease!

Grab the complete Power Automate Cheat Sheet Bundleβ€”everything you need to master expressions, SharePoint HTTP calls, and Graph API in Power Automate.

Cheat Sheet Bundle Preview ✨ Get the Cheat Sheets

Didn't find what you were looking for?
Need to adjust a solution to fit your needs?
Or would you just like to get an assistance from somebody with thousands of hours of experience with Power Automate?

Power Automate blogs worth visiting

Damien Bird
Dennis (Expiscornovus)
Paul Murana

©2025 Let's POWER Automate | Theme by SuperbThemes