How to use multiple filters with 'Get IMAP Mail Messages' filter expression?

Hello, if anyone could kindly assist.

I’ve been attempting to use two filters in the expression field, in order to find unanswered emails from a certain time period that also have a specific word (‘invoice’) in the subject, without having to iterate through messages received using only one search method. After scouring this forum and the learning resources that users with similar queries were provided with, I am still unable to process my expression.

My best attempts so far as follows are:
A) “UNANSWERED SINCE " + DateTime.Today.AddDays(-30).ToString(“dd-MMM-yyyy”) + " AND SUBJECT invoice”
B) “UNANSWERED SINCE " + DateTime.Today.AddDays(-30).ToString(“dd-MMM-yyyy”) + " AND” + " SUBJECT ““invoice””"

Unfortunately I still get the error: Get IMAP Mail Messages: The IMAP server replied to the ‘SEARCH’ command with a ‘BAD’ response: Could not parse command

Is it possible to combine search fields or is it only possible to use one?
Thank you in advance

1 Like

Hello @M_Kotze

Welcome to UiPath community…!

Please check the below doc for the expression that you can use to filter the emails.

Thanks

Thanks Rahul, I have been using this doc to get to where I am, but it doesn’t specify how to combine search terms :frowning:

I am also having this issue, did you ever find a solution?

UiPath Tutorial 09 - Read Email in UiPath | Filter Email in UiPath | Get IMAP Mail Messages Activity - YouTube it will be usefull. filter, for each and if.