#PowerAutomate #SharePoint

With the Get Changes Action in Power Automate we can determine if a column has changed in your SharePoint list or library. But how do we determine what the value was before it changed? Learn how you can leverage the SharePoint HTTP Action in Power Automate to get column changes in your list item using the version history. I’ll walk you through all the steps needed to run a flow when an item is modified in SharePoint, tell if a field has changed and get it’s previous and current value.

⚠ Code Used

Expression for SharePoint HTTP Action URI Property:
_api/web/lists/getByTitle(‘Asset manager’)/items(@{triggerOutputs()?[‘body/ID’]})/versions(@{outputs(‘Get_changes_for_an_item_or_a_file_(properties_only)’)?[‘body/SinceVersionId’]

Expression used to get the previous value from the HTTP request: body(‘Send_an_HTTP_request_to_SharePoint’)[‘d’][‘Status’]

🔗 Links 🔗
Download the Flow: https://github.com/aprildunnam/Power-Automate/blob/master/GetItemChanges_20210512003702.zip

Pieter Veenstra Get Changes to SharePoint Item Blog Post – https://sharepains.com/2020/09/24/changes-sharepoint-items-power-automate/

Table of Contents:
00:00 – Intro
00:50 – Use Case
01:35 – Setting up the Flow Trigger
02:20 – Setting up the Get Changes Action
03:40 – Enabling Versioning
04:21 – Setting up the HTTP Action
07:35 – Check if a field has changed
08:28 – Getting the previous value
11:45 – Testing and wrap up

  1. Randy Wade 4 months ago

    Wow! You posted this at literally the perfect time. I have been working on trying to figure out something like this all week and almost gave up today. Thank you!

  2. Ranjit Singh 4 months ago

    Thank you

  3. Craig Brown 4 months ago

    Thanks April, this is exactly what I was looking for!

    Something I found. I copied your code for the HTTP expression for Send an HTTP Request to Sharepoint, but then I replaced the version with the SinceVersionID dynamic value. What I caught was that your code referenced SinceVersionID and the dynamic value referenced SinceVersionLabel. The Flow kept failing at that step, but once I pasted your code in everything worked.

    Thank you so much for this video!

  4. RaJnEsh THAKUR 4 months ago

    Very nice video 👍🏼

  5. Eder Silva Rodrigues 4 months ago

    Obrigado 👏👏👏👏👏👏

  6. Richard Collett 4 months ago

    Much better/neater solution than having a 'Previous Status' field that was often suggested to compare to

  7. mdhruv1 4 months ago

    April is it possible to get an example of how to use this in a canvas power app. I have a small task list which I need the people to enter the latest date and percent complete. I know I can use your power automate. It would be great if your can show how we can do this in power app. Then in the other screen show what items have changed since

  8. charlie alswiti 4 months ago

    Excellent Video, Thank you.

  9. Harry 4 months ago

    This was excellent. Thank you so much.

  10. Massimo 4 months ago

    Thanks April. I tested on a Document Sets library but I got this error message "The query cannot be completed because the number of lookup columns it contains exceeds the lookup column threshold". So I tried to use a view with less columns but I can't see changing status of loockup columns that are inside the view.

  11. Sundra Pillay 4 months ago

    Thanks April

  12. ankesh sinha 4 months ago

    Thank you, April. It's helpful.
    Is any power automate AI builder video creation in pipeline. It would be great to have one.

Leave a reply

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

©2021 TDG - We Are Back Baby!


We're not around right now. But you can send us an email and we'll get back to you, asap.


Log in with your credentials

Forgot your details?