Start power automate on new or modified document only when a condition is met

Starting a Power Automate flow on a new or changed document or item is easy. But can you only start it when a certain condition is met? 

Yes, you can.

In this example I only want to start the flow when the field "Document Status" is set to "To review".

Here's how.


The trigger for this flow is: When a file is created or modified



We need to go to the settings of this action...


Add a trigger condition...





@equals(triggerOutputs()?['body/Document_x0020_Status/Value'], 'To review')

Click Done and now the flow will only start if the condition is met.


Bonus tip!

If you find it hard to create the trigger condition expression do this:



Pick the field you want to compare against...

Enter the value and click on "Edit in advanced mode" 

Select the expression and copy it into the trigger action from above.

After this you can delete the Do until action.









Comments

Popular posts from this blog

100.000 contacts for TyT MD-2017

De Kunst van het gebruik van Prompts in ChatGPT en Bing Chat Enterprise

Show a users display name in a PnP Modern Search Results Web Part using handlebars helpers