Loop through Google Drive results

I am trying to use the “Find Files and Folders” activity (UiPath.GSuite.Activities.FindFiles) to loop through files/folders on Google drive that meet a specific name criteria (name = ‘October 2019 Mid Atlantic Newsletter’).

The result (the population of files that meet the above name criteria) is stored in a variable called “gdrive_results”, which has a “File” variable type.

I am then using a “For Each” activity to loop through the “gdrive_results”. I want to access specific metadata about the files that were found such as name, size, last modified by, etc. Please see the attached screenshots for the structure of the “gdrive_results” variable as well as the “item” variable, which is the variable being used to store each iteration of the “For Each” activity.

In other languages I recall doing something like “item.Name” or “item{“Name”}” to get specific metadata, but neither seems to work. I would like to access name, file size, and last modified date.

Any help is greatly appreciated!

Workflow screenshot:

“gdrive_results” structure:

“item” structure:

Hi @stephen.p.lauver
Did you get a solution to this? I am stuck with something similar…want to check that on a specific folder on Gdrive if any new files have been uploaded or not…any help would be appreciated

Hi, Aditya! Welcome to the community)

I haven’t tested the specific case, but try using item(“name”).ToString

About activity: Find Files and Folders
More fields

Can you please explain how…it’s like there is a folder on the drive it has various spreadsheets. I want to update every sheet in that folder to some other portal. But it has to be done in such a way that for example every night i check if any new sheet has been added or not, if yes, it will pick that sheet and download it locally and upload it to the desired location.

Aditya, I thought you had the same problem as above. If you don’t mind, please start a new topic to discuss your question)

Sure. Thanks. I am new to this community and this was my first one so didn’t know how to go about it. Will start a new one

1 Like