Create an Action to Send an Email

About this task

This topic describes how to create an action to send an email. You can also create an action to perform the following steps:

Before you begin

Create a trigger based on an entity condition or a device condition.

Procedure

  1. Access the event for which you want to create an action.
  2. Select Send e-mail.
    The Send an E-mail section appears.
  3. Enter or select values as specified in the following table.
    FieldDescription
    Recipient's addressEnter the email address of the user who will receive an email when the event is triggered. You can enter multiple email addresses separated by commas.
    Allow End User to set e-mail addressSelect this check box if you want to allow application users to provide the email addresses of the users who will receive an email, and then enter the name of the input field that you will add in the application.
    Add Query RecipientsSelect this button if you want to add email addresses of the recipients using a query. When you select this button, the Query Name box appears, displaying a list of Get queries created in the site.
    Query NameSelect the query that returns a list of email addresses to which you want to send the email. If the query that you have selected requires input values, then the corresponding fields appear. If that happens, enter values in the fields.
    Email templateSelect the email template that you want to use. If, however, you want to create an email template, select Create Email Template, enter values as needed, and then select Save and Return.
    Scheduler
    Select one of the following options:
    • Take action only on initial trigger: Select this option if you want to run the query after switching from the state of not meeting the condition to meeting the condition. By default, this option is selected. For example, suppose you have created an action to send an email when the temperature recorded by a device exceeds 40 degrees Celsius. Suppose the temperature recorded by the device is as follows: 35, 38, 41, 45, 39, 42. In this scenario, the email is sent when the temperature is 41 and 42.
    • Take action on every trigger: Select this option if you want to send an email every time the event is triggered. For example, suppose you have created an action to send an email when the temperature recorded by a device exceeds 40 degrees Celsius. Suppose the temperature recorded by the device is as follows: 35, 38, 41, 45, 39, 42. In this scenario, the email is sent when the temperature is 41, 45, and 42.
  4. Select Save or Save and Exit.
    The event template is created.

Results

When the event is triggered, an email is sent to the email addresses that you have specified.