How to Include HTML table in mail Body with dynamic Values inUiPath

Sometimes we might need to send the emails which will contain the tabular data in it…

This small HTML template can help you in inserting tabular structure inside the mail body.
Implementation using UiPath

Step 1:

In the Html Template file provided, Add the required number of “tags” for the required number of rows inside the table.

Drag “Read Text File“ activity into the designer panel and provide the html file path to it.

Read the Html Content into a String Variable UserData.
image

Step 2:
Drag “Assign“ activity into the designer panel and Use the Replace method to replace the “varXXX” values with the respective variables to pass the data dynamically.

Step 3:
Drag “Send Outlook Mail Message“ activity into the designer panel and try to provide the required property fields i.e SUBJECT,TOMAIL e.t.c along with the “UserData” Variable that we have with us from the above steps performed and check the property “IsBodyHtml” .
image

Final flow
image
I hope you enjoyed the article!!

Happy Automation!!

3 Likes