Attachments downloaded from Google Workspace Packages are with a random name!

Hi,

I have downloaded the attachments from Gmail using Google workspace activities but the attachments are with a different name with broken extensions like this:-
image

Regards

@ashokkarale,

Kindly let me know this, why is this happening

Thanks!

@Bot_YT,

As mentioned on another thread, it might be duplicate names in the folder. Try downloading some another file with unique name to check if it’s happening to them also.

Thanks,
Ashok :slight_smile:

@ashokkarale ,

There is only one file named “Demo.pdf”, also i checked with other files its showing the same

Thanks!

@Bot_YT,

Ohh ok. In that case I’m not sure what could be the reason but you can rename the file using Rename File activity.

Thanks,
Ashok :slight_smile:

Sure thanks for the headd up :slight_smile:

@Bot_YT,

Glad I was helpful.

Thanks,
Ashok :slight_smile:

set a breakpoint (ensure you have entered properly the body block from the fore each Email)
Use the immediate panel and type in:
CurrentEmail.AttachmentsNamesList

Understanding the 6 Debugging Panels of UiPath in the easiest way possible! - News / Tutorials - UiPath Community Forum

So you can inspect on how the atttachment names are seen by the looped mail

@ppr

Yup i did that but its again throwing the random names, again and again

when the looped email will have these Attachment names then check the email itself e.g. in your Gmail Mail postbox. Does it have different Attachment names?

Feel free to share with us screenshots

  • from immediate panel
  • email with attachment hints from the GMail post box

@ppr,

I am trying to rename the Attachments using a for loop(this is to iterate files inside the folder), after that using a renaming activity to rename, but when i use Attachments(0).FullName, its showing the right attachment name

image
This is inside the rename activity in the New Name Field

we asked for different

@ppr,

Yes here it is