web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Get SharePoint List It...
Power Automate
Answered

Get SharePoint List Item Previous Version Information

(0) ShareShare
ReportReport
Posted on by 256

I am trying to perform a Send HTTP Request to retrieve the previous version of a SharePoint list item. I realize that you can do _api/web/lists/GetByTitle('ListName')/items(ID)/Versions to retreive all versions and their information. But I only want to receive the specific version I am interested in.

 

Below is what I am currently doing, and the response I get back. 

 

landonjochim_0-1634757669899.png

After running the flow.. 

landonjochim_1-1634757788604.png

Any support would be very much appreciated.

 

Thanks!

Categories:
I have the same question (0)
  • Verified answer
    MarvinBangert Profile Picture
    1,924 Most Valuable Professional on at

    Hey @landonjochim 

    you are on the correct way, but the versionID is not used with 1,2,3,4... they have different counting like:

    1 = 512

    2 = 1024

    3 = 1536

    4 = 2048

    5 = 2560

    6 = 3072

    7 = 3584

    8 = 4096

    9 = 4608

    10 = 5120

    You can also just leave out the () behind the versions to receive all versions then you can lookup what ID are used in the field "VersionId". When you put in these VersionId in you versions() you will receive only this version of your item.

     

    Best regards
    Marvin

    If you like this post, give a Thumbs up. If it solved your request, Mark it as a Solution to enable other users to find it.

  • landonjochim Profile Picture
    256 on at

    @MarvinBangert Can it be assumed that whatever the Version Number is * 512 will give me the VersionID that it will understand?

  • MarvinBangert Profile Picture
    1,924 Most Valuable Professional on at

    @landonjochim 

    I did not tested it on every version, but the schema looks like that, yes.

     

    Best regards
    Marvin

    If you like this post, give a Thumbs up. If it solved your request, Mark it as a Solution to enable other users to find it.

  • Mahmoud1993 Profile Picture
    4 on at

    you can use this expression to calculate previous versionID: (VersionNumber*512)-512

    sub(mul(int(triggerOutputs()?['body/{VersionNumber}']),512),512)
  • Community Power Platform Member Profile Picture
    on at

    Lifesaver, man - works like a charm, appreciated! I initialize and default a "PreviousVersion" variable to your formula by pasting it directly into the Expressions Builder.

    Was able to run the "Send HTTP Request to SharePoint" using 

    _api/web/lists/GetByTitle('My List')/items(ID)/Versions(PreviousVersion)?$select=Status

    Because I only cared about getting the "Status" value from the previous version.


    I add a Header of Accept and application/json;odata=nometadata as the key/value pair per:

    Working with the SharePoint Send HTTP Request flow action in Power Automate | Microsoft Learn

     

    Then I set a variable of "OldStatus" right after it to 

    body('Send_an_HTTP_request_to_SharePoint' )['Status']

    in the dynamic expression. Works great!

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 501 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 323 Moderator

#3
abm abm Profile Picture

abm abm 237 Most Valuable Professional

Last 30 days Overall leaderboard