Send outlook mail message and then move that mail to a particular folder

Hi Everyone,

I am saving transactions of my cases in an Excel log file and sending that to my email after each transaction using send outlook mail message. It works perfectly.

Now I want to move that mail to a particular folder “AutomationEmail” in my outlook. I am not using get outlook email message activity. How to move the email sent by bot to folder “AutomationEmail”?

Thanks,
Ulaga

  • Use get outlook email activity to fetch all the mails.
  • Loop the mail using For Each
  • Use “Move Outlook Mail messaage” Activity to move for specified folders

image

Hi @Vivek_Arunagiri. Is it not possible without using get outlook email activity i.e to send the mail directly to a specified folder or is there any custom activity? coz in my process there is no requirement now to get outlook emails just want to save the emails sent by bot to a particular folder

Thanks,
Ulaga.

We need to Read mails first, because first bot needs to know which email to Move.

And to read sent items, in Get outlook mail you need to mention the Mailfolder as “Sent”.

Ok thank you @Vivek_Arunagiri. I will try it out

Hi @Vivek_Arunagiri.

I created automation list mail message variable from “Get outlook mail message” activity and using in “move outlook mail message” activity

What is this error message. Do I need to change the variable type?

Hello @Boopathi,

You have to change the type of the variable you are using in move mail activity:

  • MailMessage - The MailMessage object to be moved.

Your are using a List of MailMessage.

Best Regards,
Susana

In Get outlook mail, you will get output mail messages as collection. So you need to use for each to loop each mails. Inside the for each, you will get individual mail. So move mail message activity should be placed inside for each.

Hi @Vivek_Arunagiri. Got it. Thanks.

1 Like