Icon

02 - extract content from DB and send email

extract content from DB and send email

This workflow shows how one can extract content from a database (SQLite in this case) and send by email.

Some notes:
- I used Mailhog (see link below), an open source local mailserver to test the workflow. This is very handy, if you don't want to use your personal email accounts for testing
- In Mailhog, it seems at first glance that you don't have an attachment. But if you download the email from Mailhog as eml file and open it (e. g. in Outlook or Thunderbird email clients) you will see that the spreadsheet is attached
- This is more or less based on a post by Ivan on the KNIME forums, also added as a link below

This workflow goes along with my weekly newsletter about data analytics called "The Data Alchemist", click on the link below to find out more or subscribe for free.

Annotations and comments
  • This workflow utilizes an open source local mailserver called "Mailhog". You don't even need to install it, just download it from the link below and run it, if you want to test this workflow locally (without using any "real" email address. Link to download Mailhog: https://github.com/mailhog/MailHog
  • read the content from the database
  • select BUYERS table
  • write locally to Excel file (in this workflows data area)
  • convert file location to string so it can be attached to email
  • import connect to example DB within this wf's data area
  • open Mailhog and download the email (it has attachments, although it might not seem like it)

Nodes

Extensions

Links