Token Builder
Tokens are placeholders that LemmeKnow fills in with live values when a rule runs. Write a token as a path inside double braces, such as {{item.title}} or {{now.time}}. A custom notification text like this:
{{item.source}} at {{now.time}}: {{item.message}}
might come out as backup at 14:05:09: Nightly backup finished.
You don't have to remember the paths. Fields that accept tokens show a small {{+}} button. Tap it to open the Token Builder, pick a category and then a value from the dropdowns, and LemmeKnow inserts the token at the cursor. A short description of the selected token appears at the bottom of the builder.
Where you can use tokens
- A rule's Name.
- The Custom format of a Notify rule, which replaces the notification text.
- Filter values, and the name in a Field filter. See Filter expressions.
- Text in condition dialogs, such as Wi-Fi network names and Bluetooth device names. See Conditions.
- The text of Toast and Speak steps in alerts and nudges.
- Settings of a Delivery Screen that take text.
- Custom actions: URLs, headers, and body values.
A token whose path isn't recognized is left exactly as you typed it, so a typo shows up in the result instead of disappearing.
Token reference
Item
The message, notification, or feed item that set the rule off.
| Token | Value |
|---|---|
{{item.title}} | Item title |
{{item.message}} | Item body or message text |
{{item.detail}} | Extra detail text |
{{item.source}} | The item's source field |
{{item.level}} | Level of the item, such as info, warning, or error |
{{item.link}} | URL on the item, if any |
{{item.ts}} | Item timestamp, as Unix milliseconds |
Channel
| Token | Value |
|---|---|
{{channel.current.name}} | Name of the current channel |
{{channel.current.level}} | Level of the current channel |
Feed
| Token | Value |
|---|---|
{{feed.current.id}} | Id of the feed the item came from |
{{feed.current.name}} | Feed name |
{{feed.current.url}} | Feed URL |
{{feed.current.title}} | Latest item title on the feed |
{{feed.current.link}} | Latest item link on the feed |
{{feed.current.guid}} | Latest item guid on the feed |
{{feed.current.thumbnail}} | Latest item thumbnail URL on the feed |
{{feed.<feed id>.id}}, .name, .url | The same details for a specific feed, chosen by name in the builder |
Server
Server tokens need Premium and at least one server. Choose Current for the server the rule is scoped to, or pick a server by name; the builder fills in that server's short id for you.
| Token | Value |
|---|---|
{{server.current.name}} | Server display name |
{{server.current.id}} | Server id |
{{server.current.user.name}} | Your username on the server |
{{server.<server id>.name}}, .id, .user.name | The same details for a specific server |
{{server.<server id>.states.<group>.<state>.<field>}} | A field of a state the server's hub publishes |
State tokens appear under States in the builder once a hub has published states with fields. Besides any fields the state publishes, value, label, and alarm are always available. See States and Connecting to a LemmeSee hub.
Now
The date and time when the token is filled in, using your phone's time zone.
| Token | Value |
|---|---|
{{now.timestamp}} | Current time, as Unix milliseconds |
{{now.date}} | Date as YYYY-MM-DD |
{{now.time}} | Time as HH:mm:ss |
{{now.weekday}} | Day of the week in full, such as Monday |
{{now.year}} | Four-digit year |
{{now.month}} | Month, 01 to 12 |
{{now.day}} | Day of the month, two digits |
{{now.hour}} | Hour, 00 to 23 |
{{now.minute}} | Minute, 00 to 59 |
{{now.second}} | Second, 00 to 59 |
{{now.timezone}} | Time zone id, such as America/Los_Angeles |
{{now.iso}} | ISO 8601 date and time |
{{now.rfc3339}} | RFC 3339 date and time |
Device
| Token | Value |
|---|---|
{{device.model}} | Hardware model reported by Android |
{{device.name}} | The name you gave this phone |
{{device.os_version}} | Android version |
{{device.locale}} | Device locale, such as en_US |
{{device.battery.level}} | Battery percent, 0 to 100 |
{{device.battery.state}} | CHARGING, FULL, DISCHARGING, NOT_CHARGING, or UNKNOWN |
{{device.network}} | WIFI, CELLULAR, ETHERNET, or NONE |
{{device.ringer_mode}} | NORMAL, VIBRATE, or SILENT |
{{device.screen_on}} | true if the screen is on, otherwise false |
{{device.volume.media}} | Media volume, 0 to 100 |
{{device.volume.notification}} | Notification volume, 0 to 100 |
{{device.volume.ringer}} | Ringer volume, 0 to 100 |
{{device.volume.alarm}} | Alarm volume, 0 to 100 |
Rule and Trigger
| Token | Value |
|---|---|
{{rule.name}} | Name of the rule that fired |
{{rule.id}} | Internal id of the rule |
{{rule.type}} | ALERT, NUDGE, NOTIFY, or SILENCE |
{{trigger.payload}} | The full details of an approval request or feed item that set off an Action requested or Feed options ping. Empty otherwise. |
Steps and actions
Alert and nudge steps, and custom actions, also understand these shorter tokens:
| Token | Value |
|---|---|
{{payload}} | The alert message text |
{{source}} | Source of the message |
{{level}} | Level of the message |
{{server}} | Server display name |
{{timestamp}} | Unix timestamp in milliseconds |
{{topic}} | The server topic the message arrived on |
Previous step
In custom actions, a step can use what an earlier step in the same chain produced. These appear under Previous step in the builder.
| Token | Value |
|---|---|
{{previous.toast.text}} | Text shown by the last Toast step |
{{previous.dnd.mode}} | Do Not Disturb mode before a Do Not Disturb step changed it |
{{previous.volume.level}} | Volume before a volume change, 0 to 100 |
{{previous.volume.stream}} | The stream that volume change applied to |
{{previous.http.response}} | Response body from the last web request, shortened and with secrets hidden |
{{previous.http.status}} | HTTP status code from the last web request |
Secrets
Custom actions can also insert values from the Secrets Manager (Premium), written as {{secret:NAME}}. Secrets are offered only in action fields, never in rule names, notification text, filters, or conditions.