Getting Version History Of SharePoint List Item Using Power Automate☂️

Introduction

This article gives a good idea about to get SharePoint version history of list items using power automate,

Points to remember

Don't forget to enable Versioning in the SharePoint list(list or library settings).

Step 1

Go to https://flow.microsoft.com/

Click on Automated--from blank.

Step 2

Getting Version History of SharePoint Listitem using PowerAutomate

Step 3

Configure,

  1. Site Address
  2. List Name

Getting Version History of SharePoint Listitem using PowerAutomate

Step 4

Click on next, find and select the “Send an Http request to Sharepoint” action.

Getting Version History of SharePoint Listitem using PowerAutomate

Step 5

Expand "Send an Http request to Sharepoint" connector box and provide,

  1. Site Address
  2. Method as "Get"
  3. in Uri coulmn fill as /_api/web/lists/getByTitle('ListView')/items(@{triggerOutputs()?['body/ID']})/Versions

Getting Version History of SharePoint Listitem using PowerAutomate

Step 6

Click on next, find and select the “Initialize variables” action.

Getting Version History of SharePoint Listitem using PowerAutomate

Step 7

Expand the Initialize variable box and assign the variable as follows,

Getting Version History of SharePoint Listitem using PowerAutomate

Step 8

Click on Next Step and find and select the “Apply to Each” action.

Getting Version History of SharePoint Listitem using PowerAutomate

Step 9

Inside apply for each action box, 

Choose input as dynamic content.

body('Send_an_HTTP_request_to_SharePoint')?['body']?['d']?['results']
or
outputs('Send_an_HTTP_request_to_SharePoint')?['body']?['d']?['results']

Getting Version History of SharePoint Listitem using PowerAutomate

Step 10

Inside apply for each action box find and select the “Append to string variable” action.

Getting Version History of SharePoint Listitem using PowerAutomate

Step 10

Expand the box Append to a string variable and do the following,

In the value, section use the below expression

items('Apply_to_each')?['Region']

Here I am only taking the field Region from my SharePoint list, as per your need you can take the required fields.

Getting Version History of SharePoint Listitem using PowerAutomate

Step 11

For viewing the output I added compose action in this step.

Getting Version History of SharePoint Listitem using PowerAutomate

Step 12

Assign input to compose action box like below,

Getting Version History of SharePoint Listitem using PowerAutomate

Step 13

Click on Save Flow.

Step 14

To test the flow, insert a record in the list that you triggered.

Step 15

Expected output,

Getting Version History of SharePoint Listitem using PowerAutomate

Conclusion

Cheers, we did it. I hope you have learned how to get the version history of list items from SharePoint list using power automate :) 


Similar Articles