Filter Outlook Email by subject line

I want read the email from the inobx->Report(Subfolder Name) then Filter Outlook Email by subject line

Hi @avinash.wankhede

Try this

filteredEmails = mailMessages.Where(Function(mail) mail.Subject.Contains("YourSubject")).ToList()

Hope this helps!!

Hi @avinash.wankhede

Use get outlook mail messages activity and give the folder as "Inbox\Report" and filter as "[Subject] = 'Your Subject Line'"

Hope it helps.

Hi @avinash.wankhede

  • Get Outlook Mail Messages
    Account: Your Outlook Account
    MailFolder: “Inbox\Report”

  • For Each item In MailMessages
    TypeArgument: System.Net.Mail.MailMessage

    If item.Subject.Contains(“Report”)
    Perform actions on the matching email, e.g., save attachments, process the email, etc.’

Hope it helps!!

Hi @avinash.wankhede

Check out the docs

https://docs.uipath.com/activities/other/latest/productivity/get-outlook-mail-messages

Regards
Gokul

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.