Save Outlook Attachement - zip file attached

I have 3 e-mails: first with one pdf, second with 2 excels and third with one zip file. When running the prepared project only the pdf and 2 excels are saved in the folder.

I sent the xaml file and the same e-mails to somebody and in his case all files were saved.

Any ideas?

@liviupascu

If possible could you take screenshots of your code and paste here. Will check and update you.


I use 2019.5.0

@liviupascu

Here,you are reading Top 3 mails from outlook. Out of 3 any mail contains Zip file attachments or not ? If yes then it will save it.

first - 1 pdf
second - 2 excels
third - zip

Only 1 pdf and 2 excels in the output folder

I added a message box before save with item.subject.tostring + " " +item.attachements.count.tostring and I have subject 1, subject 2 and subject 0

@liviupascu

Inside For Each loop, please put one IF condition and check below one.

                                       If item.Attachments.Name.ToLower.Contains("zip")
                                       Then:
                                                Print  "Zip file exists"
                                        Else:
                                                 Print "Zip file does not exists"

Please check this condition once and let me know.

I have
image

@liviupascu

Sorry. Try this:

item.Attachments.Tostring.ToLower.Contains(“zip”)

@lakshman
I added the if with
Print item.Attachments.Count.ToString +" - Zip file exists"
else
Print item.Attachments.Count.ToString +" - Zip file does not exists"
and these are the e-mails and the print screen from the output folder and from the UiPath studio execution

1 Like

I also used another e-mail containing 1 pdf and 1 zip file


It says that test 3 e-mail has 1 attachement but it has 2. It is like the zip file is ignored all the time.

1 Like

@liviupascu

Yes, Bot is not identifying zip files here.

And what can I do? As I said in the beginning I asked a friend to try it with exactely the same e-mail with zip file attached and for him it worked. Can be an outlook setting? But I did no special setting after installing my outlook. Or an office 365 policy?

@Pablito

Could you please look into this issue. Bot is not able to identify zip files.

I’m not pretty sure but it can be that antivirus or something not allows to save this data. Try maybe to disable any protection and test it. Additionally you could compare with your friends the debugging process to check what’s the difference.

I am able to save manually the zip attachement in the same folder so I do not think that is related to antivirus . I will try to compare the debugging details from a computer where it is working. Thanks.

2 Likes

@liviupascu
Please try the below

  1. Make 3 Mail Message unread in Outlook
  2. Check OnlyUnreadMessages in properties for Get Outlook Mail Message Activity

@kirti.iyer
The same. zip file ignored

Could you able to find any solution for this, I have also facing this issue. Bot ignores Zip file while saving attachments.