Overview
Variables make workflows reusable. Instead of hardcoding values like email addresses or form data, you define variables in the workflow's inputs block and reference them in steps using template syntax.
Defining Variables
Variables are declared in the inputs section of a RITSU workflow:
inputs:
email:
type: string
label: 'Email Address'
description: "The user's email for registration"
required: true
age:
type: number
label: 'Age'
required: false
acceptTerms:
type: boolean
label: 'Accept Terms'
required: trueEach variable has:
| Field | Required | Description |
|---|---|---|
type | Yes | The data type — see Variable Types below |
label | Yes | Display name shown in the run dialog |
description | No | Helper text explaining what the variable is for |
required | No | Whether the variable must be provided at runtime (defaults to false) |
itemSchema | No | Schema definition for array and object types |
Variable Types
Scalar Types
| Type | Description | Example |
|---|---|---|
string | Text value | "user@example.com" |
number | Numeric value | 42 |
boolean | True or false | true |
date | Date value | "2026-03-26" |
Composite Types
Array
A list of items. Use itemSchema to define the structure of each item.
inputs:
users:
type: array
label: 'Users to register'
required: true
itemSchema:
name:
type: string
label: 'Name'
email:
type: string
label: 'Email'Object
A structured record with named properties.
inputs:
address:
type: object
label: 'Shipping Address'
required: true
itemSchema:
street:
type: string
label: 'Street'
city:
type: string
label: 'City'
zipCode:
type: string
label: 'ZIP Code'Template Syntax
Reference variables in step values using ${variableName} syntax.
Scalar References
- id: step-1
action: fill
name: 'Enter email'
mode: auto
with:
target:
description: 'Email input field'
vision:
hint: "Text field labeled 'Email'"
value: '${email}'Object Property Access
Use dot notation to access properties within an object variable:
value: "${address.street}"
value: "${address.city}"
value: "${address.zipCode}"Array Item Access
Use bracket-dot notation to reference properties within array items:
value: "${users[].name}"
value: "${users[].email}"Array iteration with ${array[].property} is used in conjunction with batch execution or loop processing, where each iteration processes the next item in the array.
Variable Scope
Where Templates Are Resolved
Template expressions ${variableName} are supported in the following step fields:
| Field | Step Types |
|---|---|
with.value | fill, select |
with.url | navigate |
with.target.description | click, fill, select |
with.target.vision.hint | click, fill, select |
with.prompt | agent |
Scope in Agent Steps
Variables referenced in an agent step's prompt field are resolved before the agent starts. The agent receives a fully interpolated string and does not have access to the variable system during execution.
- id: step-3
action: agent
name: 'Fill dynamic form'
with:
prompt: 'Fill the registration form for ${name} with email ${email}'
maxSteps: 10In this example, ${name} and ${email} are replaced with their runtime values before the agent begins.
Resolution Timing
Variables are resolved at execution time using the inputValues provided for each run. They are not resolved at workflow save time or during editing.
Template expressions are string-level substitutions. They do not support arithmetic, conditionals, or nested expressions.
Variables in the Run Dialog
When you run a workflow, the Run Workflow dialog presents input fields for each variable:
- Scalar variables — Rendered as text fields, number inputs, checkboxes, or date pickers based on type
- Required variables — Marked with a required indicator; the run cannot start until they are filled
- Descriptions — Displayed as helper text below each field
Variables in Batch Execution
In batch mode, the input table has a column for each variable. Each row represents a separate run with its own set of values.
| Row | age | acceptTerms | |
|---|---|---|---|
| 1 | alice@example.com | 28 | true |
| 2 | bob@example.com | 35 | true |
| 3 | carol@example.com | 22 | true |
Each row is executed as an independent run within the batch.
For large-scale data entry, prepare your variable values in a spreadsheet and paste them into the batch input table.