cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
rg01
Level: Powered On

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
Super User
Super User

Re: Sync Existing Files and Folders From SharePoint to Google Drive

Hi @rg01 

 

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!



Community Support Team
Community Support Team

Re: Sync Existing Files and Folders From SharePoint to Google Drive

Hi @rg01,

 

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.

rg01
Level: Powered On

Re: Sync Existing Files and Folders From SharePoint to Google Drive

Thank you! I will give this a shot!

rg01
Level: Powered On

Re: Sync Existing Files and Folders From SharePoint to Google Drive

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?

Community Support Team
Community Support Team

Re: Sync Existing Files and Folders From SharePoint to Google Drive

Hi @rg01,

 

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.

rg01
Level: Powered On

Re: Sync Existing Files and Folders From SharePoint to Google Drive

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.

Super User
Super User

Re: Sync Existing Files and Folders From SharePoint to Google Drive

pick "Identifier" from the get file properties action

Community Support Team
Community Support Team

Re: Sync Existing Files and Folders From SharePoint to Google Drive

Hi @rg01,

 

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.

rg01
Level: Powered On

Re: Sync Existing Files and Folders From SharePoint to Google Drive

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.

Screenshot from 2019-09-25 16-07-41.pngSP FoldersScreenshot from 2019-09-25 16-08-20.pngGDrive After Flow Runs

Helpful resources

Announcements
firstImage

Better Together Contest Finalists Announced!

Congrats to the finalists of our ‘Better Together’-themed T-shirt design contest! Click for the top entries.

firstImage

Incoming: New and improved badges!

Look out for new contribution recognition badges coming SOON!

firstImage

New & Improved Power Automate Community Cookbook

We've updated and improved the layout and uploading format of the Power Automate Cookbook!

thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Community Summit North America

The top training and networking event across the globe for Microsoft Business Applications

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