Bookmarks

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

BookmarkDescription
{{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

BookmarkDescription
{{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

BookmarkDescription
{{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.

FilterExampleDescription
|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.

ActionFields
Emailsubject, message, emails
SMSmessage, numbers[].number
Telegrammessage, numbers[].number
Voicemessage, numbers[].number
Webhookpayload, headers
Slack Webhookmessage, username, icon_url, icon_emoji
Set Variablevalue, timestamp, context
UbiFunctionmessage, headers
Usermessage, subject
Incidentname, title, description, message