Restore Deleted Flows using Power Automate

Introduction

If you or someone else accidentally deletes a non-solution or solution flow, you can restore it within 21 days of deletion.

There are two ways you can restore deleted flows.

Use the Power Automate Management connector to restore the deleted flows.

You can restore a deleted non-solution or solution flow within 21 days of deletion using Power Automate. A non-solution flow is a flow that wasn't created inside a solution. As an admin, all you need is a button flow with two Power Automate management connector actions—List Flows as Admin and Restore Deleted Flows as Admin.

Let's see the step-by-step solution for this.

Step 1. Build a manual flow with a button trigger.

Button trigger

Step 2. Add the List Flows as Admin action.

  1. Select New Step.
  2. Search for Power Automate Management Connector or List Flows as Admin action.
  3. Select the List Flows as Admin action.
  4. In the Environment dropdown menu, select the environment the flow was originally deleted from.
  5. In the Include Soft-Deleted Flows dropdown menu, select Yes.
    Environment dropdown menu

Step 3. Run the flow to note the flow name of the flow you want to retrieve.

  1. Run the flow.
  2. Expand the flow run.
  3. Expand the raw OUTPUTS/value of the List Flows as Admin action.
  4. You'll see all the flows in that environment you have access to as an admin, including the ones that are soft deleted.
  5. Using the "displayName" among other flow metadata, identify the flow you're trying to recover and note the name in the "name" field.
    DisplayName

Step 4. Add the Restore Deleted Flows as Admin action and run the flow.

  1. Add the Restore Deleted Flows as Admin action from the Power Automate Management Connector.
  2. In the Flow field, enter the name value from step 3.
    Flow field

Step 5. After a successful run, the flow will be restored in environment flows. TestRestore is the flow that will run to restore the flow and Get Property is the flow that we have restored.

Get Property

Note

  1. The steps in this article apply to both non-solution and solution flows.
  2. Flows that were deleted more than 21 days ago can't be recovered. Both restore methods (PowerShell script and Power Automate Management connector), as well as Microsoft Support can't help to restore them.
  3. After you restore a flow, it defaults to the disabled state. You must manually enable the flow, per your requirements.


Similar Articles