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


  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