Power Automate Trigger Conditions Examples

Do you want to know about the trigger conditions in Power Automate? In this Power Automate tutorial, I will explain what are Power Automate trigger conditions and how to implement trigger conditions in Power Automate.

Trigger Condition in Power Automate

  • The trigger condition in Power Automate flow defines the start of the flow. We may be in a situation where flow should execute when certain criteria are met. In those situations, we will add the trigger condition to our flow.
  • Once the trigger condition is satisfied, the further actions and conditions presented in the flow will execute.
  • If the trigger conditions are not met, the flow will not trigger in Power Automate. Whenever we use the trigger condition expression, we have to use ‘@’ in the beginning.
  • It is also possible to include multiple trigger conditions within a single flow. 

How to add trigger condition in Power Automate

Let us see how to add a trigger condition in Power Automate,

Before creating a flow, we have to create a SharePoint list consisting of the below columns:

Column NameColumn Type
PatientNamedefault title column
GenderChoice data type
EmailIDSingle line of text
ContactNumberNumber type
EverAppliedBeforeYes/No type
PrefferedAppointmentDateDate type
power automate trigger conditions examples

In this complete post, I am going to use the same SharePoint List and flow with different trigger conditions.

Step-1:

Create an Automated Cloud flow, and choose the trigger action as ‘When an item is created or modified‘. Then provide the below information:

  • Site address: select the SharePoint site address.
  • List name: From the dropdown, select the Sharepoint list name.
power automate trigger conditions

Step-2:

To add the trigger condition, select the More button(…) and choose the settings option as shown below:

trigger conditions in power automate

Step-3:

Scroll down, select the Trigger condition, choose the +Add button, and add the trigger condition below.

@equals(triggerOutputs()?['body/PrefferedAppointmentDate'],formatDateTime(utcNow(),'yyyy-MM-dd')))

If the appointment date is today (where today’s date is 11/14/2023), then the flow will trigger. Otherwise, the flow will not trigger; once the expression is added, choose Done.

trigger conditions in power automate flow

Step-4:

Add a compose data operation and use the below expression as the input value:

PatientName: @{triggerOutputs()?['body/Title']}
Gender: @{triggerOutputs()?['body/Gender/Value']}
ContactNumber: @{triggerOutputs()?['body/ContactNumber']}
EverAppliedBefore: @{triggerOutputs()?['body/EverAppliedBefore']}
PrefferedDate: @{triggerOutputs()?['body/PrefferedAppointmentDate']}
power automate trigger condition

Step-5:

Now save the flow and run the flow. Here, I have modified the below-highlighted list item with today’s date value. Else, the flow will not trigger.

triggerbody in power automate flow

In the below screenshot, you can see our flow runs successfully because the preferred date is equal to today, and displays the result in the compose data operation:

trigger condition in power automate flow

This is how to add a trigger condition in the Power Automate flow.

Multiple Trigger Conditions in Power Automate

Let us see how to add multiple trigger conditions in the Power Automate flow, yes, it is possible to add multiple trigger conditions in the Power Automate flow.

In this example, I will check if the EverAppliedBefore field has the Value yes and if the PreferredAppointmentDate is equal to today or yesterday.

Open the trigger condition and add the below expression:

@equals(triggerOutputs()?['body/EverAppliedBefore'],true)

Similarly, choose the +Add option to add multiple triggers and use the below expression:

@or(equals(triggerOutputs()?['body/PrefferedAppointmentDate'],formatDateTime(addDays(utcNow(),-1),'yyyy-MM-dd')),equals(triggerOutputs()?['body/PrefferedAppointmentDate'],formatDateTime(utcNow(),'yyyy-MM-dd')))

The flow will trigger only if the EverAppliedBefore field has the Value yes, and If the appointment date is today (where today’s date is 11/20/2023) or Yesterday (11/19/2023). Once the expression is added choose Done.

Multiple Trigger Conditions in Power Automate

Now save the flow and run the flow. Here, I have modified the below highlighted SharePoint list item, where the EverAppliedBefore field has a yes value and the PrefferedAppointmentDate field has today’s value (11/20/2023).

I have created a new SharePoint list item (highlighted in red) here.

Power Automate Multiple trigger conditions

In the screenshot below, you can see our flow runs successfully because the EverAppliedBefore field is equal to true, and PrefferedAppointmentDate has today’s date value and displays the result in the compose data operation:

Multiple Trigger Conditions in Power Automate flow

This is how to add multiple trigger conditions in the Power Automate flow.

Power Automate Trigger Condition not equal

Here, we will see how to apply a Trigger Condition not equal in the Power Automate flow,

  • By default, the Yes/No type field in SharePoint returns the values as true or false. It will not directly return Yes/No.
  • So here, we are using the true/false value in the expressions in trigger conditions for the Yes/No data type.

As we discussed above, open the trigger condition and add the below expression:

@not(equals(triggerOutputs()?['body/EverAppliedBefore'],true))

The above expression checks if the EverAppliedBefore field has the Value No, not equal to Yes.

power automate trigger conditions not equal

Now save the flow and run the flow. Here, I have created a new SharePoint list item as highlighted below:

power automate trigger condition not equal

In the screenshot below, you can see our flow runs successfully because the EverAppliedBefore field does not equal true and displays the result in the compose data operation:

trigger condition not equal in Power Automate

This is how to apply a Trigger Condition not equal in the Power Automate flow.

Or trigger condition in power automate

Let us see how to use Or trigger conditions in the Power Automate flow,

  • Here, I am checking that the EmailID and ContactNumber fields both should not have null values.
  • If any of the fields have null values the flow will trigger, if both have null values the flow will not trigger.

Open the trigger condition section +Add button and use the below expression, Click Done.

@or(not(equals(triggerOutputs()?['body/EmailID'],null)),not(equals(triggerOutputs()?['body/ContactNumber'],null)))
power automate trigger conditions or

Now save the flow and run the flow. I have modified the highlighted SharePoint list item below, where the EmailID field has a null value.

or trigger condition in Power Automate
  • The screenshot below shows that our flow runs successfully and displays the result in the compose data operation.
  • Because the ContactNumber does not have a null value; even though the EmailID has a null value, because or condition checks whether any of the fields has value or not.
or trigger condition in Power Automate flow

This is how to use Or trigger conditions in the Power Automate flow.

Trigger Conditions Power Automate choice column

Now we will see how to add trigger conditions for the choice column in the Power Automate flow,

Here I am checking the Gender field value is equal to Female, then the flow triggers, else the flow will not trigger.

Open the trigger condition section +Add button and use the below expression, Click Done.

@equals(triggerOutputs()?['body/Gender/Value'],'Female')
Trigger Conditions Power Automate choice column

Now save the flow and run the flow. Here, I have created the below highlighted SharePoint list item, where the Gender choice field has a value as Female.

Power Automate choice column Trigger Conditions

The screenshot below shows that our flow runs successfully and displays the result in the compose data operation, because the Gender choice field has a value of Female. The flow triggers and runs successfully.

Power Automate Trigger Conditions choice column

This is how to add trigger conditions for the choice column in the Power Automate flow.

Power Automate Trigger Conditions yes/no

Let us see how to use trigger conditions for the yes/no column in the Power Automate flow,

  • By default, the Yes/No type field in SharePoint returns the values as true or false. It will not directly return Yes/No.
  • So here, we are using the true/false value in the expressions in trigger conditions for the Yes/No data type.

Here, I am checking if the EverAppliedBefore field is equal to Yes, then the flow triggers. Else, the flow will not trigger.

Open the trigger condition section +Add button and use the below expression, Click Done.

@equals(triggerOutputs()?['body/EverAppliedBefore'],true)
Power Automate Trigger Conditions yes no

Now save the flow and run the flow. Here, I have modified the below highlighted SharePoint list item, where the EverAppliedBefore field has a value of Yes.

Power Automate Trigger Conditions yes or no column
  • In the screenshot below, you can see our flow runs successfully and displays the result in the compose data operation,
  • Because the EverAppliedBefore field has a value of Yes, and it returns true, the flow triggers and runs successfully.
Power Automate yes or no column Trigger Conditions

This is how to use trigger conditions for the yes/no column in the Power Automate flow.

Conclusion

I hope you understand what a trigger condition is and how to add and work with trigger conditions in Power Automate.

So here I have shown you different examples of how the trigger condition works based on the expression. I also showed you how to work with multiple trigger conditions in the Power Automate flow.

You may also like:

  • Hello, on a regular basis I receive emails that contain an attached file. Is there a way to trigger the flow only if the name of the attachment fulfills some specification ? (ie the attachment name startswith the letters ABC) ?

  • equals(triggerOutputs()?[‘body/WORKFLOWSTATUS’],4), works in a way that when workflow status is not equal 4 flow does not trigger , but when workflow status become 4 and there is any changes in SQL row flow again triggers. As per the expression flow checks the field status and trigger.
    I want to trigger flow only when WORKFLOWSTATUS field modified as value 4

  • >