Email Automation from Outlook

HI Team, I have a excel file with thousand of email id and i need to send a document to all the id’s. The document is an instruction for the user to respond to a survey How to do it. Kindly help

Hello @alex_durairaj,

By following below steps you can do this automation.

  1. Get the handle of excel or csv file (using Excel Application Scope or Read csv activities)
  2. Use ‘For Each Row’ activity to send email for all the listed email id’s in the excel or csv file by getting email column from the given file and also place ‘Send Outlook Mail Message’ activity to send email (in ‘To’ field pass email column name for example row(“Email_ID”).ToString) and in attach file, pass file path from where you want to attach your word file which you want to send in email.

Hope this will help you to automate your use case.

Thank You,
Happy Automation! :slight_smile:

Thanks for you explanation Navneet…

See this sample:

One modification required will be to pass the attachment like Navneet mentioned above.

HI Nadim,

I’m not able to attach the file. Below is the sample. My table has First name, last name and email id. I have to send email to thousand of ID for a survey. Column “C” is my scope. Further i have a word text with color and that should be appended in body of the message . The email should be triggered from BCC field so that other users should know for whom im sending the survery

First Name Last Name Email
Alex Durairaj
Karthi Selvan

Hi @alex_durairaj,

For file attachment task, you can pass the path of file in “Send Outlook Mail Message” attachment property. If you want to decide the attachment at run time than you will pass the string variable which contains the path of file and pass that varible in attachement argument.

Hope this will help!

Thank You,

  1. What code i gave you you can use the same, only edit the column name which is there in the foreach.
  2. If you want to use BCC, then you can put the sending account email id in to, as without To SendMail will not work.
  3. IF you have text with color etc, then you can add the text as body and use html to format it accordingly. I dont think you have a attachment option right?

Thanks you so much Nadim. Earlier i created the workflow the same way but i forget to check the Add headers fields so its showed me an error message.

One query i need to send a phrase in body of the message but UIpath accepting only txt format, so is that the only way is by coding in HTML?

On the properties bar, you have a option to select HTML, but you need to add the data in the body in html syntax

That worked … Thank you so much

1 Like

Great :slight_smile: