Hi Guys! Need to ask you guys for your help, which is my company ask me to get the outlook message inbox with this subject: Movie Line-up from… and need to be the top 1 as they don’t want to change or count the top message so is there any filter options for the subject? They don’t want to use the if condition too.
use get outlook mail activity to get the mail and output as mailmessage type named out_mailmessage
and mark the propertyies like Onlyunread and mark as read, that would read only unread messages and mark them as read once identified and topmessages as 1 that would read only first mail that is identified
And here comes the answer for ur query, put suject filter in filter property like
“[Subject]=‘[Movie LIne-Up]’”
@Palaniyappan hey buddy is there anyway to get the subject to filter like if I have Movie Line-up from 28-Apr how to use any special character to filter Movie Line-up from… like I only need to care Movie Line-up from
@phoenix123
Buddy in that case you can use if condition like this once after getting the collection of mails from get outlook mail message
get outlook mail message with output variable out_mailmessage
for each loop with input as out_mailmessage and type argument as mailmessage
use a if condition inside the for each loop like
item.subject.Contains(“Movie Line-up”)
if this condition gets passed you can get whatever segment you want from that mail using a assign activity like this inside the then part of if confition
out_mail_body = item.body.ToString
The reason why we cannot have such condiions in subject , is given in detail here for your reference,
Kindly let know whether the above mentioned condition works or not buddy @phoenix123
Cheers
@Palaniyappan hey buddy how to know the latest email with the specific subject? Means that my case I got lots of email but my company don’t want me to put top number of the actual email just put one to find the specific subject Movie Line-up from…
you can enable the property onlyunreadmessage as check that would read only the unread recent message and enable the markasread as well that would make that as read so that when new mail comes next time, only that new mail willbe fetched or use certain filter conditions like if you know the time span
@Palaniyappan hey buddy thanks for your reply unfortunately my company dosen’t want that because they tell me if they have many emails in the outlook, they just want this subject Movie Line-up from… and must be latest one using top 1 message options.
@Palaniyappan hey buddy I really prefer the first one more logic to me but the subject can they have like "[Subject]=‘Movie Line-up from*’ " Got any clues on that?
buddy … you cannot use wildcard with outlook properties in filter rather you can use conditions like this
item.Subject.Contains(“Movie Line-up from”) or item.Subject Like “Movie Line-up from*” inside the workflow
Thats is how it is done buddy @phoenix123 and it is more reliable and stable method to check with subject and retrieving the mail
@Palaniyappan my activity can work but my colleague tell me wrong if next time I installed on their machine and when they run confirm get error as their outlook email really a lot so that’s why they try to get the specific subject and must be latest one using top one.
So the mails willl be always in order like recent first and remaining next to each other right
ok
get outlook mail activity to get the mail messages in collection with onlyunreadmessage and markasread both checked i.e., enabled
inside a for each loop pass this out_mailmessage as input and change the type argument as mailmessage
use a if condition inside the for each loop
here comes your solution
in the if condition we will be mentioning like item.subject.contains(" Movie Line-up")
if this is passing it will go to then part right…?
so inside the then part we get the details of the mail " 2. Movie Line-up from 2 May"
as it iterate through the out_mailmessage variable inline
once after getting the details in then part of if condition we can use Break activity,
so that once the condition is met and details obtained loop will get over and thus workflow gets over like this, it wont even go for " 3. Discipline matters"
This is reliable, isn’t it, wont miss even a singlemail
Buddy If this make sense and got resvolved
Kindly close this thread with right comment marked as solution that could help others looking for solution buddy