My flow writes an excel table row when an event occurs. The file is in OneDrive. The event occurs about 100 times a day.
After a few days it starts to fail - error message is 'too many minor versions' (so Flow can't update the file).
My workaround now is to manually publish that file - and then it's ok for a few more days.
My question: is there a flow function to either prevent the version updating? Or to reset it somehow? or to automate the publishing action (maybe I could run that on a schedule for example)?
Or any other solutions pleaseee.
Sam
Solved! Go to Solution.
There is nothing I know of built in to Power Automate to allow controlling of major and minor versions. There is however a way to publish a file as a major version using an HTTP REST call. I would suggest either adding logic to your flow that checks the version number and publishes it if its getting large or creating a second recurrence flow that would run once a day to publish a new major version. You can read about the REST call to Publish a major version here.
Publish files in SharePoint using Microsoft Flow and Column formatting - About365
There is nothing I know of built in to Power Automate to allow controlling of major and minor versions. There is however a way to publish a file as a major version using an HTTP REST call. I would suggest either adding logic to your flow that checks the version number and publishes it if its getting large or creating a second recurrence flow that would run once a day to publish a new major version. You can read about the REST call to Publish a major version here.
Publish files in SharePoint using Microsoft Flow and Column formatting - About365
Hello @Anonymous ,
you should be able to disable minor versioning directly in OneDrive. You can 'Return to classic OneDrive' on the left side. Then go to Settings -> Site contents -> Settings on your library -> Versioning settings, and disable creation of minor versions.
Or try to change the url to get to the Site contents directly, instead of /onedrive.aspx use /viewlsts.aspx
@tom_rihaThat's brilliant - I knew OD was Sharepoint (of course) but have never seen the settings available like that.
Not quite what I need, but many thanks for the tip.
Sam
Thank you @Pstork1 I expect this is the solution (and I'll mark it as such when I've had a go) - in the meantime I've been exploring the Onedrive connector a bit more.
I'm not finding any way to get the version number of a Onedrive file. (and to get for a SP file isn't easy it seems)
Or to check-in (or publish) a Onedrive file.
Will that HTTP REST call work on OneDrive files? What would be the server and path please?
Thanks
Sam
Yes, you can disable minor versions for OneDrive. Just be aware that the Files Restore functionality is dependent on versioning in OneDrive. So if you make changes to automatically clean up versions, by switching to Major version only, you will be limiting your ability to recover files in the case of a disaster.
Learn to digitize and optimize business processes and connect all your applications to share data in real time.
Did you know that you could restore a deleted flow? Check out this helpful article.
Come together to explore latest innovations in code and application development—and gain insights from experts from around the world.
User | Count |
---|---|
26 | |
25 | |
24 | |
23 | |
23 |
User | Count |
---|---|
61 | |
50 | |
44 | |
31 | |
27 |