Outlook search for a particular email with an attachment containing a specific value

I need to search for a particular outlook email which contain a value in the attachment , ie if the attachment contains “2345” in the normal outlook if we manually search it it will displaying that particular mail with the attachment having the value “2345” , is there any options to automate it ? like getting that email with the attachment having the value ‘2345’?

Hi @JOBIN_JOSE
Maybe try and use a For Each Email (outlook activity found in the UiPath.MicrosoftOffice365.Activities dependency) activity with the filter value being Attachment name - Contains - “2345”. Within the Do section of the loop you can then download the attachment or save the mail message etc.

There might be better ways or activities for this but it was the first thing I thought of.

Hope this helps!

Try this in If-Else activity

ProcessingEmail.Attachments.AsEnumerable.any(Function(x) x.Name.Contains(“2345”))

ProcessingEmail : Email to be processed (UiPath.MicrosoftOffice365.Models.Office365Message) Get this from ‘Get Mails’ activity (MicrosoftOffice365)