How to migrate your Power Automates to Azure Logic Apps and why?

It’s really easy to implement and use Microsoft Power Automate (previously named as Microsoft Flow) to support your or your team’s daily work. You can use different triggers and ready made connectors to automate processes, react to any input and move data in context of Microsoft solutions. Also hundreds of 3rd party software is supported and Power Automate alongside with other Power Platform products allows you to achieve complex solutions easily even without any actual integration or coding skills.

However Power Automates can easily be really complex ones and in some point (especially if you have developer or architect background) you may start to miss a better editor than browser based UI and maybe also a better support for versioning and deployment etc.

Then it may be correct time to check what Azure Logic Apps has to offer for you. Power Automate is actually a almost same thing as Azure Logic App but it’s separated to Office 365 context to be available within Office 365 licensing model.

Possible why’s to start using Azure Logic Apps?

  • Export / Import to create Logic App from Power Automate is fairly easy and automatic operation.
  • Starting to work directly with Azure Logic apps is easy if you have a basic knowledge from Azure components, available Azure subscription and contribute rights at least to one Azure resource group
  • All Azure extensibility options, monitoring, logging and other Azure services are available to support your Logic App approach – Azure Key Vault at least to mention to store you Logic App related secrets
  • You can actually use Visual Studio 2019 or Visual Studio Code to modify or deploy your Logic Apps (Azure Logic Apps Tools for Visual Studio or Azure Logic Apps extension are required)
  • DevOps (version control and automated deployment) and better manageability – Power Platform is advancing all the time but still it lacks complete DevOps story and capabilities
  • Logic App pricing model (pay-as-you-go / per action) differs from Power Automate (Licensing with seeded, per app or per user options) and it could be beneficial to compare these approaches in terms of overall costs
  • Allows usage of Azure Integration Accounts for approaches which can benefit from them

How to import Power Automate as Azure Logic App?

In my case Logic App is handling Microsoft Teams related data through GraphAPI on top of SharePoint custom list.

1. Go to Power Automate center and export your current Power Automate in JSON form – Open your Power Automate and select Export | Logic Apps template .json

2. Access your Azure portal and select “Create a resource” and find option “Template deployment” and select “Create | Build your own template in the editor”

3. Now upload your exported JSON file to editor with “Load file” option and press save to define necessary information for your Logic App

4. If deployment goes fine that’s all and you can start develop your Logic Apps in Azure. One step however is to re-authenticate Azure API connections (former Power Automate connections) used by Logic App in App Edit mode. All connections requiring re-authentication are highlighted and you have to enter credentials or select already created working connection.

5. Please note in addition to Azure default Logic app editor you can now use Visual Studio Code Or Visual Studio 2019 to connect and manage your Logic Apps. It seems this approach actually offer a more stable way compared to browsers to modify your Logic Apps.

6. Instead of Azure template deployment, you can also create a Visual Studio “Azure Resource Group” typed project and select Logic App template to connect and deploy Logic App to your Azure subscription. You can replace the highlighted file with your Power Automate export(s) and deploy your project to Azure directly.

Encountered issues & Considerations

  • All connectors from Power Automate are not necessary available in Logic Apps. You can import Power Automates that have equivalent connectors in Azure Logic Apps. For example, the Button trigger, the Approval connector, and Notification connector are specific to only Power Automate
  • By default for Logic Apps “Apply to each” loops enables concurrency which causes issues when using for Logic App variables with SharePoint Update item connector for example. So setting concurrency “Degree of Parallelism” setting from apply to each control settings to 1 helps but this will have a effect for performance
  • It seems that in my case multiple SharePoint API connections within single Logic App JSON definition causes error in deployment. If needed you can clear the extra connections from Power Automate UI and export the JSON manifest again. Alternatively you can manually clear these “extra references” from JSON (with Notepad++ for example) to get Power Automate imported correctly. It should be fairly easy to identify and change connection references from JSON file.

So if you have a wider workflow needs (real enterprise scenarios with premium connector needs for example) in your hands on Office 365/Azure cloud environment and you are thinking to use or already using Power Automate, it could be worth to check what Azure Logic apps has to offer and could this be more viable approach for you.