FeaturesPricingBlogDownload

Template Variables

Scripting Variables

Turn snippets into dynamic automations with Rhai.

These variables allow your snippets to perform logic and conditional execution on the fly.

#{script:expression} — Run Rhai Scripts

Syntax Warning: The correct prefix is `script:`. Do NOT use `rhai:` as it will fail to execute.
Evaluates a script expression written in the Rhai programming language and inserts the return value as text. This is perfect for conditional logic and string manipulation that built-in variables can't handle.
  • Error handling: If your script has a syntax error, it outputs [Script Error: <message>].
Example 1 (Math): `#{script:2 + 2}` → `4`

Example 2 (Logic): #{script:if is_weekend() {"Enjoy your weekend!"} else {"Have a productive day!"} }

For a full list of built-in functions, see the Advanced Rhai Scripting guide.