• 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

Working with Throttling Limits in Power Automate

In this #PowerShot, I will show you how to better handle throttling limits for API requests actions, connectors and flow runs in Power Automate. Let's Get Started Connectors in Power Automate have a s

SUBSCRIBE VIA EMAIL

Yash Agarwal

  • Black LinkedIn Icon
  • Black Twitter Icon
  • Black Facebook Icon
  • Black Instagram Icon
  • Black RSS Icon

© 2019 By the Devs