Get Outlook messages filter by email

hey @Sakshi_Jain
I see that’s from 2017, while it does work. Ya, it is a vb.net LINQ, which you can use in an Assign activity to assign the result to an Array of MailMessage type, or directly in a ForEach. The assign activity would just be right after you use a Get Outlook Email or Get Exchange Email activity.

However, I don’t necessarily recommend using this unless you need to process specific emails in groups. For example, you have 100 emails, and you want to loop over half with one subject and then also do the other half with a different subject, so you would process all 100.

What I do recommend, though, is that you use the Filter property of your Get Outlook/Exchange Mail activity. If you don’t use the Filter, getting the mailmessages takes a super long time. For example, if you only need the emails FROM a certain person and 5 of the 100 would be pulled, it would cut your wait time down 1/20th the speed (ya, that’s a big time saver)

Here is a resource on how to use the Filter property:
https://forum.uipath.com/t/how-to-use-filter-property-of-getoutlookmailmessage-activity-to-filter-outlook-emails/307081

Regards.