cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Anonymous
Not applicable

Sync Existing Files and Folders From SharePoint to Google Drive

I'm brand new to Flows and I am trying to sync exisiting files and folders from SharePoint to Google Drive but I only see a template for syncing new files, which does work.

 

While this is useful, it doesn't help when I want to copy already existing files and doesn't appear to be able to sync folders in folders.

 

Ultimately I would like to have a schedule for the folders and all content inside the folder, including other folders, to sync once a day and update to GDrive. Is there a template for this already that I am just not seeing?

9 REPLIES 9
Highlighted
Super User III
Super User III

Hi @Anonymous 

 

Add a custom column in your SharePoint library called 'Sync' type boolean. Set the default as false. Once the file synched to Google drive then update the column to true. When ever you retrieve the SharePoint files filter against Sync false so that you always retrieve the files which are not synced.

 

There is no flow template for reading all the files inside the another folder. For getting the sub-folders inside the folders you probably need a flow to do a recursive method to extract the files. 

 

If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up.

 

Thanks

 



Did I answer your question? Mark my post as a solution!

If you liked my response, please consider giving it a thumbs up


Proud to be a Flownaut!

Learn more from my blog

Power Automate Video Tutorials
Highlighted
Community Support
Community Support

Hi @Anonymous,

 

There is no direct action to sync files from the SharePoint library to Google Drive.

But the is a workaround you can do it, please follow these steps to create your Flow to sync files:

 

Step 1: You need to create a folder named as your SharePoint library, mine is named LibraryA:Annotation 2019-09-19 163712.png

Step 2: We start to create a Flow with a manual trigger, it will run if you click the button, or you can create a currency trigger run every day.

Step 3: Get these files from your library, then Apply to each of them. Firstly, we need to judge each of the file whether is a folder, if it is a folder, skip it. If it is not a folder, get the file content and create its mirror file in the Google Drive.

Annotation 2019-09-19 163313.png

Step 4: If the file has existed in the Google Drive, get the file id use the Get file metadata using path action, and then update it. One point that should be noticed is that we need to set the Configure run after of Get file metadata using path action as the previous action has failed. So, the file would be updated if the file has existed in the Google Drive.Annotation 2019-09-19 164710.png

 

Annotation 2019-09-19 164720.png

Please have a try, I hope it can help you.

Best Regards,
Community Support Team _ Lin Tu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Highlighted
Anonymous
Not applicable

Thank you! I will give this a shot!

Highlighted
Anonymous
Not applicable

At the Get File Content step I selected the Site Address but I also need a File Identifier. What do I need to enter for that?

Highlighted

Hi @Anonymous,

 

Please put the Identifier into it.

Annotation 2019-09-23 175343.png

Best Regards,
Community Support Team _ Lin Tu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Highlighted
Anonymous
Not applicable

I built the flow as you described but I must be missing another piece.

 

When I click "Save" I get the error below error for both "Get files (properties only)" and for "Get file content" later in the flow.

   "Enter Sharepoint site address and list/library name"

Screenshot from 2019-09-23 11-29-25.pngScreenshot from 2019-09-23 11-28-25.png

 

I have selected the site address from the dropdown for the site I want and I have selected the library, also from the drop down. Both clearly exist, otherwise I wouldn't see them and be able to select them.

Highlighted

pick "Identifier" from the get file properties action

Highlighted

Hi @Anonymous,

 

Never mind, it's just a notification, not a warning or error.

 

And please use the Identifier instead of file path + filename with extension.

Annotation 2019-09-24 175815.png

 

Best Regards,
Community Support Team _ Lin Tu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Highlighted
Anonymous
Not applicable

Moving in the right direction! Thank you! It did copy all of the files from each of the folders and placed them into the root of the Google Drive folder I created.

Screenshot from 2019-09-25 16-04-17.png

 

Is it possible to have Sharepoint create the folders in Google Drive and place the files into the correct folder?

Or do I need to create a flow for each and every folder I want to keep synced?

   There are a lot of folders and sub folders. I can use the guidance you gave me to make more flows that are similar but it would be very time consuming to do that for every folder and sub folder.

 

 

A lot of these files are in sub folders in the SharePoint library, but as you can see in the screenshot, they are all in a single folder in Google Drive.

SP FoldersSP FoldersGDrive After Flow RunsGDrive After Flow Runs

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

Power Platform ISV Studio

Power Platform ISV Studio

ISV Studio is designed to become the go-to Power Platform destination for ISV’s to monitor & manage published applications.

Top Solution Authors
Top Kudoed Authors
Users online (9,998)