Email Node

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

Important

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 allows for:

Email Node

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 <theWorkflowID>@workflows.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

For Sandbox accounts, this node is rate limited to 1 email every 5 minutes, with a burst of up to 5. For Organizations, the limit is 1 email per minute, with a burst of up to 10.

If more frequent emails or more advanced recipient configuration is required, please use the SendGrid Node.

Was this page helpful?


Still looking for help? You can also search the Losant Forums or submit your question there.