Guide
Variables
Global, user, and action-scoped variables and interpolation syntax.
Variables
Variables let handler chains use data from triggers and earlier steps.
Interpolation syntax
In handler text fields, wrap names in braces:
Hello \{username\}! You said \{message\}Resolution order (highest wins for duplicates):
- Action-scoped variables (set earlier in the same run)
- User variables (per chatter)
- Global variables
- Trigger context variables
Scopes
| Scope | Set by | Used for |
|---|---|---|
| Action | Set variable handler in same run | Temporary values in one execution |
| User | Set variable with User scope | Per-viewer state (needs username in trigger context) |
| Global | Set variable with Global scope | App-wide counters, flags, config |
Use Get variable to read a scope and write into an action variable.
Trigger variables
Triggers expose event fields as variables. Examples:
- Twitch chat:
username,message,role, … - Hotkey:
shortcut,key,modifiers - Queue status:
queueName,pending,job
See each trigger in the API Reference.
Editor helpers
- Hover trigger titles for a variable picker (copies
\{key\}). - In handler fields with variable support, type
\{to open a dropdown of available trigger + action variables. Keep typing to filter, use the arrow keys to highlight, and press Enter or Tab to insert. - The code and JSON editors have a Variables button that inserts a variable at the cursor.
Collections vs variables
Collections are named key-value stores (session or persistent). Variables are string values in scopes. Use collections for structured data shared across actions; use variables for interpolation in text fields.
See Collections.