Forum Discussion
Getting the Version number of a SharePoint document with Flow
Heya, I know this is a bit of an old post but I had a similar experience while I was trying to mock up a prototype for integration between SharePoint and a record keeping system. To get around it you can send a HTTP request to the SharePoint API with the file identifier to retrieve the list of versions, get the latest version and make a decision on that. If your still interested you can find a full walk through on my blog here: https://www.glennprince.com/blog/creating-a-version-monitoring-flow-in-sharepoint/
Cheers, Glenn.
- TerranIncognitoMay 08, 2020Copper Contributor
God bless you, sir. This is a wonderful Flow, and you are very clear in your explanation of how to set it up. Well done, and much appreciated!
- Kushan Lahiru PereraFeb 08, 2019Brass Contributor
Hello,
Your https://www.glennprince.com/blog/creating-a-version-monitoring-flow-in-sharepoint/ is really awesome and interesting.
I would suggest to refer below endpoint of SharePoint where you could reduce the number of steps.
GET: Minor Version
/web/getfilebyserverrelativeurl('/Shared Documents/filename.docx')/MinorVersion
GET: Major Version
/web/getfilebyserverrelativeurl('/Shared Documents/filename.docx')/MajorVersionIf you still need both Major and Minor version numbers, I may go with your way since multiple HTTP requests will reduce the performance of workflow.
Need to read more?
Find below reference from Microsoft MSDN
https://msdn.microsoft.com/en-us/library/office/dn450841.aspx
Kushan Perera | Microsoft MVP
Web: http://www.kushanperera.com
Blog: http://blog.kushanperera.com
- Glenn PrinceFeb 08, 2019Copper Contributor
Hi,
Thanks for the feedback. When I was originally looking into this those endpoints didn't exist. For what I am using it for it is more useful to get both components of the version number but I will have to update the article to include some notes about those endpoints.
Glenn
- Allan SavageNov 04, 2018Copper Contributor
Thanks for this Glenn - exactly what I needed i.e. to be able to pass up the version number to an approver when submitting a controlled document, so that the document and version is all part of an auditable process. Cheers.