web
You’re offline. This is a read only version of the page.
close
Skip to main content
Community site session details

Community site session details

Session Id : SZZz7OfSG6ZaxsCOx3oiDi
Power Automate - General Discussion
Answered

Copy file to sharepoint location, keep old versions

Like (0) ShareShare
ReportReport
Posted on 23 May 2021 12:46:14 by 37

Hi! 

 

I ran into the problem that if my clients update a file via flow the old versions are deleted.

I already read about the topic and although I can´t really believe it, I know that this can´t be fixt with the update file connector. 

But is it the same issue trying it with an API request or can´t this be done in any way? (And if how?)

 

Has anybody an idea about a workarround? I actually think about adding a prefix (maybe date and time) to the older version and moving it to another folder for a fixed period of time. Maybe someone has a better idea to fix this problem. 

 

Thanks in advice! 

 

Quince

I have the same question (0)
  • QuinceK Profile Picture
    37 on 24 May 2021 at 21:14:30
    Re: Copy file to sharepoint location, keep old versions

    Hi Kevin,

     

    thanks for your help. I really appreciate. I´ll try a couple of solutions and post the result here to let other users know how to get around this issue. 

     

    All the best, 

    Quince

  • Verified answer
    powercorner Profile Picture
    477 on 24 May 2021 at 07:52:25
    Re: Copy file to sharepoint location, keep old versions

    Hello @QuinceK ,

     

    althou its a SharePoint topic and it would fit more in an SharePoint board I now understand what you are doing. Unfortunately the copy function never takes your version history. Its just creating a new Item with the same content. Maybe the move action would fit better? Cause the move action also keeps the current versioning.

     

    Edit: and if you need to copy, maybe you can make a copy first in your source folder and then move one of the copies to the final destination with the "move" action

     

    Or even better you could use the "update file" action, where you only change the content and leave the metadate and versioning how it is. I think this would be even smarter.

     

    powercorner_0-1621843919919.png

     

  • QuinceK Profile Picture
    37 on 23 May 2021 at 22:11:37
    Re: Copy file to sharepoint location, keep old versions

    Hi Kevin, 

    thanks for your reply. 

     

    We built a powerapp to enable employees uploading their project documentations including content types / meta data which are uploaded to a folder with one flow and then, if the status os ok ( no missing data ) they are moved to different sharepoint pages (document folders) where special employee groups have access to.

     

    The 'creating' flow is startet onclick in the powerapp, assigns the documents to the different types and creates a file in the 'Upload' folder. 

     

    Screenshot 2021-05-23 at 23.09.43.png

     

    Screenshot 2021-05-23 at 23.10.47.png

    Screenshot 2021-05-23 at 23.12.38.png

     

    Screenshot 2021-05-23 at 23.13.39.png

     

    Screenshot 2021-05-23 at 23.15.41.png

     

    Screenshot 2021-05-23 at 23.16.32.png

     

    Screenshot 2021-05-23 at 23.17.43.png

    The second flow starts on when item is created or modified

    Screenshot 2021-05-23 at 23.17.43.png

     

    Break inheritance & garanting access 

    Screenshot 2021-05-23 at 23.36.38.png

     

    Initializing different variables to specify the final document folder 

    Screenshot 2021-05-23 at 23.44.06.png

    Specify conditions and set the variables 

    Screenshot 2021-05-23 at 23.46.13.png

     

    Checking the status value (to be processed = move on, manual = missing data & employee has to take care manually, replace = already existing file to be updated)

    Screenshot 2021-05-23 at 23.53.06.png

     

    If no: If status is manual (not replace file or to be processed, then let team know that there is something to be done via email

    Screenshot 2021-05-23 at 23.57.51.png

     

    Checking replace file conditions an set the variable value to 1 or 0 

     

    Screenshot 2021-05-24 at 00.01.06.png

     

    Copy file

    Screenshot 2021-05-24 at 00.04.03.png

     

    Screenshot 2021-05-24 at 00.06.00.png

    Screenshot 2021-05-24 at 00.07.35.png

     

    Hope this is understandable. if you have any questions please let me know. 

    Thanks for the effort. 

     

    All the best, 

    Quince

  • powercorner Profile Picture
    477 on 23 May 2021 at 17:05:32
    Re: Copy file to sharepoint location, keep old versions

    Hallo @QuinceK ,

     

    can you tell me a bit more in detail what you or your client tries to do?
    Maybe you can share some screenshots of the flow or the SharePoint items/files that are updated?

     

    I think there can be several sources for your problem. Could be the wrong usage of the action, or could be a setting in the SP list. 


    Tell me more and I try to help you to find a solution 🙂


    With regards

    Kevin

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

MS.Ragavendar – Community Spotlight

We are honored to recognize Ragavendar Swaminatha Subramanian as our September…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 954 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 650 Moderator

#3
trice602 Profile Picture

trice602 327 Super User 2025 Season 2

Last 30 days Overall leaderboard
Loading complete