• Yash Agarwal

Working with: Trigger conditions in MS Flow

In this #PowerShot, I will show you how to use trigger conditions in #MSFlow. We will look at the “When a new Email arrives in Outlook” trigger and prevent the flow from triggering when the arrived email is from a particular domain.

Step 1: Click the … on the trigger and click on Settings. Enable the checkbox for “Trigger Conditions”.

Step 2: Use the expression below to set up the trigger condition:

@not(equals(last(split(triggerBody()?['From'],'@')),'testdomain.onmicrosoft.com'))

Here, we are first retrieving the From attribute and then splitting it on ‘@’ to extract the domain name of the sender email address. We are then comparing that with the domain that we want to avoid the flow trigger on. This is a Boolean value and we want to trigger the flow when this value is false and thus we are using the not function to negate that output.

You can identify the relevant fields by first running the flow and checking the trigger body in the flow run history. Using those attributes you can create the trigger conditions based on the available functions in the expression editor.


I hope you found this interesting and it helped you.

Recent Posts

See All

Export Planner data to Excel using Power Automate

In this #PowerShot, I will share a flow setup that can be used to export tasks related data from a planner plan to Excel. This includes data like the categories applied to a task, notes on the task, c