Get queue items for mail message and process each mail

Hi,

I will receive input from a particular mailbox and process each mail(having a table to which tab I need to update) and update in an application. Here I want to use queue to store the email and get each item extract the email content and update in an application.

I am confused how can I Store the email in queue and compare with the outlook email in get transcation data and process it

Could anyone help me with this scenario

Thanks

I can add Mail Message into Queue item as below, using Add Queue item collection I can able to add it. Maybe it is helpful for you.

1 Like

Thanks for the reply,

How can I use it in get queue items in get transcation data

Hi @Priyanga_Karnan ,
1)First pass the mail message to the queue by using add queue item activity and changing the type to System.net.mail.mailmessages.
2)Secondly, just provide the queue name which you used to add mail message in get transaction item.
3)In out_transaction_item you will get the queue item which consists the mail message.
4)Now in process transaction perform whatever desired operation you want to perform with the mail message.

Thanks & Regards,
Shubham Dutta

When try to add mail message to queue it is throwing error as " could not determine JSON object type for type system.netmail.mailmessage

Hi @Priyanga_Karnan ,
I also tried, you cannot pass the entire mail message to queue in UiPath because it is not serializable but yes you can pass the mail body, subject and other information as a string.

Thanks & Regards,
Shubham Dutta

Have tried this approach and it worked.

  1. Add message ID of the mail to transaction item of the queue in the dispatcher process.

Message ID = <Mail.Message .headers(“UID”).To string

  1. In performer process, extract the Message ID from the queue.

  2. Use Message ID in Get Mail by ID activity to get the Mail Message which you can use for further processing like Reply to Outlook Mail Activity.

Please mark it as solution if this helps. Cheers!

1 Like