I have been trying to write a trigger condition that will stop my flow from running if any of the 3 columns below (Contract #, Amendment#, Project#) contain values. I have tried using @equals and @if, but I can't get any of them to work properly. Any help would be greatly appreciated. Thanks.
@equals(triggerOutputs()?['body/Number'], null)
I tried the trigger conditions you mentioned and the flow ran if everything was blank, As soon as I ran the best and entered a project number I received this error message:
Unable to process template language expressions for trigger 'When_an_item_is_created' at line '1' and column '35493': 'The template language function 'empty' expects its parameter to be an object, an array or a string. The provided value is of type 'Float'.
These are the 2 trigger conditions I used:
@empty(triggerOutputs()?['body/Project_x0023_'] )
@empty(triggerOutputs()?['body/Amendment_x0023_'] )
@nassetc You need to use the not() and empty() functions in your expression. I find it a lot easier to compose the expressions required for a trigger condition by using a Filter Array action. The use of this action is only temporary.
For this example I'm using the When an Item is created trigger. You can leave the From field blank. You only need to use the value fields and operator dropdown. I would recommend creating a brand new flow to have a single trigger and a Compose action so you can quickly run a test.
In the first value field insert the appropriate dynamic content. Change the operator to is not equal to. Leave the second value field blank. Click on Edit in advanced mode.
Copy this expression to your clipboard and paste it into a text editor. The cursor jumps around in the advanced editor and is impossible to work with.
Since you want to check if the field is empty, you'll want to adjust the expression by removing the comma and single quotes and changing equals to empty.
This expression will return a true if the field is empty and false if it is not. Copy this expression to your clipboard and paste it into a trigger condition field. Note: The expression isn't complete yet, however it's always best to run a test to ensure the expression is working as expected.
To test it out, remove the Filter Array action, and add a Compose action to your flow. A flow must have at least one action to run.
First I would create an item where the column you have in your expression has a value—your flow should not trigger. Then Create an item where the column you have in your expression doesn't have a value.
Repeat these steps for each of your columns. Run a test for each to ensure your individual trigger conditions are working as expected.
Now you need to combine all of the conditions into one using the or() function. First, paste all of the expressions into your text editor separating each with a comma.
Next, remove all of the @ symbols except the first.
Wrap the entire expression in the or() function.
Run another test.
I demo this technique in this YT Tutorial:
4 Ways You Can Use Trigger Conditions in Your Microsoft Power Automate Flow
If you are using an Automated Cloud flow trigger in your flow—you need to consider adding trigger conditions.
Do YOU 🫵 know what a trigger condition is? Trigger conditions can be set in most flow triggers. These conditions you set must be true for the trigger to fire. In this Power Automate tutorial, I’m going to show you how to use trigger conditions in your flows to control when your Power Automate flows trigger.
If your plan has flow run limits—you can avoid triggering your flows unnecessarily by using trigger conditions.
I’ll cover four different flow examples that would benefit from trigger conditions:
⚡️ Triggering a flow when a column is changed to a specific value
⚡️ Triggering a Flow When an Event Updated or Deleted
⚡️ Triggering a Flow When a New Folder is Created
⚡️ Triggering a Flow When a Specific Email is Received I’ll also show you a trick on how to easily create the expressions needed and give you a few tips on how to troubleshoot your flow.
IN THIS VIDEO:
âś… Four different flows that would benefit from trigger conditions
âś… What is a trigger condition?
âś… How to add a trigger condition to your flow
âś… How to trigger a flow when a column is changed to a specific value
âś… How to trigger a flow when an event is updated or Deleted
âś… How to trigger a flow when a new folder is created
âś… How to trigger a flow when a specific email is received
âś… How to troubleshoot a trigger condition
âś… How to prevent case sensitivity issues with a trigger condition
âś… How to use the filter array action to easily compose an expression that can be used in a trigger condition
Tomac
986
Moderator
stampcoin
699
Super User 2025 Season 2
Riyaz_riz11
577
Super User 2025 Season 2