Solved

Email reply for those emails who have an attachment only. 

  • 3 December 2023
  • 6 replies
  • 126 views

Badge +5

Hi, does anyone know how to send an email reply for those emails who have an attachment only. Thanks!

icon

Best answer by Abhay Naik 3 December 2023, 15:28

View original

6 replies

Userlevel 3
Badge +7

Hi @Shusha321,

 

You can use the loop trough each email and store the output in the dictionary variable. Then use “emailNoOfAttachments” key to retrieve number of attachments in each email. If there us no attachment and you’ll get output as 0 and if there are attachments then it will give you number of attachments. You can then use if condition where attachment is not equal to 0 and send the reply.

 

Hope this helps!

Badge +5

Thank you for this @Abhay Naik I successfully run the taskbot. :) 

Badge

 Hi @Abhay Naik ,

 

I´ve noticed that the “emailNoOfAttachments” key also counts attachments like pictures embedded in the email body, e.g. within the email signature. So it gives back values <> 0 although there´s no real file attached. Is there also a way to determine the number of attached files?

 

Thanks in advance!

Userlevel 2
Badge +6

 Hi @Abhay Naik ,

 

I´ve noticed that the “emailNoOfAttachments” key also counts attachments like pictures embedded in the email body, e.g. within the email signature. So it gives back values <> 0 although there´s no real file attached. Is there also a way to determine the number of attached files?

 

Thanks in advance!

Not really, a picture in the signature is still read as an attachment in the email message 

Badge

Thanks a lot @jon.stueveapeople for your quick reply!

 

Although the pictures are counted as attachments in the “emailNoOfAttachments” key, they don´t seem to be regarded as such in the “Email: Save attachments” command where only the “real” attached files are saved to a given folder. This might be something to optimize in future updates of the Email package as it doesn´t seem aligned!?! However, as a developer I found that a bit confusing… Thanks!

Badge +7

Hi @Shusha321 

For this what u can do is , if you already know the format of the file that you are going to download from the Email, then u can use save attachments in the Temp folder then use each file in a folder option to filter only the file that you are looking for and delete the files that are not required.

Reply