Have changes been made to a column?

Recently the Get changes for an item or file action was added to SharePoint. Here a full overview

Get changes for an item or file action

The Get Changes for an item or file action will require your list or library to have versioning enabled. If you don’t have versioning enabled you will see the following error message:

Versioning not enabled for list

Get the changes made to SharePoint Items with Power Automate Microsoft Office 365, Microsoft Power Automate, Microsoft SharePoint, Microsoft SharePoint Online image 67

You can enable Versioning in the list or library settings

Get the changes made to SharePoint Items with Power Automate Microsoft Office 365, Microsoft Power Automate, Microsoft SharePoint, Microsoft SharePoint Online image 68

Nothing complicated here. Be aware however that the versioning settings will affect the functionality in your flow. So for example the number of versions kept will be important for your flow.

Once enabled the action will now work and return data.

Get the changes made to SharePoint Items with Power Automate Microsoft Office 365, Microsoft Power Automate, Microsoft SharePoint, Microsoft SharePoint Online image 69

At the end of the long list of true/false values there is a short overview in json, which is a bit easier to use. Here we can see that I updated the column with the name Choice

Get the changes made to SharePoint Items with Power Automate Microsoft Office 365, Microsoft Power Automate, Microsoft SharePoint, Microsoft SharePoint Online image 70

So now we know the fields that have changed but we don’t really know what they changed to or from.

Versions of items or documents

When you look through the dynamic properties, you will very quickly bump into the Since Version Number and until Version number

Get the changes made to SharePoint Items with Power Automate Microsoft Office 365, Microsoft Power Automate, Microsoft SharePoint, Microsoft SharePoint Online image 71

These give you the range of version numbers that the flow has checked.

Now if only we could get to the data of a version number of data in SharePoint!

Well we can. but it might not be as easy has you hoped for

You will need to build up the following configuration for the Send an HTTP request to SharePoint action.

I’m now going to use the SinceVersionId to query the versions of the list item that was changed and that triggered my flow.

I can do that with the following expression. Note that this is SinceVersionId and not SinceVersionLabel.

outputs('Get_changes_for_an_item_or_a_file_(properties_only)')?['body/SinceVersionId']
Get the changes made to SharePoint Items with Power Automate Microsoft Office 365, Microsoft Power Automate, Microsoft SharePoint, Microsoft SharePoint Online image 72

How to get the previous values?

We now need to have another look at the Get changes for an item or a file action

Get changes for an item or a file (properties only)

If we now configure the Until field to get its date from the Modified date of the trigger minus one second. Then we know that we have the previous version of the item and the job is done!

Avatar for Pieter Veenstra

By Pieter Veenstra

Business Applications Microsoft MVP working as the Head of Power Platform at Vantage 365. You can contact me using contact@sharepains.com

8 thoughts on “Get the changes made to SharePoint Items with Power Automate”
  1. Hi. Great stuff but can you please share the settings for that last piece – Get changes Until ?

  2. If you only want to check against the previous version you can use the expression “sub(int(triggerOutputs()?[‘body/{VersionNumber}’]),1)” in the Since column.

  3. Hi Kev, does the expression above work if the previous version is between 0.2 and 1.0, or is it only for changes to version higher than 1.0? TIA

  4. You don’t necessarily need a date value in the Since or Until fields. You can also put a version number in and only get changes that were made between these versions. This can be useful if you only want to compare the change between the current (last) and the previous version. Only tried this for lists with major versions only successfully.

  5. Hello,
    Is it possible to get the previous value and include it in my email notification (with the new value)?

    1. Hi Pat, You can get the changes for an item/document with one of the actions in the SharePoint connector or using the REST API.

      the action that you migth be look for is called: Get changes for an item or a file

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Discover more from SharePains by Microsoft MVP Pieter Veenstra

Subscribe now to keep reading and get access to the full archive.

Continue reading