Get outlook mail activity

i need to filter by particular mail and i need to take the subjects alone.where subject contains date and some subjects i need to take date alone to be written in excel any ideas?please help on this


Hi @priyankavivek
You can use Filter in Get outlook Mail Message Property “[Subject]=‘SubjectName’” and for date you want from the subject can you provide more details about it?

my subject is like invoice 23456 23/06/2019 i need to take date alone and from particular mail

For this You can use

  • You will get an subject in Variable suppose SubjectVariable
  • Then You Can use SubjectVariable.split(" ")(1) so it will give you date only.

how can i get mail from particular mail/in if condition mail.from.address.contains( is this is correct?

Yes Its Correct

but i dont get the output for it

Make Sure email id you are giving it in is correct.

yes its correct

Are you getting any error? if yes then can you attach screenshot of it.

Hi @priyankavivek

Hope these steps could help you resolve this
— use a get outlook mail activity and the mention the condition like
“[Subject]=‘yoursubjectstring’ AND [senderemailaddress] = ‘’ “

Or if we have the user name instead of mail I’d of the sender then
“[Subject]=‘yoursubjectstring’ AND [From] = ‘Username’ “

Or if you want to compare the part of the subject alone
The we can use this From or Senderemailaddress filter alone like
“[senderemailaddress] = ‘’ “
“[From] = ‘username’ “
— get the Output from the outlook mail activity as a variable of type list mailmessages
— pass this variable as input to the for each loop and change the type argument as string in the property panel
— inside this loop use a if condition like
Item.Subject.Tostring.Contains(“yousubject date you want to check with”)
If the above condition passes it will go to THEN part of If condition
Where we can include any activity we need

Hope this would help you
Kindly try this and let know for any queries or clarification
Cheers @priyankavivek


it shows subject is not the member of string

Kindly change the for each activity property type argument to mailmessage - in the property panel
Cheers @priyankavivek

1 Like

thank you i try to do further

1 Like

Cheers @priyankavivek

i wasnot sure about the date from the mail subject what condition can i use?

Set like less than certain date
Like this
** " [ReceivedTime] < ’ " + now.AddDay(-3).ToString(“MM/dd/yyyy”) + " ’ "**

i have mentioned as -3 that is less than 3 days from today
you can keep your own
Cheers @priyankavivek

1 Like

thanks for your reply ,daily i have to check the mail with subject+date ,as i need to extract the date for daily basis ,can i use this condition?


yes of course
like this
"[subject] = ‘your subject’ And [ReceivedTime] < 'your condition ’ "
(as mentioned above)
or we can keep the ReceivedTime alone in the filter property and
check with subject using if condition as suggested here

Hope this would help you
Cheers @priyankavivek


Hope your issue is resolved @priyankavivek