Stream KitDocs

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):

  1. Action-scoped variables (set earlier in the same run)
  2. User variables (per chatter)
  3. Global variables
  4. Trigger context variables

Scopes

ScopeSet byUsed for
ActionSet variable handler in same runTemporary values in one execution
UserSet variable with User scopePer-viewer state (needs username in trigger context)
GlobalSet variable with Global scopeApp-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}).
  • Type { in any handler text field, If condition, key-value value or JSON editor to open a list of the variables available at that point. Keep typing to filter, use the arrow keys to highlight, and press Enter or Tab to insert. Escape closes only the list.
  • The list is grouped into Trigger, Action and Global variables (bot commands and timers add their own context group).
  • The code and JSON editors also have a Variables button that inserts a variable at the cursor.

Which variables are suggested

Each handler only sees variables that exist when it runs:

  • Trigger fields and global variables are available everywhere.
  • Variables set by a handler (for example Get variable → Target name, or Set variable) appear for handlers after it.
  • A variable set in only one branch of an If handler is marked maybe for handlers after the If, because it is not set on every run. Set it in both branches to make it always available.

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.

On this page