Download file attachements from gmail using Google Workspace package activities

Hello!

I want to download files from Gmail (company’s gmail), I used Gsuite Application Scope, and some activities from Google Wokspace package (“For Each Email”, “download Email Attachments”); when I run the process, there is no error message, but there is no files downloaded; I’ve checked in “download” folder; I read some documentation from UiPath, it seems that the files are saved in AppData - Local - temp; there is no downloaded file there.
I don’t understand what am I doing wrong. As a remark, I used a Custom OAuth Client authentication.
Could someone help me?

Thank you!

Regards!

Ruxandra

@Ruxandra_Zamfir

  1. First can you confirm if your for loop is working that is if any emails are retrieved…else the loop it self will not run
  2. In download attachments you get an output variable as well…where listfiles(0).LocalPath will give the exact local path of the file

Cheers

Hello and Happy New Year!

It is the first time for me using this type of activities; could you, please, be more specific? I used “debug” and I didn’t encounter any errors. How should I test if the loop works? Also, it is not clear for me what should I use as an output for the “download attachements” activity?
Thank you very much for your help!
Regards!
Ruxandra

@Ruxandra_Zamfir

When you debug is the control going into the for loop? to check just use a dummy log message inside loop

also use another log message for OutputOfAttachment(0).LocalPath to get the local path

cheers

Thank you! I find the file, the path.
What can I not understand is why the name of the file is changed in the directory (AppData - Local)? I have 4 emails, as a test, with a file attached. It’s true, the name of the file is the same. But the name of the saved file is really strange.
I read the details of the debug and, however, the fullname is correct.
Thank you!
Regards!

1 Like

Could you tell me why the file is downloaded with a different name? What should I check?
Thank you!
Regards!

Ruxandra

@Ruxandra_Zamfir

What fo you mean by different name?

Cheers

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.