Check size of attachments in Email

does anybody know how to check the size of email attachments?
My Problem: I want to save all attachments in one folder, but Uipath recognizes small icons from sender’s email signature as attachments and saves them also. I don’t want them.
Do you know how to solve this problem?
Thank you very much!! :slight_smile:

Best regards,

Hello @ajlakasic

Which activity or what process are you using to save attachments?

First I am “getting” them via mail.Attachments and then to save them via invoke activities:

Did you try using save attachments activity?

actually not… It is because each attachment that someone sends will have a name that I will assign…(I cannot take the names sender assigns)…

I tried right now - but it still saves all the attachments… (all these small icons) → maybe is the solution Filter? but what shall I apply there? Do u maybe know? (like attachment.size or whatever)?

See if this helps!

Hi, not really :frowning:
U don’t know any other solution? thank you!

If you do a For Each on the set of attachments, then you can access the item.ContentStream.Length property (it is an Int64 type) and make a decision based on that.

I know it has been a while, but I have the same problem & here’s the first search result I hit, so I added it here so anyone with the same problem will hopefully find it quickly.

Regards, Stewart

1 Like