Imagine a situation where you have created a Power Automate Flow, and you want to convert it to an Azure Logic App so you can take advantage of the Azure Logic App features. Let’s look at how to do this with a Common Data Service example. There are a couple of “gotchas” we will note.
First, let’s create a simple Power Automate Flow. Our flow will do the following – when an account is created in the Common Data Service (e.g. through Dynamics 365 / Power Apps), create a new Contact and associate that contact with the account just created.
Go to https://flow.microsoft.com and create a new Automated – from blank flow:
Find the Common Data Service – When a record is created:
The flow looks like below – it’s pretty simple. Note I’m selecting the actual environment here, not (Current):
On running this by creating a new account in Dynamics 365 / Power Apps, we see the contact is created too:
Now let’s export this to Azure Logic Apps. In Power Automate, for this flow select Export->Logic Apps Template (.json):
This downloads the .json file:
Which looks something like:
Log into Azure portal at https://portal.azure.com/ and create a new resource:
Search for template deployment:
And select Template deployment (deploy using custom templates):
Select Build your own template in the editor:
Click Load File:
Select the JSON file previously downloaded from Flow. It will load like below. Click Save:
Enter any required fields and give the Logic App a name. Note, be sure to not have spaces in the name, or you will end up with the error “Deployment to resource group ‘yourresourcehgroup’ failed.
Additional details from the underlying API that might be helpful: At least one resource deployment operation failed. Please list deployment operations for details. Please see https://aka.ms/DeployOperations for usage details.”, which can produce the message “The provided workflow name ‘Contact create’ has these invalid characters ‘ ‘. The name can only be a letter, digit, ‘-‘, ‘.’, ‘(‘, ‘)’ or ‘_’.”.
Once confirmed, click Purchase:
Once complete you will see a confirmation message that the Azure Logic App has been deployed. Browse out to Logic Apps and select the new app:
Click on the Logic App Designer. We see the flow looks the same as from Power Automate:
Click on Parameters in the toolbar. We see there is one $authentication parameter. Click to delete it:
Then click Enable on the new Logic App:
Before you do anything else, disable the original Power Automate flow.
Let’s test it out. Create an Account in Dynamics 365 / Power Apps. We see our contact is created:
And in our Logic App, we see we have one “succeeded”:
Selecting Diagnostic Settings, we our successful call from Dynamics 365 / Power Apps:
That’s it, your Power Automate flow is running as an Azure Logic App.