Filter mails based on email address from gmail

Hi All,

I have one requirement to read mails based on specific email address and a unique data in the mail content from Gmail account under all mails section.
So I used Get IMAP mail message activity to read the emails but I am not able to filter the emails and then read the emails from Gmail as all mails section will contain huge mails and unable to retrieve the required mail even after reading 100 mails. Can anyone help me on this as I have stuck here and unable to proceed further.

help will be appreciated and thanks in advance!!

Hi,
You could use condition on the mail item inside for each loop as shown below.

More on system.net.mail.mailmessages here

I am doing something similar and see the following error but it worked with the expression item.From.DisplayName.Contains("")

Can i use the same for TO ADDRESS(empty To Address) fitering?

hi @Sri_harsha_Bhasuru
i did the same in my case also
but didnt get any result.
can u suggest any solution??

thanks

@priyanka1991

What are you trying and what error are you getting here ?

i want to get email based on subject.
i have tried some methods given in forum.
but not working in my case.
can u tell me the procedure of getting specific emails through Subject,From address, and Received DateTime.

thanks for your reply @lakshman

regards,

priyanka

@priyanka1991

Please check below threads:

https://forum.uipath.com/t/how-to-filter-messages-in-get-outlook-mail-messages/

https://docs.microsoft.com/en-us/previous-versions/office/developer/office-2007/cc513841(v=office.12)