How to download a updated file from Google Drive

Hi Guys,

I have a excel file inside a folder in the Google Drive. Now whenever the excel file is updated with new values I have to download that excel file from google drive. I found an activity called file updated trigger activity in gsuite package. but I am not sure how to use it.

How to achieve this? Kindly help

Thanks

Hi @mohamedalthaf ,

Step-by-Step Guide:

1. Install the GSuite Package

  • Open UiPath Studio.
  • Go to Manage Packages.
  • Search for UiPath.GSuite.Activities.
  • Install the package.

2. Set Up Google Cloud Project

  • Create a project in the Google Cloud Console.
  • Enable the Google Drive API.
  • Create OAuth 2.0 Client IDs and download the credentials file (JSON format).

3. Configure GSuite Application Scope

  • Drag and drop the GSuite Application Scope activity into your workflow.
  • Configure it using the credentials file you downloaded from the Google Cloud Console.

GSuite Application Scope

  • ClientID: “Your_Client_ID”
  • ClientSecret: “Your_Client_Secret”
  • ApplicationName: “Your_Application_Name”
  • AuthenticationType: OAuthClientID
  • CredentialsPath: “Path_To_Your_Credentials_JSON_File”

4. Use File Updated Trigger Activity

  • Inside the GSuite Application Scope, add the File Updated Trigger activity.
  • Configure it to monitor the specific folder where your Excel file is located.

File Updated Trigger

  • DriveName: “My Drive” // or the specific shared drive name
  • FolderName: “Path/To/Your/Folder”
  • PollingInterval: 60 // time in seconds to check for updates

5. Download the Updated File

  • Inside the File Updated Trigger, add the activities to download the updated file.
  • Use the Find Files and Folders activity to get the file ID.

Find Files and Folders

  • Query: “name=‘Your_Excel_File_Name’ and mimeType=‘application/vnd.google-apps.spreadsheet’”
  • Output: filesList // variable to store the list of found files
  • Use the Download File activity to download the file using the file ID obtained.

Download File

  • FileId: filesList(0).Id // assuming it’s the first file in the list
  • OutputFilePath: “Path/To/Save/Your/Excel_File.xlsx”

Regards
Sandy

@mohamedalthaf,

Use Integration Services for this. Use Google Drive Connector for this and File Uploaded trigger.

Thanks,
Ashok :slight_smile:

@mohamedalthaf

check this thread as reference