Power Automate: SPO Item Version Delta


[SharePoint Online] is a well known document management solution. Baked into this Microsoft solution is metadata and versioning. In simplest terms, metadata is document tagging. Versioning is an audit trail of document changes – including document properties…

Figure 1 – Version history of a SPO list item.

Working with SPO, Power Automate has an action that will list the changes between two versions. Knowing when specific properties are changed is key to triggering certain actions:

  • Send an email when a task is assigned.
  • Post to Teams when a item is renamed.
  • Send a notification when a file is checked-out.
  • Etc.
Figure 2 – An item is changed or modified trigger, then get changes action.

To list the delta between two versions, the SPO action accepts two parameters:

Figure 3 – Parameters of get changes action.

Easiest approach for a test, use version numbers:

  • E.g., Version 1.0 to the current version.
Figure 4 – Version numbers provided as parameters to get item changes.

The result, a Boolean value for each property indicating whether it has changed or not:

Figure 5 – Output of Booleans indicating if the column has changed.

And per usual, there is a JSON object of the output available:

Figure 6 – Output of Booleans as a JSON object.

Conclusion:
There is an action already baked into Power Automate to get the differences between two versions. And this action easily lays out exactly which fields changed…

“Both tears and sweat are salty, but they render a different result. Tears will get you sympathy; sweat will get you change.”

Jesse Jackson

#BlackLivesMatter

Leave a comment