Skip to main content

Notifications

Community site session details

Community site session details

Session Id : 4WGQiAZVTLg17kjHYec8u0
Power Automate - Building Flows
Unanswered

SharePoint Documents - Version Control

Like (0) ShareShare
ReportReport
Posted on 18 Dec 2020 11:59:38 by 762

Hello Community,

I need your help please!

I've built a Power Apps, that puts an attachment into a SP List, then I have a Power Automate that takes that attachment send an approval and creates a file in a holding location, then Moves the document, checks it out, updates properties, checks in as a Major Version.
This is perfect for what I want, BUT each time the workflow triggers and I have a REPLACEMENT file the document version is not replaced, it starts again a version 1
Any ideas on HOW to get the version to move from 1 to 2, etc....

This is my current flow

Step1.jpg

Step2.jpg

 

Any suggestions on how to get the Version numbers to override the current document would be gratefully received.

Thank you in advance for your assistance

Kind regards

Claire

  • ClaireAllen Profile Picture
    762 on 24 Dec 2020 at 13:16:14
    Re: SharePoint Documents - Version Control

    @annajhaveri , Thank you

    Unfortunately that did not work, I received an error, document needs to be checked out first before making changes

    ClaireAllen_0-1608815631670.png

    So I moved the REST Api action, but the Version number does not update

    ClaireAllen_1-1608815695572.png

    The REST Api is configured as follows,

    ClaireAllen_2-1608815760577.png

    Regards

    Claire

     

  • annajhaveri Profile Picture
    8,531 Most Valuable Professional on 24 Dec 2020 at 12:46:40
    Re: SharePoint Documents - Version Control

    It would be the name of the file with extension, this you could be using in Create File action as well previously so use same dynamic content here for file name.

  • ClaireAllen Profile Picture
    762 on 24 Dec 2020 at 12:34:49
    Re: SharePoint Documents - Version Control

    @annajhaveri 

    Thank you for your assistance so far, apologise but I've not used REST Api's before, are you able to advise which dynamic content I should be adding as highlighted.

    REST API.jpg

    I appreciate your assistance with this issue.
    Kind regards

    Claire

  • annajhaveri Profile Picture
    8,531 Most Valuable Professional on 23 Dec 2020 at 11:04:41
    Re: SharePoint Documents - Version Control

    Put the REST Api action before create file, also if you can do this in separate test flow that would be helpful, just check versioning. It does create new version, i tested it on my end. 

     

    One more thing, i also tried using Create File and tried it for same file and that also created new version for me, not sure why it didnt work for you, try Rest API if that works for you.

  • ClaireAllen Profile Picture
    762 on 23 Dec 2020 at 10:44:06
    Re: SharePoint Documents - Version Control

    @annajhaveri 

    Thank you for coming back to me
    Sorry to ask, but I have not used REST API before, 

    Where would I put that action in my workflow? and Does it update the Version number?

    ClaireAllen_0-1608720225060.png

    Thank you
    Claire

  • annajhaveri Profile Picture
    8,531 Most Valuable Professional on 23 Dec 2020 at 10:27:58
    Re: SharePoint Documents - Version Control

    Hello,

     

    You can configure the Send HTTP action as follows to upload file

    annajhaveri_0-1608719262007.png

     

  • ClaireAllen Profile Picture
    762 on 23 Dec 2020 at 09:55:51
    Re: SharePoint Documents - Version Control

    Hello Community,

    I've put a post regarding REST API, but I've not had any updates,
    Can anyone help me with Rest API, I'm trying to change the version number in my flow on my original post as each time the flow runs it creates version one again, but I want the version number to change as the document is potentially a replacement.
    Can anyone provide screen shots, or how to achieve this?
    Thank you
    Claire

  • ClaireAllen Profile Picture
    762 on 21 Dec 2020 at 08:19:42
    Re: SharePoint Documents - Version Control

    @annajhaveri 

    Thank you for the advise

    I've not done a Rest API before, are you able to provide screen shots, or how to achieve this?

    Do I need to change anything on my current flow, or is this a new action being added?

    Thank you in advance,

    Claire

  • annajhaveri Profile Picture
    8,531 Most Valuable Professional on 18 Dec 2020 at 16:01:59
    Re: SharePoint Documents - Version Control

    You could try creating file using Rest API to create new file as new version, instead of overwriting

  • ClaireAllen Profile Picture
    762 on 18 Dec 2020 at 14:31:10
    Re: SharePoint Documents - Version Control

    @annajhaveri 
    The reason why I added a Move File was that I was having an issue with moving as it said the file already existed, I've put a previous post Create File - allow duplicates 
    So I believe the answer to your question in when its using the Move File

     

    Thank you

    Regards

    Claire

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

Understanding Microsoft Agents - Introductory Session

Confused about how agents work across the Microsoft ecosystem? Register today!

Warren Belz – Community Spotlight

We are honored to recognize Warren Belz as our May 2025 Community…

Congratulations to the April Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard > Power Automate - Building Flows

#1
stampcoin Profile Picture

stampcoin 51

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 37 Super User 2025 Season 1

#3
Chriddle Profile Picture

Chriddle 21 Super User 2025 Season 1

Overall leaderboard