I am trying to make a workflow where I print out all the attachments in a mail, using get outlook mail activity.
It works fine until I get an email where someone have attached let’s say 5 PDF files, and embedded one picture (company logo etc.) into the mail.
UIPath seems to think that it is now 6 attachments, and it tries to download one “extra”.
The reason why this is a problem is because I can’t use the “save attachment” activity. I am not going to save them, I want to print. So far my program can print all emails that doesn’t have these embedded pictures in it. Is there a way I can exclude these files?
I am currently using a click button with a variable in the selector. So that it will click whatever attached file with the name “attachment.Name” variable.
Maybe I don’t understand, but, do you want to print all the attachments right ?
So, you can read one, save it in a string variable. Then, with the 2nd, you do the same adding the new attachment to previous string. In that way, you will have a variable with all the attachments that you have read.
Is that what you want? Maybe you are asking for something else… sorry if I’m answering wrong.
@vvaidya Thanks vvaidya. I solved it with "attachment.name.contains(“pdf”).
Another question:
If someone send me an email with two attachments with the same name. How can I differentiate between these?
As of now I use the name of the PDf file to click on the name attribute in the selector. But if I have two files with the same name, my current program would click on the same file because it wouldn’t recognise that it were more attachments than one.
Yes. But I would still have to loop each mail in the inbox. And manually click on “file” → “print” → “print options” → “print attached files” etc for each mail?