Automatic Email


Send an email when the website status code is 200.

graph LR; A[inject] --> B[http request]; B --> C[switch]; C --> D[function]; D --> E[email];

Switch node

Only filter those signals with msg.statusCode number 200.

Function code

Generate a message with following settings,


msg = {
    payload: "Hello",
    topic: "Need to fix."
};
return msg;
    

Email node


To: target email address
Server: smtp.gmail.com
Port: 465 with use secure connection.
Userid: your email address
Password: your email address password
TLS option: tick Check server certificate is valid
    

Set your app settings for gmail via activation. https://myaccount.google.com/u/1/lesssecureapps

References