Dynamically send emails from excel column as receipt in outlook body as a table

Hello team,

I have an excel file with three columns like below

List of names and emails and contents .xlsx (9.5 KB)

I want to send email to the email ids in 3rd column as a table in outlook to respective people.
I am new to UiPath.
Also i want to send email to abc and all its contents ina single email as a table not multiple emails.

So the requirement is filter the distinct emails and send its associated content as a table in single email to respective people.

Thanks in Advance.
Please share the XAML file.

@Nandan_Kumar_Prasad Please check below xaml file.

Test.xaml (16.1 KB)

2 Likes

Thank you very much!

But I am getting error. Below is the screenshot of the same.

Please help me as I have a project tomorrow on the basis of this.

@Manjuts90 Thanks a lot! I have figured out the mistake and I am able to get the required result.

1 Like

Hello @Manjuts90: I would need a small help as I am not able to do it.
I have changed the excel file and now there are 16 columns in it.
The last column is Email address and I want all 16 columns to be sent as a table in outlook email body part. Can you please guide me.
Here is the excel file.

TestEmail.xlsx (10.9 KB)

This is the error i am getting.

1 Like

@Nandan_Kumar_Prasad , can you share your xaml ?

Test_Email.xaml (12.6 KB)

Above is the Xaml file which i was trying to do for 7 columns first. In actual I would need all 16 columns.

I found this How to email using outlook and append body with table of content - #9 by rahatadi

check once if it is helpful. @Nandan_Kumar_Prasad

Sorry its not working for me. The above which was shared by @Manjuts90 was perfectly working.
I just want all 16 columns to be added as table like it is working for 3.
I am working on that but not able to find where I am going wrong.

getting the below error.

@Nandan_Kumar_Prasad To add all 16 columns try to add few variables to existing code.

I editing the code which i present in workflow which i have sent
For adding column names follow like below. keep on adding till as many as columns you required like i added dt.columns(3).ColumName

 table_Template+"<table style='width:80%'><tr><th>"+dt.Columns(0).ColumnName+"</th><th>"+dt.Columns(1).ColumnName+"</th><th>"+dt.Columns(2).ColumnName+"</th><th>"+dt.Columns(3).ColumnName+"</th>.....</tr>" 

For adding data in row follow like below. i added row(3).ToString to previous code

  table_Template+"<tr><td>"+row(0).ToString+"</td><td>"+row(1).ToString+"</td><td>"+row(2).ToString+"</td><td>"+row(3).ToString+"</td>....</tr>"

Error you getting because of To address variable is empty please check it once.

1 Like

Thank you!

I had figured out that there were few blanks in Email Address columns.
I tried and I was able to get the result.

However I have a question,
Can we send the table as well as attachment with the email and is it possible to update the Hi and Name of the receipt in the email as we have Name columns as well in Excel file.

@Nandan_Kumar_Prasad if you have to send your data as attachment then create excel file for file and attach it to mail while sending the mail.

Thank you for quick response however I wanted to send attachment what is there in body of email not the whole sheet.

Now again, is it possible to update dynamically the name of sender in body of email instead of saying just Hi?

@Nandan_Kumar_Prasad You can create separate excel file based on each email id you do filter and send to that particular excel file as attachment.

You update name of sender dynamically in email body.

That is what I have been asking how to update sender name dynamically in email body.
Been working on this

@Nandan_Kumar_Prasad Based to Previous code i have provide i updating the value in that code. Below is the part of the code not complete code.

 <Title>Hi "+Name+"</Title>

Here Name is string variable which contains Name of the person. first we have access value to it based on where you get that value.

If your getting the name of the person from excel file only then provide column index number.

<Title>Hi "+row(0).ToString+"</Title>

Here 0 will refer to first column you change accordingly.

Thank you buddy!

I have done via alternate and it is giving the same result.

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.