How to add filters?

Some plz tell me, how to add filters in outlook mailmessage activity? Is there any condition to use?

1 Like

@johns

Could you please tell more details about the issue. On what basis you want to filter mails in Outlook like By subject, From, Body and etc…

Hello @johns

If you want to filter mails from an id then use below expression
"[From]=‘MailSenderID’’’

Regards
Ajay

Hi
In Get outlook mail activity, we got an option called FILTER in the property panel of that activity
–There we can any conditions to compare our value with the methods of mailmessage class that includes,
–Subject
–From
–ReceivedTime
–SenderAddress

so to mention the condition we need to place as a string between double quotes like this
for subject
"[Subject] = ‘yourmail subject’ "
for From
"[From] = ‘yourusernameof the mailid’ "
for SenderAddress
"[SenderAddress] = ‘xyz@gmail.com’ "
for ReceivedTime
"[ReceivedTime] = ’ " + now.tostring(“MM/dd/yyyy”) + " ’ "
or
"[ReceivedTime] = ’ 08/22/2019 ’ "

image

simple isnt it
hope this would help you
kindly try this and let know for any queries or clarfication
Cheers @johns

@johns as mentioned by earlier comments thats one way , even you can apply more filters on the mail object as it contains more methods like mail.Body, mail.Priority, mail.Sender,etc.

Object of type System.Net.MailMessage