Reference for all Bookmarks (template variables) supported in Event action fields.
Bookmarks are template variables you can embed in text fields of Event actions. When an event fires, Ubidots replaces each bookmark with the actual value from the triggering context — the device, variable, and data point that caused the event to activate.
For example, {{variable.name}} was {{last_value}} becomes Temperature was 35.2 at the moment the event fires.
Trigger Context
| Bookmark | Description |
|---|---|
{{last_value}} | The value that triggered the event |
{{trigger_value}} | Same as {{last_value}} |
{{trigger_timestamp}} | Timestamp in milliseconds when the event fired |
{{timestamp}} | Same as {{trigger_timestamp}} |
{{context}} | Context object attached to the triggering data point |
Variable
| Bookmark | Description |
|---|---|
{{variable.name}} | Variable name |
{{variable.id}} | Variable ID |
{{variable.label}} | Variable API label |
{{variable.description}} | Variable description |
{{variable.properties}} | Variable properties (dict) |
{{variable.last_value}} | Last recorded value |
{{variable.timestamp}} | Timestamp of last value |
{{variable.last_value_context}} | Context attached to the last value |
Device
| Bookmark | Description |
|---|---|
{{device.name}} | Device name |
{{device.id}} | Device ID |
{{device.label}} | Device API label |
{{device.description}} | Device description |
{{device.context}} | Device context (dict) |
{{device.position}} | Device geolocation |
{{device.tags}} | Device tags |
{{device.properties}} | Device properties (dict) |
Filters
Filters can be applied to bookmarks using the | pipe syntax to transform the output.
| Filter | Example | Description |
|---|---|---|
|timestampformat('TZ') | {{trigger_timestamp|timestampformat('America/Bogota')}} | Format timestamp with timezone |
|human_date | {{trigger_timestamp|human_date}} | Human-readable date |
|float | {{last_value|float}} | Cast to float |
|format(val) | {{'%0.2f'|format(last_value|float)}} | Printf-style formatting |
Bookmarks by Action Type
The table below lists the fields in each action type that accept Bookmarks.
| Action | Fields |
|---|---|
subject, message, emails | |
| SMS | message, numbers[].number |
| Telegram | message, numbers[].number |
| Voice | message, numbers[].number |
| Webhook | payload, headers |
| Slack Webhook | message, username, icon_url, icon_emoji |
| Set Variable | value, timestamp, context |
| UbiFunction | message, headers |
| User | message, subject |
| Incident | name, title, description, message |

