How to add datatable in the mail body while sending a mail

i want to display the data table in the mail body, how is it possible

1 Like

Create string variable. Add the opening TABLE etc tags.

For Each Row through the datatable and use an assign to concatenate the HTML row (ie TR etc) onto the string variable.

At the end, use an Assign to close the table.

Use the string variable in your send email body. Make sure you’ve set the send email activity to send as HTML.

DataTableToHtmlText.xaml (14.2 KB)
You can use the attached xaml

I got it but how to use send as html in “reply to mail message” activity.There is no option for send as html

hi @jeevanh668

did you try with the output datatable activity to convert your dt as string, and then just call it in the body

best regards!

e.g. with Marketplace packages for creating HTML Table from datatable:

Don’t know, I always use Send SMTP Mail Message because it’s more flexible, simpler, and more reliable than Outlook - and doesn’t even require Outlook to be installed.

1 Like

There is a check box in send mail activity “IsBodyHTML”. Once you will click on that check box and add that mail body into the Body option of the activity the table will get added.
image

Hi Please use create HTML content activity and refer this video

2 Likes

@jeevanh668 Please find the below workflow. If you can pass the data table as input it can format it to table. The same one you can pass to email body

DataTableToHtml.xaml (13.2 KB)

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