Automate Gsuite and Office365: Sync Google Drive files to Sharepoint

We are going to describe in here an automation idea that can be build in Studio Web with the help of UiPath.MicrosoftOffice365.Activities and UiPath.Gsuite.Activities.

Context: What mundane task are we to automate?

For this automation, we are looking to automate the situation where you have to sync files across different drives. Companies with multiple departments/teams often have their documents spread across platforms like OneDrive, Google Drive, Dropbox, Sharepoint etc.
Some documents are important, and need to be archived or kept in a central point, where anyone can have access to them. For example, Sharepoint serves well this purpose.

Let’s say you have to sync on a monthly bases the documents of your team from Google Drive to Sharepoint document library. Usually this takes a lot of time because you have to download all the files in the format type compatible with Microsoft applications, and after manually upload them to a Sharepoint folder.

Automation Steps

Step 1 - Create the destination folder in the SharePoint document library

Use the Create Folder activity of the Microsoft Office 365 package to create the SharePoint destination folder where the monthly files will be uploaded later.
If you want a custom name that indicates the corresponding month, feel free to use the configuration from the screenshot below.

Step 2 - Iterate through all the files in the Google Drive source folder

Use the For Each File/Folder activity from the GSuite package to iterate over all files in the Google Drive source folder. Make sure that the value for What to return field is set to “Files”, so folders are not returned but only files. Limit to first is left blank so all files are being returned.

Inside the body of this activity you will later add activities to download each file and then upload it to the SharePoint destination folder.

Step 3 - Download each Google Drive file locally

Add the Download File activity of the GSuite package to the body of For Each File/Folder . Then, configure the activity to download the Google Documents types as Microsoft compatible format types.

Step 4 - Upload each file to the SharePoint destination folder

Now use Upload Files activity of the Microsoft Office 365 package inside For Each File/Folder to upload each local file to the SharePoint destination folder created earlier.

Also add the name of the uploaded file to the listOfFiles text value that you can later include in the body of the email.


Step 5 - Send a notification email containing the list of all uploaded files

Finally, use Send Email activity of the GSuite package to send a notification email to an employee who should be aware about the sync of the files.

Now you have one less boring task for yourself, one new task that the robot is happy to perform. :slight_smile:


Let us know what you think of this automation idea! Would you like us to share more of these?

  • Yes, more automation ideas please!
  • No, thank you.

0 voters