ApplicationExperience

Email Node

The Email Node allows a workflow to send emails using Losant provided email delivery.

Email Node

We intend for Losant Developers to use this node for testing and/or proof of concept applications. For production applications, we recommend the SendGrid Node. Using the SendGrid Node removes rate limiting, provides message history, and more benefits that SendGrid provides.

Node Properties

The Email Node has three main configuration sections:

Recipient Addresses

Email Node To Addresses

The Email Node supports up to 5 “To” addresses for the email. These address fields support string templates, to use emails on the current workflow payload. The above node is set to send the email to bob@losant.com and hello@losant.com.

Message Contents

Email Node Message Contents

Next, the contents of the email can be configured. There are three items to configure here, and they are all templatable.

  • From Address: (Optional) The email address that the email will be sent from. Defaults to noreply@losant.com.
  • Email Subject: (Required) The subject of the email.
  • Email Body: (Required) The email message to send.

Result Path

Email Node Result

You may optionally store an indication of success or failure of the email operation at a path on the payload.

Node Example

In the example above, the “From” address is set to alerts@example.com, the subject is set to Power Consumption Warning, and finally the body is set to Power level exceeded error threshold at {{data.power}}!.

If the result path has been configured, the success or failure of the operation will be placed at that path like so:

{
  ...
  "working": {
    "emailResult": {
      "message": "success"
    }
  }
  ...
}

Node Errors

The following is an example of a failed operation:

{
  ...
  "working": {
    "emailResult": {
      "error": {
        "type": "LOSANT_EMAIL_ERROR",
        "message": "Losant email send throttled.",
      }
    }
  }
  ...
}

Node Throttling and Limits

This node is rate limited to one email every minute per workflow (bursts of up to 10 allowed), and is limited to a maximum of 5 recipients per email. If more frequent emails or more advanced recipient configuration is required, please use the SendGrid Node.