Introducing Email Triggers

Brandon Cannaday
Brandon Cannaday | 3 minute read

Today's update introduces an entirely new way for the Losant platform to receive data. With the new Email Trigger, people or systems can now directly send emails to their Losant applications. The platform automatically parses the email, downloads attachments, and triggers one or more workflows to process the contents.

How the Email Trigger Works

Starting today, every application can now receive emails at:

YOUR_APP_ID@workflows.losant.com

To help organize and divide the processing between different types of emails, you can also send to any number of custom subaddresses (i.e. plus addressing):

YOUR_APP_ID+my_subaddress@workflows.losant.com

Whenever the platform receives an email addressed to your application, the email contents are parsed, attachments are automatically downloaded, and any matching Email Triggers are fired.

losant-workflow-email-trigger-1

Email Trigger Use Cases

There are a number of existing services where the only way to export data is through email reporting. Real-world examples include:

  • A customer required conference room scheduling data as part of their larger Smart Environment solution. The only way to receive the data was through an email report containing the current day's data.
  • An OEM used an off-the-shelf engine controller monitoring service to gain quick, but limited, visibility over their fleet. The customer wanted to incorporate this data into a more comprehensive connected product that they could offer to their customers. The monitoring service only supports email reporting as a way to export data.

Prior to today's update, these customers required an additional service to receive the email and forward the contents to a Losant webhook. This can now be done natively by the Losant platform, which eliminates extra services, cost, and development time.

Send Emails With Mailgun

This release not only adds the ability to receive emails; we've also added a new option to send emails with first-class support for Mailgun. We've added the new Mailgun Node and the new Mailgun Service Credential.

losant-mailgun-node

Along with our first-class support for SendGrid, you now have multiple options when it comes to sending emails. Using these services, properly configured for your organization and domain, is the best way to ensure a high degree of deliverability and that your emails are not blocked by your customers' spam filters.

Other Updates

As always, this release comes with several other features and improvements, including:

  • We've added the Throw Error Node, which makes it possible to explicitly cause a halting workflow error. This node is useful for consolidating error handling in larger workflows with lots of error branches.
  • If your application has multiple Workflow Error Triggers, they're now executed in a predefined order based on how close the trigger is to the source of the error. This pairs nicely with the Throw Error Node since Workflow Error Triggers in the same workflow are now guaranteed to execute first.
  • We've added the File Trigger that fires whenever Application Files are created, modified, or removed.
  • The format helper now supports a locale parameter to render numbers based on specific regions.
  • Webhooks can now automatically cast binary data to more useful formats (e.g. Base64 and Hex). This option applies when data is POSTed with the application/octet-stream header or multipart/form-data and one of the fields is binary (usually from a file input).
  • When accepting file uploads over Webhooks (using multipart/form-data), you can now optionally include additional metadata about the file such as file name and content-type.
  • We've made improvements to the overall legibility across all platform input fields.

What’s Next?

With every new release, we listen to your feedback. By combining your suggestions with our roadmap, we can continue to improve the platform while maintaining its ease of use. Let us know what you think in the Losant Forums.