Trigger flow on specific column modification in SharePoint- Adding trigger conditions-Power Automate
When we try to implement SharePoint actions in Power Automate, many-a-times we want to implement conditions or make the flow trigger only based on specific column modification.
In this blog post, I would like to share you a method on how to trigger flows only on specific column modification in SharePoint.
Recently, there has been a new addition to the SharePoint trigger actions in power automate, namely trigger conditions using these we can specify conditions and the flow will trigger only when the specified condition is met.
Consider a scenario where I want my flow to trigger only when the value in name column is "test", In flow I will specify the trigger condition as if name equals test and save it. Now the flow will trigger only when the condition is met.
If the condition is not met, the flow will not trigger and you will not be able to see any run for the same.
Benefits of using this approach
- Reduced number of API calls from Power Automate
- Minimizing the flow runs for better flow performance
Specifying trigger conditions in Power Automate.
Let's consider the scenario shared above and we will try to implement a trigger condition for the same.
Step 1: Open Power Automate --> Create Flows --> Automated from Blank, Select the trigger when an item is created and click on create.
Step 2: Once you click on create you will be navigated to flow editor where in you can modify the flow and add actions to be performed below the trigger.
Step 3: Click on three ellipses on the trigger action, this will open a side pane click on settings here.
After clicking on settings you will be able to see mutiple options for the trigger scroll down to bottom and you will have the option "Trigger Condition"
Here in the trigger condition we will specify our condition for checking the information in name column as follows
Step 4: After specifying the condition click on done, Add a compose action below the trigger and select name from the dynamic content.
This will help us to confirm that when a flow runs it is running only when the name is set to Test and not for other values.
To reference column names, specify triggerBody()?['Column name'] this will extract the value coming from the specific column
For adding multiple conditions you can click on the add button present below the text area for the condition, this will enable you a new text area where you can add a new condition.
When the add multiple conditions they are evaluated based on AND operator which means the flow will trigger only when both of them are true.
Please refer to the documentation for more information and examples related to implementing trigger conditions.