send email with template in html

Hello everyone,

I have a template like this in html (either in word), I want to send emails to clients that the invoice number, invoice date, and amount would be changed variously based on an Excel file.

I tried to load this template with an HTML parser and file reader. but it didn’t appear as the original.

I can’t upload the HTML here, please find the Word file instead, I converted it to HTML from word.

test.docx (18.4 KB)

I welcome every idea and appreciate every help!

Hi,
The file you provided has lots of surprises in it.
The biggest issue I see is that it doesn’t look at all like you have the original HTML, so every tag is nearly the same as every other tag (e.g. tr class=“c34”, tr class=“c35”). That said, it appears that you can use a Line Reader node, an HTML Parser node, and an XPath node to at least split things up in a reasonable way. If you then use a Row Filter configured with a suitable regex, you can probably pull out what you need well enough that you can do the rest using String Manipulation, perhaps taking an appropriate number of characters from the end.
testHTML.knar (89.3 KB)
Give this a try. (It was created in 5.3.3, so you might need to upgrade to see the configuration, but it should get you started.)

2 Likes

Hi @llepome ,

Appreciate your idea but I encountered this error when ran it.

Besides, I did it by myself by using Java. Would love to share it here. This will export a draft email in HTML to preview. And, also send email with attachments.

auto email with dynamics attachments.knwf (126.2 KB)

2 Likes

That’s great! Glad you arrived at a solution!

For my approach, yes, you would need to adjust the path and file name in the first node of what I sent so that it would find your file. I didn’t do that exactly correctly when I exported, I guess.

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