In this blog we will create a logic app in Visual Studio 2019 and publish the app to Azure.
We can create a logic app in the Azure portal and we can also create a logic app in Visual Studio. For multiple logic app project which are large scale It’s easy to maintain through Visual Studio, and it gives you source integration with Azure devops.
We can test and make changes in Visual Studio before actually deploying the logic app project to the portal.
Prerequisites
Let’s create a new project in Visual Studio 2019 and search for Azure resource group. We have two language options here, C# and Visual Basic. Select the appropriate one (I’m using C#). Select next.
Fill in the details, name of the project, and location as you can see in the below image. Select create.
Subsequently we will be able to select the Azure template, where we will select logic app template. Select ok.
Your solution will be ready in a few seconds, you will be able to see two json files. As you select prameters.json file you will be able to see json schema for logic app deployment.
Logicapp.json contains all the data related to your logic app. Click the right button and select open with logic app designer as shown in the below image.
If you haven’t logged in to your account which has an Azure subscription it will ask you to log in. Fill in the details and lo gin to your account. Select the resource group and subscription.
Afterwards, you’ll have the logic app designer opened in Visual Studio.
Create your new flow based on your requirement or for just demo purposes we will create a recurrence logic app (
click here.).
Demo app contains (a.) a recurrence connector and (b.) send an email connector.
We will deploy the current logic app to the portal by right clicking on the solution and selecting the option deploy as new.
Eventually, you will be able to see the deploy to resource group dialog box that requires all the information related to the deployment to the azure portal. It will automatically select the two json file. We can edit the parameter to check if we have named our logic app correctly or not.
Click on save, after doing all the changes in parameters and click on deploy. After clicking on deploy your template will be checked if valid or not and if valid the app will be deployed in the portal. Just after your logic app is deployed it will run for the first time and you’ll receive the mail that we have implemented in the app.