Unable to add mail message to orchestrator queue

Hello Everyone,

We are having a requirement where we need to add mail messages to orchestrator queue and assign multiple robots to handle the queue items.

When we trying to add the mail message to Queue we are facing a JSON error . Can anyone please help on this ASAP?

The contents of queue items need to be serializable, and MailMessage objects aren’t.
You can write your own serializer for MailMessage or extract the information you want from the MailMessage and then save that into the queue item: How to create Orchestrator Queues for emails in a mailbox?

Hi, This may not be the perfect solution but you can give it a try. First you can move the emails that are to be processed for that run to a dedicated Email folder say “EmailsToBeProcessed” and then the dispatcher process can have a For each loop to read through the emails and store the emails in a List of type mailMessage and also have a counter say ‘indexCounter’ to keep track of the position of a particular email in the List. On every loop the indexCounter gets added to the queue and email gets added to List. On the performer process you shall read the same set of emails and this time use the indexCounter from the queue item to pick the exact email that needs to be processed so that multiple bots can work on emails just based on the indexCounter. This way we get to work on the email as mailMessage instead of reading all the details of the email before adding to queue and also helps in forwarding the email if required.
As I sad this may be just a workaround :slight_smile: hope this helps.

@SriramUi Could you please explain how we can process mails by having multiple BOTs without getting duplicated. If you any sample work could you please share?