Icon

Email Classification

There has been no title set for this workflow's metadata.

The purpose of this workflow is to showcase the "Email Connector (Labs)", "Email Reader (Labs)" nodes, and the "Email Mover (Labs)" nodes. The workflow aims to classify emails based on subject keywords and attachment presence.

The "Email Mover (Labs)" node moves emails matching the criteria to selected folders. Users can implement more complex logic in KNIME Analytics Platform.

You can easily download and run the workflow within your KNIME installation. For optimal performance, we recommend using the latest version of the KNIME Analytics Platform.

To execute the workflow, you don't have to provide email server details such as address, port or user login credentials. The "Email Inbox Setup" component sets up a self-contained mail server. It includes four folders and ten simulated emails with counterfeit attachments ready for use.
For more information, refer to the component description.

Check "External resources" for more information about how to obtain the necessary tokens to connect to your ISP email account using IMAP protocol (e.g. Gmail or Outlook) via the "Email Connector (Labs)" node.

Hence, there is no need to provide any additional information in the "Email Connector (Labs)" node. All node configurations are managed by the variables previously created by the component. The inbox of User2 is being connected to since it is the inbox where the fake emails were sent.

We use the "Email Reader (Labs)" node to read emails from the inbox. Since the other folders are empty, we only need to focus on this particular folder. By clicking "Show advanced settings", we can check the "Output attachments table" option, which extracts all the attachments from the emails. A second table output port will appear.

Using the "Value Lookup" node, we append the file name to the email table information, using the Email ID column as a key value.

With the "Rule Engine node", we create a new column called "Move email criteria" with two values.

0 = The email contains "Report" in the email subject and has an attachment.
1 = The email contains "Recap" in the email subject and has an attachment.

Finally, we filter matched emails and move them to a target folder using "Row Filter" nodes and the "Email Mover (Labs)" node.

URL: Set up Gmail with a third-party email client https://support.google.com/a/answer/9003945?hl=en
URL: POP, IMAP, and SMTP settings for Outlook.com https://support.microsoft.com/en-au/office/pop-imap-and-smtp-settings-for-outlook-com-d088b986-291d-42b8-9564-9c414e2aa040

Email Classification

  • The objective of this workflow is to demonstrate the functionality of the Email nodes - "Email Connector (Labs)", "Email Reader (Labs)", and "Email Mover (Labs)".

  • The workflow lists inbox emails, applies criteria based on email subject keywords and attachments, and moves matching emails to respective folders. 

  • To learn more about the workflow, click the left bar and check the description section.

This component is only used to facilitate the consumption of this example. You can remove it and configure the Email Connector (Labs) directly with your own settings.
Move from INBOX to"Meeting Recaps" Folder
Email Mover (Labs)
The component generates a complete email inbox that contains a few pre-existing emails.
Email Inbox Setup
List emails in INBOX1- Messages2 - Attachments
Email Reader (Labs)
Connect to the User2Inbox via flow variables
Email Connector (Labs)
Email classification criteria:0 = Contains "Report" in the email subject and has attachment1 = Contains "Recap" in the email subject and has attachment
Rule Engine
Filter Emails Classified as 0
Row Filter
Move from INBOX to"Reports" Folder
Email Mover (Labs)
Add "File Name" columnto the firs input table
Value Lookup
Filter Emails Classified as 1
Row Filter

Nodes

Extensions

Links