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.
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')/MajorVersion
If 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