How to get outlook emails which are 'read'

How to get outlook emails which are ‘read’ and exclude unread emails

Hi @TrinadhB

In the property panel of the get outlook mail messages activity, uncheck the OnlyUnreadMessages box.

  • OnlyUnreadMessages - Specifies whether to retrieve only unread messages. By default, this check box is selected.

Hope this helps,
Best Regards.

Hi Trinadh,

This might help you

@TrinadhB

You can use this in the filter of get outlook mail messages

"[IsRead] = true"

Then you would get only read mail

Hope this helps

Cheers

It gives the following error -
Get Outlook Mail Messages: The property “IsRead” is unknown.

@TrinadhB

My bad please use this "[UnRead] = False"

Just Tested it and this works as expected to get only read messages

Cheers

HI @TrinadhB

You can use the ‘Get Outlook Mail Messages’ activity. You can uncheck the “onlyUnreadMessages” property and set the “Top” property value as “-1” to get all mail messages.

If you want only unread mail messages, you can check the “OnlyUnReadMessages” option

Check out the docs

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

Regards
Gokul

This works fine and as expected. Thanks!
However Can we tweak it to combine ‘Subject like’ condition to this?

@TrinadhB

You can try this

"@SQL=urn:schemas:mailheader:subject LIKE '%Test my M%' AND urn:schemas:httpmail:read=1"

Replace ‘Test my M’ with any subhect you want to check and 1 is to represent read

cheers

Thank you @Anil_G . Its working super fine.
Thanks Again!!

1 Like

Can you tell me where to learn these queries/expressions?

@TrinadhB

I generally go from here Items.Find method (Outlook) | Microsoft Learn

thats an exhaustive list…

Happy Automation

cheers

1 Like

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