I am trying to report 5 set of information via the email. I have used convert table row to variable and have different variable port to get my information into one email. Now I want to include a
as part of the email. How do i go about it.
Welcome @pio,
did i get it right, that you want to include a table? If so, how would you like to format it in the mail? The most general and flexible solution would be to export data tables in pdf
format as a BIRT report and then include it in the mail as an attachment. There is an example of this functionality here: https://hub.knime.com/knime/workflows/Examples/09_Enterprise/01_Server/01_Generate_a_Report_and_Save_the_File*otrQnFWuB99HdbML .
Cheers,
Misha
Thanks Misha for your reply. I am not looking to call a workflow and then create a pdf.
I have a work flow in which I have an email to send. As it can be seen in the screen shot, I have couple of variable ports already attached to the email. I want to include the table as well from the sorter (Node 108).
My question is how could I do that
Hi,
as you can see from the Send Email
input port, one can not send a table directly into the mail. That’s why i was suggestion the linked example. In that suggestion you would separate the bottom branch in your screenshot into a new workflow that would receive a table as input and would generate a report in pdf
format.that report can be then picked and attached to the mail.
Alternatively, you need to build a workaround. In a general case tables can be arbitrary large and thus dumping them into a mail body can be unwanted. If you have a small table, you can extract all its entries into flow variables (in the example in your original question that would lead to 10 variables) and then format those 10 values in the body of your mail.
Another idea could be to dump the table into a file in some remote shared repository and then send a link to it in the mail. You can use a KNIME Server or google spreadsheets or any other exchange means that are used in your organisation.
Cheers,
Misha
Thank you Misha
Hi @pio,
I learned from a colleague that it is also possible to format the table as HTML into a flow variable and then add that piece of html table to the email text using the variable. If that options sounds interesting for you, I can investigate and assemble an example.
Cheers,
Misha
Hi Lisovyi,
That sounds interesting. I would be interested in an example.
Regards
Pio
Hi @pio,
here is an example: table_html.knwf (16.7 KB). Note, that you can style the table and the text in general with usual tags in HTML. Resulting email body looks like this:
Cheers,
Misha
Thanks Misha.
It worked. Thanks again
There’s a node that will do a conversion of a KNIME table to an HTML table for you without needing to use the column expressions:
It outputs as a cell in the output table as well as a string flow variable you can connect to the send email node (this is the purpose the node was originally written for).
Cheers
Sam
Hi @ Sam,
I installed NodePit and undated the preferences but I can’t seem to find the mentioned node. How do i go about getting it?
Regards
Pio
HI Pio,
this node needs to be installed. Here is link how can you install new extensions in KNIME:
https://www.knime.com/downloads/update
Br,
Ivan
Hi Pio
You need to install the Lhasa public plugin from the trusted community contribution which can be found in the Cheminformatics group from the trusted community update site.
Cheers
Sam
This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.