List Messages: RPA.Exchange - How can I search an email based on a subject containing a string

I am trying to filter emails based on the subject containing a string and I cannot get it to work.

As a test, I have a few emails with the subject “Gather” in my inbox.

List Messages works fine when going for an exact match:


But when I try to go for a contains match, I am returned an empty array.


I am sure that my syntax is wrong, but I cannot find any examples/documentation of this.
I also tried wildcards in my subject:Gath line with *'s and %'s line but that seems to be taking the wildcards as strings.

Any help is much appreciated!

There is criterion subject_contains which should help on this case.

1 Like