cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
OussD
Regular Visitor

How to copy all folders and files from Sharepoint to onedrive (Personal)?

I am trying to create a flow to back up all the data of students to their personal accounts on a certain date. I have managed to connect the personal account, however. I am having trouble copying the data. I have found ways to copy the newly created file, but existing ones I couldn't do it.

Many thanks

6 REPLIES 6
efialttes
Super User
Super User

Hi!

Can you share a screenshot from your current flow design?

I also assume you plan to share the flow with all your students, so each of them will import and run the flow with their own credentials.

I mean, I do not see any other way to reach One Drive (personal) from a student unless the flow runs with student own credentials

Thanx!



Each time you click on any of our inspiring answers 'Thumb up' icon...
...an ewok scapes from the stormtroopers.

Be grateful, Thumbs up! Save the Galaxy for free!


Escribo sobre Power Automate en:
https://medium.com/anyone-can-automate/

Proud to be a Flownaut!



I cannot share the current state of the flow (I am not authorized).

 

We are not going to share the flow with students, we are going to make it automatic to those who subscribe. They do not (and probably cannot) edit or see the flow.

 

This is the flow I found for copying files, but it is only for newly created ones:

https://france.flow.microsoft.com/en-us/galleries/public/templates/0309ed62451b4421a226e1da06ce670a/...

 

Hi!

Since you cannot share your current flow for confidentiality reasons, I need to understand better the problem

This is the template you are suggesting to use

Flow_BackUpOneDrive.png

But, how do you match files per student? Do all share the same folder, each student grant to the ones he/she uploaded only?

Thanx!

 

 

 



Each time you click on any of our inspiring answers 'Thumb up' icon...
...an ewok scapes from the stormtroopers.

Be grateful, Thumbs up! Save the Galaxy for free!


Escribo sobre Power Automate en:
https://medium.com/anyone-can-automate/

Proud to be a Flownaut!



Thank you for your answer. 

The matching is done by connecting only one Onedrive account per student (or google drive, but that's another story), and in that Onedrive, there is a folder for backups called UNINAME_Backup (We create the flow and add it to their student account).

 

I have tested the flow with the newly created files, and it works. But I am able to copy the files that were already there before the creation of the flow.

Hi again!

The point is, the flow you are working with triggers when a new file is created.

In order to perform a backup of current student files stored in Sharepoint, you need a manually triggered flow, that reads all files belonging to the student by means of 'Get files (properties only)' then do an 'Apply to each' to iterate all through the student current files in Sharepoint, and copy each file to student's onedrive.

The concept is explained here with flow design screenshots:

https://joannecklein.com/2018/01/02/a-modern-transfer-to-another-location-in-office-365/

The differece is inside Apply to Each:

instead 'moving' files from one SP libreary to another folder + deleting original file; your 'copy' steps are exactly the same as the ones you have in your current flow.

 

This second flow is easy to implement, but we need to understand which files in SP belong to current student, something still unclear to me... 'Gt files (properties only)' will provide all files stored in the library, so ... which are the ones in SP belonging to a particular student? Are they stored in one subfolder per student? Shall I rely on 'Created by' column metadata instead?

Hope his helps



Each time you click on any of our inspiring answers 'Thumb up' icon...
...an ewok scapes from the stormtroopers.

Be grateful, Thumbs up! Save the Galaxy for free!


Escribo sobre Power Automate en:
https://medium.com/anyone-can-automate/

Proud to be a Flownaut!



Thank you again for your answer, I think this will do great. I have only one problem though, the get files is not returning anything ...

I have setup this : tempsnip.png

 And it return this error :

 tempsnip2.png

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

M365 768x460.jpg

Microsoft 365 Collaboration Conference | December 7–9, 2021

Join us, in-person, December 7–9 in Las Vegas, for the largest gathering of the Microsoft community in the world.

Users online (1,607)