UiPath still can't handle emails properly in REF?

So it’s been a while since I last fiddled with email automation and UiPath. But now a candidate has come up, where the input is emails.

Of course I want to simply add the emails to the orchestrator queue, and proces each queueitem, and finally move the email to either a “Success” or “Failed” mailfolder.

This task is pretty simple, but years back I never found a smart way to do this. It was as if UiPath was not able to get a handle of unique emails.
We just upgraded to LTS 2020.10, and it seems this still can’t be done in a simple manner.

I’m pretty sure BluePrism have had this down for years now, so is this never coming to UiPath?

Hey @MikkelNielsen

Is there a reason why you need to add mails into the Queue? why don’t you just get the mails and process them at once? you can then log the information about each mail to orchestrator.

I work for a big enterprise and all our robots use the REF so we very much depend on the queue functionality.

It sounds really unnecessary to want to send email items to the queue, emails are already on the exchange server, you can access them when ever, moving them to the queue serves no purpose.

I assume by REF you are referring to the Framework, if so then you can manipulate the framework to not use the queue.

You just need to handle your emails inside a for each, if it fails it must move that email to failed folder and continue.

Hi, check this out:


Lets talk this through then.
This is how we use the REF:

I have the Init phase, in which I will extract all the relevant information from each mail, and add this data to the Queue. So this is where I have my For Each, enumerating all the e-mails.

Then I got the Process phase that processes each transaction from the Queue.
At the end of my Process, I ultimately need to move the mail in question to another outlook/exchange folder. In case the processing of the mail goes awry, I would move the mail to another folder.
I need to get the unique “handle” on my specific mail. Metadata such as Sender, Subject is not usable here, I need a unique ID identifying precisely the mail in question.

This is how I thought of course I would like to just add the mail to the Queue, as I would then suspect I have complete assurance of what mail I am processing.

Seeing how this is not possible (it is in BluePrism by the way), I found a workaround:

In the Init phase, add this to the Queue Item: item.Headers(“Message-ID”)

In the Proces phase, extract the MessageID from the TransactionItem, and use the GetOutlookMailMessages activity to get a list of (1) mail, where the Property “FilterByMessageIDs” is populated with an array of (1) MessageID.

Then at the end of Process, use a ForEach to enumerate the list of (1) MailMessage, and within the ForEach use MoveOutlookMessage activity to move mail in question to whatever folder.

This actually works, but is of course dependant on you knowing which folders the mails are in. The ultimate solution would be able to find a mail within an exchange account whereever it is, but I can move on now.

Thanks for the help SenzoD, and please give feedback/questions if you like…


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