You can export your Flows in Power Automate and import them in Logic Apps.

Export flows in Power Automate

I really like Power Automate, but I like Azure Logic Apps sometimes better. Huh? Aren’t they the same or at least similar?

Indeed they are similar, but I quite like having all my flows in a single place and therefore I was pleasantly surprised  when I noticed the export to Logic Apps template option today:

Export flows in Power Automate

So I exported my flow.  I went to Microsoft Azure Logic Apps and then I struggled to find and options. It’s not available when you try to create the logic app:

Export flows and import them in Azure Logic Apps.

Also, if you first create the Logic App and then try to find an import option:

Export flows and import them in Azure Logic Apps.

It is simply not there. then I had a look at the export file:

{"$schema":"https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
"contentVersion":"1.0.0.0",
"parameters":{"logicAppName":{"type":"String","metadata":{"description":"Name of the logic app."}},"logicAppLocation":{"defaultValue":"[resourceGroup().location]","allowedValues":["eastasia","southeastasia","centralus","eastus","eastus2","westus","northcentralus","southcentralus","northeurope","westeurope","japanwest","japaneast","brazilsouth","australiaeast","australiasoutheast","southindia","centralindia","westindia","canadacentral","canadaeast","westcentralus","westus2","[resourceGroup().location]"],"type":"String","metadata":{"description":"Location of the logic app."}},"office365_Connection_Name":{"defaultValue":"office365","type":"String","metadata":{"description":"Name of the connection."}},"sharepointonline_Connection_Name":{"defaultValue":"sharepointonline","type":"String","metadata":{"description":"Name of the connection."}}},"resources":[{"type":"Microsoft.Logic/workflows","name":"[parameters('logicAppName')]","apiVersion":"2016-06-01","location":"[parameters('logicAppLocation')]","properties":{"state":"Disabled","definition":{"$schema":"https://schema.management.azure.com/providers/Microsoft.Logic/schemas/2016-06-01/workflowdefinition.json#","contentVersion":"1.0.0.0","parameters":{"$connections":{"defaultValue":{},"type":"Object"},"$authentication":{"defaultValue":{},"type":"SecureObject"}},"triggers":{"When_an_item_is_created":{"recurrence":{"interval":5,"frequency":"Minute"},"splitOn":"@triggerBody()?['value']","type":"ApiConnection","inputs":{"host":{"connection":{"name":"@parameters('$connections')['sharepointonline']['connectionId']"}},"method":"get","path":"/datasets/@{encodeURIComponent(encodeURIComponent('https:/ /pieterveenstradev.sharepoint.com/sites/CommSite'))}/tables/@{encodeURIComponent(encodeURIComponent('e42ebd6b-73a5-4b49-8886-e61515749c91'))}/onnewitems","authentication":"@parameters('$authentication')"}}},"actions":{"Send_an_email":{"runAfter":{"Send_approval_email":["Succeeded"]},"type":"ApiConnection","inputs":{"host":{"connection":{"name":"@parameters('$connections')['office365']['connectionId']"}},"method":"post","path":"/Mail","body":{"To":"pieter@PieterVeenstraDev.onmicrosoft.com;;","Subject":"Email ","Body":"Email sent"},"authentication":"@parameters('$authentication')"}},"Send_approval_email":{"runAfter":{},"type":"ApiConnectionWebhook","inputs":{"host":{"connection":{"name":"@parameters('$connections')['office365']['connectionId']"}},"path":"/approvalmail/$subscriptions","body":{"NotificationUrl":"@{listCallbackUrl()}","Message":{"To":"pieter@PieterVeenstraDev.onmicrosoft.com;","Subject":"Approval Request","Options":"Approve, Reject","Importance":"Normal"}},"authentication":"@parameters('$authentication')"}}}},"parameters":{"$connections":{"value":{"office365":{"id":"[concat('/subscriptions/', subscription().subscriptionId, '/providers/Microsoft.Web/locations/', parameters('logicAppLocation'), '/managedApis/', 'office365')]","connectionId":"[resourceId('Microsoft.Web/connections', parameters('office365_Connection_Name'))]","connectionName":"[parameters('office365_Connection_Name')]"},"sharepointonline":{"id":"[concat('/subscriptions/', subscription().subscriptionId, '/providers/Microsoft.Web/locations/', parameters('logicAppLocation'), '/managedApis/', 'sharepointonline')]","connectionId":"[resourceId('Microsoft.Web/connections', parameters('sharepointonline_Connection_Name'))]","connectionName":"[parameters('sharepointonline_Connection_Name')]"}}}}},"dependsOn":["[resourceId('Microsoft.Web/connections', parameters('office365_Connection_Name'))]","[resourceId('Microsoft.Web/connections', parameters('sharepointonline_Connection_Name'))]"]},{"type":"Microsoft.Web/connections","name":"[parameters('office365_Connection_Name')]","apiVersion":"2016-06-01","location":"[parameters('logicAppLocation')]","properties":{"api":{"id":"[concat('/subscriptions/', subscription().subscriptionId, '/providers/Microsoft.Web/locations/', parameters('logicAppLocation'), '/managedApis/', 'office365')]"},"displayName":"[parameters('office365_Connection_Name')]"}},{"type":"Microsoft.Web/connections","name":"[parameters('sharepointonline_Connection_Name')]","apiVersion":"2016-06-01","location":"[parameters('logicAppLocation')]","properties":{"api":{"id":"[concat('/subscriptions/', subscription().subscriptionId, '/providers/Microsoft.Web/locations/', parameters('logicAppLocation'), '/managedApis/', 'sharepointonline')]"},"displayName":"[parameters('sharepointonline_Connection_Name')]"}}]}

then I compared this with the Code view of an existing Logic App:

{
"definition": {
"$schema": "https://schema.management.azure.com/providers/Microsoft.Logic/schemas/2016-06-01/workflowdefinition.json#",
"actions": {},
"contentVersion": "1.0.0.0",
"outputs": {},
"parameters": {},
"triggers": {}
}
}

Then I replaced the json following the definition part ( Microsoft, was it really not possibly to include the “definition”: { } in the export file? But as soon as I hit the save button I got the following error message:

Export flows and import them in Azure Logic Apps.

Failed to save the logic app. Unrecognised schema version.

I’m not going to be beaten that easily. As I tried to fix template I moved from one error into the next and I wasn’t really getting anywhere.

Export flows and import them in Azure Logic Apps.

Next approach, create a new app in Azure Logic Apps and then check the code view and see what I did wrong earlier

Export flows and import them in Azure Logic Apps.

This is where you will quite quickly make the conclusion that the export option doesn’t really deliver the right format json.  Yes you could create a Logic app and then copy in the actions with the code view, but this will probably take longer than creating the actions manually.


Discover more from SharePains

Subscribe to get the latest posts sent to your email.

Avatar of Pieter Veenstra

Is your business still running on paper trails, sprawling Excel files, or ageing Access databases? There's a better way — and I can show you exactly what it looks like. I'm the Technical Director of Vantage 365, a Microsoft solutions consultancy working with clients across the UK, the Netherlands, and worldwide. For over 30 years I've been turning messy, manual business processes into clean, automated systems that save time, reduce errors, and give teams the visibility they need to make better decisions. SharePains is not just any blog run by a Microsoft MVP. Have you ever used Try-Catch in Power Automate? The original post about Try-Catch in Power Automate can still be found on this site, https://sharepains.com/2018/02/07/try-catch-finally-in-power-automate-flow/ Or have you ever used the Pieter’s method to avoid variables and speed up your flows? https://sharepains.com/2020/03/11/pieters-method-for-advanced-in-flows/ You can contact me using contact@sharepains.com

Related Posts

2 thoughts on “Export flows and import them in Azure Logic Apps.

    1. Hi Jeff, not completely as I’m also looking at the copying snippets from the export file. This is currently the best option available. If you are looking for a straight forward export/import then indeed we will still have to wait a while.

Leave a Reply

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

Discover more from SharePains

Subscribe now to keep reading and get access to the full archive.

Continue reading