This article demonstrates the implementation of a Power Automate flow that triggers when a specific column value is updated, and when a specific value is selected in the choice column. The same flow can be applied to both SharePoint lists and SharePoint libraries.
1. Turn on the versioning
Versioning keeps the backup of data so the user can track changes or restore the data at any stage.
Go to the “List settings”.
Click on the “Versioning settings”.
Make sure that the “Yes” option is selected. This will make a new version whenever a column value is updated.
2. Create a flow
Create an “Automated” cloud flow and select the “When an item or file is modified” trigger.
Select the SharePoint site and list.
Add a “Get changes for an item or file (properties only)” action.
Select the SharePoint site and list and enter the “ID” from the dynamic content into the “Id” field.
From the “Dynamic content”, enter the “Trigger window start token” in the “Since” field, and enter the “Trigger window end token” in the “Until” field.
Add a “Condition” action.
From the “Dynamic content” enter the “Has column changed: Status” and write “true” on the right side of the “is equal to”.
In the “If yes” field, add an action “Send an email (V2)” action and fill in the required fields.
3. Test the flow
Modify a record in the SharePoint list that relates to the flow.
You will receive the following email only if the “Status” value is changed.
4. Add Trigger Condition
Now add a trigger condition so this flow triggers only when the “Status” of the project changes to “Completed”.
Go to the “Settings” of the “When an item or file is modified” trigger.
Copy the code given below, paste it into the “Trigger condition” field, and click on the “Done” button.
Code:
@equals(triggerBody()?[‘Status’]?[‘Value’],’Completed’)
Note: Status is a choice type column.
5. Test the flow
Test the flow again by changing the “Status” value of any item in the list.
The flow will only run when the “Status” value of any item is set to “Completed”.