Google Drive Find Files and Folders

I would really appreciate your support.
I have files uploaded to a Team Drive folder. I need to get the link for each of them to be able to share via Gmail. I’m struggling to make the Activity give me any result that’s not “”…
I’ve tried searching both by file name and by folder name …
It “works” with “mimeType=‘application/pdf’” but as I’m not able to limit the results by file or folder name it doesn’t help…
Thanks in advance for your help

Hi @natalynv

Files=Directory.GetFiles(input)

Based on file

Path exists
Get outlook messages

Thanks
Ashwin.S

Thank you for taking your time. I guess my explanation was not clear. I need the “shareable link” for the pdf stored on a Team drive (Google). I know the folderID, the file name (as it’s coming from the previous process done by the robot), I am not able to retrieve the fileId (I know how to get the link having fileId).
I have used the Google API and I still get the same 400 error message, so definitely it’s not an issue with the UiPath integration, just wanted to know if someone has used the Team drives for something similar (download files, get file information, find files).

You can use Gsuite application scope and it has Find files and folders activity for google drive.

It return Google.Apis.Drive.v3.Data.File array. You can use the array length and check file is available for the given name.

For use the find File and folder array details you need to Imports the Google.Apis.Requests

driveFind_2

You can fine the property list by this

If you didn’t import the Google.Apis.Requests you may get this error

Thank you very much for your reply, I’ve found the way to iterate through the array already but it took me a while so your message will be useful for someone struggling with this again :blush:. Maybe today, after seeing your answer, I will be able to simplify the way it’s done: check for the file directly so using “FeelingLucky” instead. Hope I’m right :slight_smile: