I’d like to get only the messages where the body contains word “January”. Tried with something like this:
“@SQL=urn:schemas:httpmail:textdescription like ‘%January%’”
but it does not work.
Could You help me how to make such filter in GetOutlookMailMessages activity?
Check the thread below Similar reference!
I can use this filter: “[Subject]=‘text’”.
But how to get messages where, for example, Body contains some text?
“[Body]=‘text’” and “[contents]=‘text’” dont work.
Thanks for advice!
I checked it and used it the same way I think. That topic is closed so I created a new one.
Or maybe I did some error, can You help me?
we can try with another method also!
After using Get Outlook mail message
Use For each and change the type argument to Mail message
use If condition and express
Then part you will get all the mail message body that contains Body with January!
actually in this email I get like 3000 emails daily and I do not really want to loop through all of them
Is that any error You re getting while using the Format Mentioned in the Post 1?
Please use the below code inside your loop (for each item)
Either use item.Subject.Contains(“January”) or item.Subject Like “January*”
Hope this will help you. Thank you.
@wenar58700 Please visit the official documentation of the activity. It provides two examples of how you can search for a string in an email body. This is the link: https://docs.uipath.com/activities/docs/get-outlook-mail-messages#filtering-examples
One thing regarding this. I had similar task, 2000 users and around 1000 emails. The solution was developed using ReFramework.
You could get all the emails without filter once, and then using LINQ you can filter out those emails.
This saves a lot of time and it will help if outlook or mail server is slow