"For each files" function for Google Drive

Hi everyone,

I have to upload various files in different folders from Windows to GDrive.

For exemple :

I have a file name “List A_02012023.csv” on my computer and I have to upload it to the folder named “List A” in GDrive

I have an Excel file with a column with IDs of Gdrive folders and a column with “List A, List B, List C…” for matching files names and GDrive IDs.

I can’t find a “For each GDrive files” function like you can have for Windows folders/files.

I only use UiPath StudioX

Do you have any information or advice ?

Thanks

1 Like

Hi @hadrien_amimer

You can use the “Google Drive - Upload File” activity to upload files from Windows to Google Drive.

To automate the process of uploading multiple files to different folders in Google Drive, you can use the “For Each” activity in UiPath StudioX. You can loop through the files in your local directory and read the corresponding folder ID from the Excel file. Then, you can use the “Google Drive - Upload File” activity to upload the file to the specified folder in Google Drive.

Here’s an example of how you could structure your UiPath workflow to achieve this:

  1. Read the Excel file containing the folder IDs and file names using the “Read Range” activity.
  2. Use a “For Each” activity to loop through the data table returned by the “Read Range” activity.
  3. Within the “For Each” activity, use an “If” condition to check the file name and match it with the folder name in Google Drive.
  4. Use the “Google Drive - Upload File” activity to upload the file to the specified folder in Google Drive.
  5. After uploading the file, you can use the “Write Range” activity to update the status of the file in the Excel file.

This is just an example of how you could structure your workflow, and you may need to adjust it based on your specific requirements. But it should give you a good starting point.

Regards

Milos :robot: