Actions are initiated based on specific conditions and can execute a variety of tasks. The first step in configuring an Action is to specify the desired action. Below are the different types of actions available:
Send notifications to designated Run Users within your Run. You must specify the particular Run User you wish to notify. For notifying multiple users, please refer to our documentation on notifications using analysis.
Sends an email to a specified address when certain conditions are met. You can specify one or multiple recipients by separating email addresses with a semicolon (;).
An email will be sent via SMTP when a specific condition is met. This action allows you to send emails via external providers. To configure this action, you need to create a Secret of type SMTP to authorize TagoIO to connect to your email provider and send emails, you will need to supply the server address, port number, username, and password. This information is usually provided by your email hosting service. Learn here how to create this secret: Secrets.
This action sends messages to Amazon SQS when triggered. It requires authentication via Secrets. You will need to provide the region, queue URL, and access key id and secret access key. Learn how to create this secret here: Secrets.
Sends SMS messages when certain conditions are met. You can specify one or multiple recipients by separating phone numbers with a semicolon (;). You need to include the country code with each phone number. If a country code is not provided, the system will automatically assume the USA code (+1).
In the message field, you can use variables to dynamically include information in your text. For more details on how to use message variables, refer to the section "Message Variables" at the end of this page.
Actions have the power to initiate scripts that run in the Analysis. This is a very powerful feature, as you can define exactly when your code will run.
Learn more about Running Analysis via Action.
This action can publish to an MQTT topic defined by the developer. This means that every time your trigger criteria are met, TagoIO will publish data to that predefined MQTT topic, this is very useful if you need to forward data to devices and/or applications.
This action can post data directly to an endpoint defined by you. When the action is initiated, it will POST the JSON data received (as defined by the variable in the Trigger) to the configured HTTP endpoint address.
You can use payload fields in the HTTP endpoint, like the example above but with a variable (
https://myapi.io/endpoint/$VALUE$
), or even in the HTTP Headers like in the example below:
The TagoIO-Retries
header is managed by the TagoIO API and sent in every Post request for this Action type, and indicates the number of attempts to post the data to your endpoint.
It will try to post the data 10 times, and if it’s unsuccessful (any response from your endpoint other than HTTP 20X status codes) it will require a fallback device to be configured to store the data in TagoIO so you can retrieve it later without losing your data in case your endpoint fails to receive it.
To set up a fallback device, enable it in the bottom part of the HTTP Post action settings and put the token for the device you intend to hold the data.
After 10 unsuccessful attempts, the data will be sent to the fallback device with some information added to the metadata
in the _http_*
properties (original values in metadata
will be kept), like shown below:
This option is only available if your Action is of the type MQTT Topic. This action will insert the data directly into the device's data storage.
In some action types, the message body can be as simple as a text like Hi, your car is over the speed limit or you can specify fields in the message to personalize it with real-time data from your devices.
You can use most of the payload fields from our API:
$VARIABLE$ | Variable name |
$VALUE$ | Variable value |
$UNIT$ | Unit of your variable |
$TIME$ | Time the variable was received |
$LOCATION$ | Location value |
$DEVICE$ | Device ID |
$DEVICE.NAME$ | Name of your device |
$ACTION.STATE$ | Current state of your Action: locked or unlocked |