Automating Knime Workflows to Send Mails of Reports and Predictions

Automating Knime Workflows to Send Mails of Reports and Predictions

Automating Knime Workflows to Send Mails of Reports and Predictions

When it comes to Visual Programming to implement end to end Machine Learning Models, without writing any code and following the drag and drop approach, the most popular open source tool these days is KNIME.

It is one of the tools getting famous amongst the statisticians and Data Scientists for Quick Prototyping.

Since Data Science gets used in many sectors from Humanities, Economics, Life Sciences , Pharma, Healthcare, Finance etc, I feel fortunate to work with different companies and different customers as a freelancer consultant or independent contractor for Machine Learning Projects, getting to learn a lot about the sector itself along with implementation via ML.

I hold a Post Graduate degree in Statistics, followed after Computer Science , and am a hardcore Statistics’ lover, I feel teaching is learning twice and hence I work as a Bootcamp Instructor for Analysts working in Corporates who want to Upgrade themselves to Knime .

Hi-Media team learning Knime and Anaytics

Wockhardt Pharma

Wockhardt Hospitals Team

I cover all aspects of Data Aggregation ,Data Cleaning via different approaches , Machine Learning algorithms of Classification, Clustering, Regression, Sampling ,Hypothesis,Normalization ,Standardization via real time datasets ,with mathematical derivations and case studies in my Bootcamps.Also an important part for this bootcamp is how to make Knime workflow hands on excercises.

Many times I get this question about how can we send the final prediction tables or Reports as mail to managers or any other concerned systems.

Knime has a node repository in which we have different types of functionalities to carry out the relevant operations required.Lets see how can we configure a workflow to include sending mails :

Lets take a simple IRIS dataset, we will apply the classic Logistic Regression Algorithm upon it , do the predictions and finally send the table in the report.

2.A you can see I have applied Normalizer to File reader, done partitioning and finally applied Logistic Regression.

Output data for the file reader

Normalizer added to make every parameter in range of (0,1)

Regression Learner Output

Logistic Regression Predictions

3. Once we have this ready, we will convert this predicted table into HTML .

Table to HTML

Just make sure that in Table to HTML add this configuration, to “always include all columns”:

Include all columns

4. Just connect this HTML prepared table to “Send Mail” node via Flow variables:

Red dots appear on the top of the node

Connect this to “Send Mail” node added from the node repository.

Here comes the most important part, what are the configurations for Sending Mail:

Specify the email ID of the person

You can add attachments if any , by adding it via attachments tab.

In the Mail Host SMTP part:

Add host as: “smtp.gmail.com”

Add SMTP port: 465

From :email that you will use to send reports.

Tick the checkbox to read the SMTP authentication and specify the credentials.

Choose the connection security to be “SSL”

Login into your email account and open the link :

“https://myaccount.google.com/security”

Once you have done it, just go back to your workflow and run it:

Press F7

After Buffering

Your email recipent should be able to see your table in the body:

Just try this out, and ping me if you have any queries:

you can DM me on Linkedin

Will be posting more articles on Knime and Statistics in future.

Till then Happy KNIMING !!

When it comes to Visual Programming to implement end to end Machine Learning Models, without writing any code and following the drag and drop approach, the most popular open source tool these days is KNIME.

It is one of the tools getting famous amongst the statisticians and Data Scientists for Quick Prototyping.

Since Data Science gets used in many sectors from Humanities, Economics, Life Sciences , Pharma, Healthcare, Finance etc, I feel fortunate to work with different companies and different customers as a freelancer consultant or independent contractor for Machine Learning Projects, getting to learn a lot about the sector itself along with implementation via ML.

I hold a Post Graduate degree in Statistics, followed after Computer Science , and am a hardcore Statistics’ lover, I feel teaching is learning twice and hence I work as a Bootcamp Instructor for Analysts working in Corporates who want to Upgrade themselves to Knime .

Hi-Media team learning Knime and Anaytics

Wockhardt Pharma

Wockhardt Hospitals Team

I cover all aspects of Data Aggregation ,Data Cleaning via different approaches , Machine Learning algorithms of Classification, Clustering, Regression, Sampling ,Hypothesis,Normalization ,Standardization via real time datasets ,with mathematical derivations and case studies in my Bootcamps.Also an important part for this bootcamp is how to make Knime workflow hands on excercises.

Many times I get this question about how can we send the final prediction tables or Reports as mail to managers or any other concerned systems.

Knime has a node repository in which we have different types of functionalities to carry out the relevant operations required.Lets see how can we configure a workflow to include sending mails :

Lets take a simple IRIS dataset, we will apply the classic Logistic Regression Algorithm upon it , do the predictions and finally send the table in the report.

2.A you can see I have applied Normalizer to File reader, done partitioning and finally applied Logistic Regression.

Output data for the file reader

Normalizer added to make every parameter in range of (0,1)

Regression Learner Output

Logistic Regression Predictions

3. Once we have this ready, we will convert this predicted table into HTML .

Table to HTML

Just make sure that in Table to HTML add this configuration, to “always include all columns”:

Include all columns

4. Just connect this HTML prepared table to “Send Mail” node via Flow variables:

Red dots appear on the top of the node

Connect this to “Send Mail” node added from the node repository.

Here comes the most important part, what are the configurations for Sending Mail:

Specify the email ID of the person

You can add attachments if any , by adding it via attachments tab.

In the Mail Host SMTP part:

Add host as: “smtp.gmail.com”

Add SMTP port: 465

From :email that you will use to send reports.

Tick the checkbox to read the SMTP authentication and specify the credentials.

Choose the connection security to be “SSL”

Login into your email account and open the link :

“https://myaccount.google.com/security”

Once you have done it, just go back to your workflow and run it:

Press F7

After Buffering

Your email recipent should be able to see your table in the body:

Just try this out, and ping me if you have any queries:

you can DM me on Linkedin

Will be posting more articles on Knime and Statistics in future.

Till then Happy KNIMING !!

When it comes to Visual Programming to implement end to end Machine Learning Models, without writing any code and following the drag and drop approach, the most popular open source tool these days is KNIME.

It is one of the tools getting famous amongst the statisticians and Data Scientists for Quick Prototyping.

Since Data Science gets used in many sectors from Humanities, Economics, Life Sciences , Pharma, Healthcare, Finance etc, I feel fortunate to work with different companies and different customers as a freelancer consultant or independent contractor for Machine Learning Projects, getting to learn a lot about the sector itself along with implementation via ML.

I hold a Post Graduate degree in Statistics, followed after Computer Science , and am a hardcore Statistics’ lover, I feel teaching is learning twice and hence I work as a Bootcamp Instructor for Analysts working in Corporates who want to Upgrade themselves to Knime .

Hi-Media team learning Knime and Anaytics

Wockhardt Pharma

Wockhardt Hospitals Team

I cover all aspects of Data Aggregation ,Data Cleaning via different approaches , Machine Learning algorithms of Classification, Clustering, Regression, Sampling ,Hypothesis,Normalization ,Standardization via real time datasets ,with mathematical derivations and case studies in my Bootcamps.Also an important part for this bootcamp is how to make Knime workflow hands on excercises.

Many times I get this question about how can we send the final prediction tables or Reports as mail to managers or any other concerned systems.

Knime has a node repository in which we have different types of functionalities to carry out the relevant operations required.Lets see how can we configure a workflow to include sending mails :

Lets take a simple IRIS dataset, we will apply the classic Logistic Regression Algorithm upon it , do the predictions and finally send the table in the report.

2.A you can see I have applied Normalizer to File reader, done partitioning and finally applied Logistic Regression.

Output data for the file reader

Normalizer added to make every parameter in range of (0,1)

Regression Learner Output

Logistic Regression Predictions

3. Once we have this ready, we will convert this predicted table into HTML .

Table to HTML

Just make sure that in Table to HTML add this configuration, to “always include all columns”:

Include all columns

4. Just connect this HTML prepared table to “Send Mail” node via Flow variables:

Red dots appear on the top of the node

Connect this to “Send Mail” node added from the node repository.

Here comes the most important part, what are the configurations for Sending Mail:

Specify the email ID of the person

You can add attachments if any , by adding it via attachments tab.

In the Mail Host SMTP part:

Add host as: “smtp.gmail.com”

Add SMTP port: 465

From :email that you will use to send reports.

Tick the checkbox to read the SMTP authentication and specify the credentials.

Choose the connection security to be “SSL”

Login into your email account and open the link :

“https://myaccount.google.com/security”

Once you have done it, just go back to your workflow and run it:

Press F7

After Buffering

Your email recipent should be able to see your table in the body:

Just try this out, and ping me if you have any queries:

you can DM me on Linkedin

Will be posting more articles on Knime and Statistics in future.

Till then Happy KNIMING !!