I want filter mail outlook.
I have value SenderEmail = ‘xyz@xyz.com
value Subject = Report
If I wanvalue t use filter in Get outlook mail messages.
How to code it?
Condition Filter mail that SenderEmail same value SenderEmail and SubjectMail contain Subject.
Please guide me about it.
Srini84
(Srinivas Kadamati)
2
@fairymemay
You may check below documentation
Hope this may help you
Thanks
1 Like
@Srini84 Yes.
But I don’t know how to pass variable in Filter Expression.
lakshman
(Ganta lakshman)
4
@fairymemay
Try below expression in Filter field.
-
Filter mails from specific sender.
"[SenderEmailAddress] = '"+varEmail+"'"
-
Filter mails based on specific subject.
"[Subject] = '"+varSubject+"'"
Here varEmail and varSubject variables are of type String.
1 Like
You can use a for loop and an if condition using filter straight in the get outlook activity cant include conditions like contains ,starts with etc
so better to take the output of get mail activity and loop the activity with type argument as System.Net.Mail.MailMessage
1 Like
@lakshman error as below.
lakshman
(Ganta lakshman)
8
@fairymemay
It should be like below.
"[SenderEmailAddress] = '"+fromEmail_Round1+"' AND [Subject] = '"+mailSubject_Round1+"'"
2 Likes
Hi @fairymemay
please find the below sample
Main.xaml (6.3 KB)
Thanks
1 Like
Hi @fairymemay
Further to @lakshman’s post.
Check out the screenshot below:
For the full list of filter examples check out the documentation here.
Cheers
Steve.
1 Like
@nikhil.girish If I want use variable mailSubject_Round1 replace Report.
How to edit code?
Hi @fairymemay
"@SQL=urn:schemas:httpmail:subject LIKE '%"+mailSubject_Round1+"%'"
Thanks
2 Likes
system
(system)
Closed
13
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.