how to get table as output in email body

I want to send small 4 rows and 3 column table in email body
to end user .

is it possible ?
can i convert table as variable and pass into email body ?

or any alternate solution

Convert the table to an HTML string (single cell) with:

https://hub.knime.com/lhasa-knime-developers/extensions/org.lhasalimited.knime.public.feature/latest/org.lhasalimited.generic.htmltotable.TableToHtmlNodeFactory

Then connect the flow variable port of this node to the send email node and put the flow variable storing the table into the email body.

Cheers

Sam

1 Like

Thanks @swebb
can you please look into screenshot
because - i cant make it…
can you please correct me

That isn’t the node I linked to.

You want the one with this icon: image

You have used this one:

You need to install the Lhasa public plugin from the KNIME trusted community contributions to get access to this node.

I think I need to rename the node, this confusion has happened before.

Cheers

Sam

3 Likes

And here’s an example workflow:

https://hub.knime.com/swebb/space/LhasaNodes/EmailATable

3 Likes

Hello @swebb you are owsome.
i was looking for this only…

but i am facing one issue please look into screenshot
as all htm code is getting in mail , no table

Did you check the HTML button rather than the text at the bottom of the dialog for the send email node?

2 Likes

@swebb thank you so much…

I am trying to pass two tables , two variables in mail.

image

Is it possible ??

You will need to rename the flow variable for one of them for this to work.

The merge variables node will take the variable from the top input when a clash is found.

If there isn’t an easy way of renaming a flow variable then you could do the following:

Use the column rename node on one of the output tables to change the column name then use the table row to variable node to make the cell a flow variable.

Workflow now available:

Option 1:

Options 2:
This approach is better when you have more than 2 tables

Cheers

Sam

2 Likes

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