Send Email Notifications

Estimated reading time: 1 minute

OT Link Platform Flows can send Email notifications upon request or when certain events occur.

Prerequisites

  • Gmail or Outlook accounts to send emails to and from.
  • Basic familiarity with OT Link Platform flows.

The following sections will show you how to set up the flow and set up Flows connectivity to Gmail and Outlook accounts:

Set Up The Flow

To Set up a Flow that will send emails on-demand:

  1. Connect an Inject node, a Function node, and a Email output node.

  2. Double-click the function node and write the following lines to define the subject and email text:

    msg = {
        payload : "This is the email message!", // Payload defines the email text.
        topic : "Subject line:" // Topic defines the email subject line.
    };
    return msg;
    
  3. Double-click the email node and configure it based on your email service.

  4. Click the Inject node to send the email.

    This flow shows the basic setup for how to configure email nodes. To send emails upon certain events from devices, try adding switch nodes connected to Serial and Datahub nodes.

Outlook Configuration Settings

For Outlook, use the following configuration settings. Make sure to uncheck Use secure connection:

Outlook Email Node Configuration:

To: The email address to send to.

Server: smtp.office365.com

Port: 587

UserId:The email address to send from.

Password: The password that the sender logs in with.

Gmail Configuration Settings

For Gmail, use the following configuration settings. Checking use secure connection ensures that Gmail will not throw a warning about unsecured applications attempting to connect to your account:

Gmail Node Configuration:

To: The email address to send to.

Server: smtp.gmail.com

Port: 465

UserId: The email address to send from.

Password: The password that the sender logs in with.