All Content
Timespan
explore our new search
Restore Flow with your own PowerApp
Power Apps
Oct 16, 2022 11:51 AM

Restore Flow with your own PowerApp

by HubSite 365 about Damien Bird

Power Platform Cloud Solutions Architect @ Microsoft | Microsoft BizApps MVP 2023 | Power Platform | SharePoint | Teams

Citizen DeveloperPower AppsPower SelectionPower SelectionPower Automate

Microsoft published an article on how to recreate an accidentally deleted flow via PowerShell. Damien Bird MVP shows how the whole thing works via a PowerApp.

"If you've ever deleted a flow and required assistance from Microsoft to restore it, you're in luck. Non solution aware flows can now be restored via PowerShell but in this video I demonstrate how you can turn a PowerShell script into an Azure RunBook, which in turn can be called from Power Automate and Power Apps."

Damien:

"Thanks for sharing. After I made this video the product team released native actions to restore. But I’ve kept the video there as it demonstrates the use of PowerShell, Azure Runbooks with PowerAutomate/ PowerApps. Lots of potential use cases."

Native Feature:

https://learn.microsoft.com/en-us/power-automate/how-tos-restore-deleted-flow

Restore deleted flows with PowerShell

Prerequisites

  • Install PowerShell cmdlets for PowerApps.
  • You must be an environment admin.
  • There must be an execution policy set on your device to run PowerShell scripts.

Restore deleted flow

  • Add-PowerAppsAccount
  • Get-AdminFlow -EnvironmentName 41a90621-d489-4c6f-9172-81183bd7db6c -IncludeDeleted $true
  • Get-AdminFlow Testing -EnvironmentName 3c2f7648-ad60-4871-91cb-b77d7ef3c239
  • Restore-AdminFlow -EnvironmentName Default-55abc7e5-2812-4d73-9d2f-8d9017f8c877 -FlowName 4d1f7648-ad60-4871-91cb-b77d7ef3c239

Read the full document on Microsoft Docs