Skip to content
Back to site

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

Each variable has:

FieldRequiredDescription
typeYesThe data type — see Variable Types below
labelYesDisplay name shown in the run dialog
descriptionNoHelper text explaining what the variable is for
requiredNoWhether the variable must be provided at runtime (defaults to false)
itemSchemaNoSchema definition for array and object types

Variable Types

Scalar Types

TypeDescriptionExample
stringText value"user@example.com"
numberNumeric value42
booleanTrue or falsetrue
dateDate 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:

FieldStep Types
with.valuefill, select
with.urlnavigate
with.target.descriptionclick, fill, select
with.target.vision.hintclick, fill, select
with.promptagent

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

In 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.

RowemailageacceptTerms
1alice@example.com28true
2bob@example.com35true
3carol@example.com22true

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.

Next Steps

Credits & PricingUnderstand how credits are consumed and manage your subscription. Workflows & RITSU FormatExplore the RITSU format and step configuration options.
Cookie Settings

We use cookies to improve your experience and analyze site usage.

Necessary Cookies

Essential cookies required for basic site functionality. Cannot be disabled.

Analytics Cookies

Help us understand how you use our site to improve our services.

Privacy Policy