Send an email if found an "inactive" string in column



   I am new to knime and I am doing data analysis for machinery faults. I have imposed some faults onto the machine and collected the data using multiple sensors. In knime , I have defined boundaries as suggested in time series example to give an indication if exceeded the threshold. Using the java snippet node the column with 0's and 1's are converted to variables as "active" or "good" for 0 and "inactive" or "bad" for 1. I would like to send an email for the column that contains inactive. It is like giving a warning to an operator to take immediate action to prevent machine failure. I have tried all the possible chances but it dint work . Could someone help me with send email node for my issue? 


I am attaching my work flow screen shots for your understanding. 

Hello Lakhan,

The basic approach is to simply fill in all the data necessary to send an Email.
This means you need the "To:" on the "Mail"-tab and the whole "Mail Host"-tab.

The next step depends on your scenario:

  1. If there is an entry with "inactive", send me an email:
    Just type in the big field on the "Mail"-tab something like "Hey, the machine is failing!"
  2. You want to receive a list of machines/sensors that are inactive:
    Little more complicated. I suggest grouping on the "inactive"-column and listing the machine/sensor names, then filtering out only the "inactive"-row. Then Table Row to Variable and then maybe a Java Edit Variable to build a message around the list.
  3. For each inactive machine you want to send an email to the engineer.
    First, filter to get all inactive machines, then create a table where all engineers are listed with their emails and machines. Join this table onto the inactive machines, use a Group Loop and additionally to the stuff in approch No. 2 inject the email address.

Hope that helps.


Thanks for your reply Ferry. I chose approach 2 in which instead of GroupBy , I have used column splitter to split the columns I needed and then row splitter to slit all the rows with "bad" or "inactive". Next step I couldn't use table to row node as it is taking only first row and ignoring the rest.  So, I have used Table Row to variable loop start node which reads all of the rows. My new issue is with  using java edit variable or java edit variable (simple) to build  a message ? I am very poor at writing code in that node. I really have no idea what to write also. 

                 My target is to send an email to the operator for the rows containing "bad " or "inactive". I tried skipping java edit variable and just use the table row to variabel loop start connected to send email. However, it doesn't execute and shows an error    0:12:13:4  Execute failed: javax.mail.AuthenticationFailedException.

I  would like you to help me in send email node too. I have been trying to send email for the patterns " bad" found in the machine status column. It either shows an authentication failed error or  shows unable to parse variable " status"  as boolean ....  kind of error. I'd appreciate if you can get me out through this.Thanks for your help again.

  I am attaching some screen shots for your understanding.


Hello Lakhan,

Attached you will find a workflow that demonstrates how to do that - without Java.

You are probably trying to send an email via a Google account. This is not possible with the normal settings of Google. You have to set your Google account to allow less secure apps (You have to do that for Mozilla Thunderbird as well).


Hello Ferry,

 I don't see anything attached in your last reply. Please send it again. And I will try the way you suggested and get back to you if I need your help again . I really appreciate the efforts you are taking to help me out. Thanks again. 


With regards,


Hello Lakhan,

Sorry, probably I have selected the flow but did not press attach.

Here is a new example, but I suspect the error in the Google Account.
Of course you need to input the email adress and the SMTP information.