Get Outlook Mail Message - FilterByMessageIDs not working

Hello,

I recently read about the new Outlook activity that was introduced by UiPath where you can filter to Message IDs by putting the UID for each Outlook email into the “FilterbyMessageIds” field in the Options section of the GetOutlookMailMessages activity. Link for the article where I saw some relevant discussion: Filter outlook mails by mailID - #9 by Haroon_Patel .

I have a workflow where I am saving the UniqueID of all the emails in the inbox to a variable early on in my workflow - I process the email - then I want to move that email to a subfolder (aka - an Error subfolder or a Processed subfolder) based on the results.

When I’m trying to move my email to the subfolder - I am trying to use the UID in the “FilterByMessageIds” field of the 2nd GetOutlookMailMessages activity. I know the UID value I assigned to the “uniqueemailID” variable is 100% present in my desired Outlook folder - however when I put “uniqueemailID” in the “FilterbyMessageIDs” field - it returns exactly 0 records instead of the 1 record I know exists.

I have attached my sample code - please someone help point out what I am doing wrong and unable to find that email. Is my variable type for “uniqueemailID” incorrect for what FilterbyMessageIDs tries to do?

Thanks!

SampleGetOutlookMessages.xaml (7.0 KB)

Hi,

Is your string actual Mssage-ID? In many case, it’s expressed like <xxxxxxx@xxxxx>
So, for now, can you check Message-ID of the target mail using the following expression?

mailMessage.Headers("Message-ID")

or it should be also confirmed if the target mail is unread because of OnlyUnreadMessages property checked.

Regards,

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