Run flows based on SharePoint column modification, Extracting change information.
Recently there have been few updates in power automate which will help in customizing the SharePoint based flows even more. These are the updates that have been awaited by the users for a very long time.
With this update, new actions have been added to power automate which will help us in identifying information on which column value is changed, this enables more power to the users in designing robust workflows and tackling the change-related scenarios.
In this blog post, we will see how to create a flow to track the changes and also the settings that have to be done from the SharePoint site to get this working.
Step 1: Go-to flow home page, click on create and selected automated from blank, and click on create you will be navigated to flow editor from where you can make changes to your flow
Step 2: Once you are in the flow editor search for the SharePoint trigger "When an item or file is modified", select the site address and list name if you are trying to track changes for SharePoint list if you want to do it for a document library select the folder name as well
Step 3: After the trigger action, add the step "Get changes for an item/file(properties only)" this action card will help in retrieving the changes that happened on the SharePoint list mentioned.
Select the site address and the list name as done in previous steps, after selecting the site address and list name, mention the ID value that is coming from the previous step
In the since field, you can either specify the version value from where you would like to start the tracking for you can also select the dynamic content "modified" from the previous step or you can specify the date value in format(YYYY-MM-DDThh:mmZ)
Step 4: Add a compose action and select "has column changed" from the dynamic content, this will retrieve information related to change that happened on the columns.
If a column value has been changed it will have a boolean value true else the column will have a boolean value false. Columns with the boolean value true indicate that value has got changed in those columns.
You can also add the column to a condition and evaluate against a boolean value to check if the column value has got changed or not based on that you can perform further actions.
If you want to perform a direct condition check to see if any column information has been changed, then you can make use of "has column changed" and check if that contains "true" if yes then it indicates that one column has been changed.