SendGrid Rule Function Overview
SendGrid (opens in a new tab) rule functions enable you to send emails based on defined conditions.
Function properties
- Requires SendGrid account and SendGrid Credential
- Supports multiple receivers
- Supports placeholder syntax
${{data_key}}
for dynamic template data - Supports all data source types
Creating the function
To create the function, go to the device detail page, click on the Functions
tab and click on the Create function
button.
Then, click on the Get started
button for the Rule function
and choose SendGrid
from the list.
Function basics
The Debounce Period
prevents the repetitive execution of functions and is disabled by default.
Even if conditions are continually met, this setting ensures the function only triggers once within a defined time period, avoiding unnecessary repetitive actions.
Choose the SendGrid credential, give a unique name and a description for the function and click on the Next
button.
Template configuration
The following is an example configuration with customized email template content.
Condition configuration
Condition configuration allows you to specify the conditions that must be met for a rule to be triggered. Once the condition is configured, click on the Done
button to save the function.
An example configuration:
Enabling/Disabling function
You can enable/disable functions in the function list by using the ON/OFF toggle.
Debugging the function
If the function fails in condition level (i.e. JavaScript error), the owner of the function will receive an instant email that contains error details and the function will be stopped automatically.
If the recipient does not receive an email and the function has not failed, you should check the action logs in the function list.
Start building today
Collect, process, and activate device data. Scale from one device to thousands.