How To Add A Condition In Azure Logic App

Introduction

Azure Logic Apps is a fully managed integration Platform as a service which provide a way to automate the workflows and business process. You could easily integrate across different services in cloud and on-premise through connectors. In my previous article you saw how to create a blank logic app and logic app from template. In this blog you will see how to add a condition to run your logic apps based on specific criteria. I have already created an app which send email to my Gmail account when an item is created in SharePoint Online list.

Add a condition to logic app:

Log in to the Azure Portal.

Click Resource Groups-> Resource (in which you have created the logic app) -> click on the respective logic app.

Click Edit to edit the logic app.

Click “+” sign and then click Add a condition.

You could add a condition in basic mode as shown below.

In order to add “OR” or “AND” condition, click Edit in advanced mode and update the condition as shown below:

@or(contains(triggerBody()?['Title'], 'SharePoint'),contains(triggerBody()?['Title'], 'Microsoft'))

Drag and drop the send email to Gmail account to “If true” as shown below.

Result

Thus in this blog you saw how to add a condition to run your logic apps based on specific criteria in Azure.

Ebook Download
View all
Learn
View all