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
By following below steps you can do this automation.
- Get the handle of excel or csv file (using Excel Application Scope or Read csv activities)
- 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.
Thanks for you explanation Navneet…
See this sample:
One modification required will be to pass the attachment like Navneet mentioned above.
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
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!
- What code i gave you you can use the same, only edit the column name which is there in the foreach.
- If you want to use BCC, then you can put the sending account email id in to, as without To SendMail will not work.
- 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