Get outlook mail message - Add variable in subject filter condition

Hello everyone,

I an having below filter in get outlook message however I am getting error saying “message”: “Get outlook mail messages: Cannot parse condition. Error at “@SQL=((urn:schemas:httpmail:subject LIKE…”.”, . Can anyone please help me with it. Basically I want to have a variable in subject filtering condition.

“@SQL=urn:schemas:httpmail:subject LIKE '%” + subjVar + “%’”


strVarible is my variable of type string

“@SQL=(”“urn:schemas:mailheader:subject”“LIKE '%”+strVariable+"%’) OR ("“urn:schemas:mailheader:subject”"LIKE ‘%Tickets front door%’) "


Thanks Mukesh however getting below error while executing flow.


Source: Get outlook mail messages

Message: Cannot parse condition. Error at “@SQL=(((“urn:schemas:mailheader:subject”…”.

Exception Type: System.Runtime.InteropServices.COMException

RemoteException wrapping System.Runtime.InteropServices.COMException: Cannot parse condition. Error at “@SQL=(((“urn:schemas:mailheader:subject”…”.
at UiPath.Mail.Activities.GetMailActivity.EndExecute(AsyncCodeActivityContext context, IAsyncResult result)
at System.Activities.AsyncCodeActivity.System.Activities.IAsyncCodeActivity.FinishExecution(AsyncCodeActivityContext context, IAsyncResult result)
at System.Activities.AsyncCodeActivity.CompleteAsyncCodeActivityData.CompleteAsyncCodeActivityWorkItem.Execute(ActivityExecutor executor, BookmarkManager bookmarkManager)

@Kapil ,

After a Copy paste from here .

Manually replace Double Quotes with Double Quaotes and Single Quaotes with single Quote because copy paste gives the below

and uipath expects

It should look Like


Thanks Mukesh! Its working.

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.