Combine 2 HTML tables in 1 email

Hi Team,

Currently, working the HTML email part. I am trying to send 2 HTML tables in 1 email. May I Know , how can acheieve it.

Below is the workflow related.

Please help me , how can I send 2 HTML tables in 1 email. Bascically, I need to more than 10 HTML tables in 1 email .

Information on your n8n setup

  • **n8n version: Version 1.3.1
  • **Database (default: SQLite): default: SQLite
  • **n8n EXECUTIONS_PROCESS setting (default: own, main): (default: own, main):
  • **Running n8n via (Docker, npm, n8n cloud, desktop app): n8n via Docker
  • **Operating system: CentOS 7

Hi @DilipChiru

You need to use a merge node before sending the email.
So after you created the tables merge them into 1 item(record) and then you can create 1 mail out of that.

Hi @BramKn ,

I am receiveing the email as a seprate table for each instead in one single.

Basically, both the tables in 1 email

Please help me on it

I think it is a good idea for you to do the courses that are available.

You need to merge by position or key. Appending will not make it 1 item.

In this case a simple merge won’t work because it will just overwrite the former html content with the latter. Presumably the goal is to concatenate the HTML like this:

image

Would be easier to just rename the HTML to make sure they are unique before the merge and then merge by position :wink:

1 Like

By rename the HTML, you are referring to the inner field containing HTML, correct? I tried that first, but the result was one record with two fields: html and html2, which didn’t seem to solve the initial problem (unless you concat fields inside the email’s input expression).

I am interested in a solution without using Code though, as it would be more elegant.

Yes you rename the html field. So you have 2 fields. And then at the end u combine it with another html node.
Normally you would want to add some more to the email like a title or something like that. And then add the 2 tables.
Hope that makes sense.

I see, so the concat expression is inside the email body. Gotcha :+1:

1 Like

HI @KHarv ,
Please help me , Which one can I consider for concatinate ?

Either solution above will get the html table data to your email node. From there you must use an expression inside of your email node to fit the input data together, with something like a join.

Hi @KHarv ,
Can you please provide me the sample of it to get it .

I tried both the ways
image

I am able to recieve but the tables are one inside the other one which is not looking accurately

Thanks

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