Automations use Handlebars syntax for templating. This applies to user prompt templates in both AI and Direct processing modes, and to all text fields in Discord and Telegram output configurations.Documentation Index
Fetch the complete documentation index at: https://docs.struct.to/llms.txt
Use this file to discover all available pages before exploring further.
Basics
Event data is available under theevent object. Access fields with double curly braces:
Conditionals
Loops
Logical Operators
Combine conditions usingand, or, and comparison helpers as sub-expressions:
Formatters
Built-in helpers format event data for readability.| Helper | Usage | Output |
|---|---|---|
formatNumber | {{formatNumber event.volume}} | 2,450,000 |
formatCurrency | {{formatCurrency event.size_usd}} | $15,420.50 |
formatPercent | {{formatPercent event.current_probability}} | 72% |
formatDate | {{formatDate event.block_timestamp}} | Jun 15, 2025 |
uppercase | {{uppercase event.side}} | BUY |
lowercase | {{lowercase event.side}} | buy |
truncate | {{truncate event.description 100}} | First 100 chars + ... |
default | {{default event.category "N/A"}} | Fallback when value is empty |
math | {{math event.price "*" 100}} | Basic arithmetic (+, -, *, /) |
json | {{json event}} | Pretty-printed JSON |
Formatter Options
Some formatters accept named options:Comparison Helpers
Use these as sub-expressions inside{{#if}} blocks:
| Helper | Description |
|---|---|
eq | Equal (===) |
ne | Not equal (!==) |
gt | Greater than |
gte | Greater than or equal |
lt | Less than |
lte | Less than or equal |