Use KNIME to automatically send emails (or create texts)

Hi there,

I wonder if a “misuse” of KNIME to do something similar like a mail merge in “Office applications”.

The background is this.

I have a standard txt file which contains some placeholders. These placeholders should be filled by data that is created dynamically in a table.

The part that made me consider KNIME here is automation part. I mainly use Google Docs (no need to connect to Google Docs though) and that does not come with a standard mail merge functionality (like MS Office for example).

I would like to rather send an email or (alternatively) create txt files for each message, I want to send.

One important requirement is that the formatting should stay intact, whereas formatting mainly refers to line breaks and paragraphs (I do not have any other type of formatting).

Is something like this possible with KNIME (and is this the right place to post the question)?

Thank you all very much in advance.

1 Like

Hi @kowisoft,
I think it should be quite easy to do this in KNIME, and here is exactly the right place to ask such a question.

Take a look at the Send Email node:

https://kni.me/n/h0_xPCuIhaI9W7us

You can connect to google sheets (but not docs) using the
https://kni.me/n/poHAFve1qUYVbcyD

To edit your email text, while keeping the formatting, you need to export the email as HTML file, read that with KNIME as string column and manipulate as desired.

best,
Gabriel

2 Likes

Thank you very much @gab1one

I wonder how I would read the HTML file into the workflow?

I tried file reader but this results in one row per paragraph

The Vernalis nodes should contain one where you can read the contents of a file to a single cell (I think).

Alternatively the XML reader may work depending on the content of your html.

1 Like

You can use the
https://hub.knime.com/Vernalis/extensions/com.vernalis.knime.feature/latest/com.vernalis.knime.io.nodes.load.txt.LoadTextFilesNodeFactory
node from the Vernalis nodes, it allows you to read a whole file into a string cell.

best,
Gabriel

2 Likes

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