Download one attachment in email

Hi everyone, can someone please help, I want to create a process that can download just one attachment in an email, if the email has more than one attachment the process should throw exception saying it has more than one attachment in the email, if the email has just one attachment then it should download it, can someone please help with this process

you can mention top 5 or 1 in property panel

@Joe.Osifo

  1. First read mails using Get Outlook Mail Message activity and will give you output as list of Mail Messages and say ‘mailMessage’

  2. And then use ForEach loop to iterate one by one mail

         ForEach mail in mailMessage
              If mail.Attachment.Count > 1
               Then throw Exception
                Else use Save Attachments activity to save Attachment
    

How can we Download only particular mail among the many mails.

I have 2 mails 1. data1.xlsx and 2.Data2.xlsx. I need to check weather there is aData1.xlsx and if it id there I have to Download that mail…

Could you please help me on this

Thanks