Introduction
The Azure Logic app basically contains a trigger and an action. If a specified trigger is triggered, then a mentioned action will be performed.
Steps
To create a Logic App you have to create Azure Account on
here.
Sign in to the portal and select Logic Apps
It will redirect you to the below screen.
Click on the Create Logic App
Fill the details such as Subscription, Resource Group (Click on Create New to add a new one), Specify the logic app name, location and then click on Review + create
On the next screen, click Create. Then the app will be created. Now click on the Blank Logic App button.
Then, the Editor screen will open like this:
Then type a Request in the trigger text box and add a request trigger with action “When an HTTP request is received”.
Then the HTTP Request trigger will be added to the designer.
Set Method as “GET” and check the “Relative Path” checkbox.
Then type {Age} in the text box.
Click on the Next Step button and add Control trigger with action Condition.
Then type the below string in the text box
int(triggerOutputs()['relativePathParameters']['Age'])
Then, select is greater than or… condition from the list.
Then click on “Add an action” in if it's the true section, and select the “Response” action.
Then give the body the text, “Your age is greater than 65”
Then add the same action for if false section and give body “Your age is less than 65”
Now click on the Save button to the same logic app on Azure. Then click on the Edit button to edit the logic app in Edit mode. Then copy auto-the generated HTTP to get your URL.
Then paste this URL in Postman and replace {Age} with the value “30” in the URL.
Select the method “GET” and click on the Send button to send a request.
For this request, you will get the below output.
If your age is greater than 65, then you will get the below output.