Skip to content

Variables

Variables are named containers that store values during your automation. They let you pass data between commands, customize behavior without editing commands, and build dynamic automations that adapt to different inputs.

RTILA X has three types of variables, each with a different scope and purpose:

Variable Type Scope Where Defined When Available
Global Variables All projects for your profile Preferences → Global Variables Always, in every project
Project Variables A single project Project Settings → Variables tab Only in that project
Runtime Variables A single execution run Created by commands during execution Only during the current run

Global variables are available in every project for your current profile. They’re perfect for values you use across many automations, like API keys, base URLs, or common search terms.

  1. Click your profile name in the bottom-left sidebar.
  2. Click Preferences.
  3. Switch to the Global Variables tab.
  4. Click New Variable to create one.

Global Variables tab showing a table of variables with edit and delete buttons

Field Type Required Description
Name Text Yes The variable name. Used as ${name} in commands. Must be unique.
Value Text (multiline) Yes The value to store. Can span multiple lines for list variables.
Secure Checkbox No When enabled, the value is masked with •••••••• in the UI.
List Checkbox No When enabled, the value is treated as multiple items (one per line).
  1. Click New Variable.
  2. Enter a Name (e.g., api_key, base_url, search_term).
  3. Enter the Value.
  4. Optionally enable Secure for sensitive values like passwords.
  5. Optionally enable List for multi-value variables.
  6. Click Save.
  1. In the Global Variables table, click the edit icon (pencil) next to the variable.
  2. Modify the fields.
  3. Click Save.
  1. Click the trash icon next to the variable.
  2. Confirm the deletion.

Warning: Deleting a global variable removes it from all projects that reference it. Any commands using ${deleted_variable} will no longer resolve the value.

When you enable the Secure option:

  • The value is displayed as •••••••• in the UI.
  • The actual value is still stored and used during execution.
  • This prevents shoulder-surfing when sharing your screen.
  • The value is still accessible in commands via ${variable_name}.

Important: Secure masking is a UI feature only. The value is stored in the database. Don’t use it as a substitute for proper secret management in production environments.


Project variables are defined within a specific project and are only available in that project. They’re ideal for project-specific values like target URLs, search terms, or configuration options.

  1. Select your project in the project list.
  2. Click Settings in the ribbon.
  3. Switch to the Variables tab.
  4. Click Add Variable.

Variables tab showing a list of defined variables with edit and remove buttons

Field Type Required Description
Name Text Yes The variable name. Used as ${name} in commands.
Value Text (multiline) Yes The default value. Can be multiline for list variables.
Description Text No A note explaining what this variable is for.
Required Checkbox No If checked, the user must provide a value before running.
Secure Checkbox No Masks the value in the UI.
List Checkbox No Treats the value as multiple items (one per line).

Variable Matching (Auto-Fill from Globals)

Section titled “Variable Matching (Auto-Fill from Globals)”

RTILA X has a powerful feature called Variable Matching:

If a project variable has the exact same name as a global variable, RTILA automatically fills the project variable with the global variable’s value at runtime.

Example:

  • Global variable: api_key = "sk-abc123"
  • Project variable: api_key = "" (empty)

At runtime, the project variable api_key is automatically populated with "sk-abc123".

This means you can:

  1. Define sensitive values (API keys, passwords) once as global variables.
  2. Create project variables with the same name but leave them empty.
  3. RTILA fills them automatically at runtime.
  4. You never need to copy-paste sensitive values between projects.

Tip: This is especially useful for team workflows. Define shared credentials as global variables, and every project with matching variable names picks them up automatically.

When a project variable is marked as Required:

  • The user must provide a value before the project can run.
  • If the value is empty and no global variable matches, RTILA prompts for input.
  • In non-interactive environments, you must provide the value via CLI arguments: --var-name=value

When a variable has the List option enabled:

  • The value is treated as multiple items, one per line.
  • Each line becomes a separate item for iteration.
  • Perfect for use with for_each loops.

Example list variable value:

keyword 1
keyword 2
keyword 3

When used in a for_each loop, RTILA iterates over each line.


Runtime variables are created during execution by commands. They don’t exist until the automation runs, and they disappear when the run ends.

Command How It Creates Variables
set_variable Explicitly sets a variable: name: "my_var", value: "hello"
get_text Stores element text in output_variable
get_attribute Stores an attribute value in output_variable
get_property Stores a DOM property in output_variable
is_visible Stores true/false in output_variable
execute_script Stores script return value in output_variable
for_each Creates a loop variable (default: item) for each iteration
math_operation Stores calculation result in output_variable
string_operation Stores string result in output_variable
  1. Created — A command creates the variable during execution.
  2. Available — The variable is available to all subsequent commands in the same run.
  3. Persisted — Runtime variables are saved in checkpoints, so they survive crashes.
  4. Destroyed — When the run completes, runtime variables are discarded.

Use the ${variable_name} syntax in any command parameter:

url: https://example.com/search?q=${search_term}
selector: css=.product-${product_id}
value: ${extracted_email}

The ${} syntax is how you reference variables in command parameters. RTILA resolves these before executing the command.

${variable_name}

Examples:

url: https://example.com/search?q=${search_term}
value: ${username}
selector: css=#input-${field_id}

You can use full JavaScript expressions inside ${}:

${price * 1.2}
${name.toUpperCase()}
${url.split('/')[2]}
${Math.random() * 100}
${item.split(';')[0].trim()}

RTILA handles variable types intelligently:

Scenario Behavior
${my_var} as the entire parameter The variable’s original type is preserved (number, boolean, etc.)
"Price: ${price}" embedded in text The result is always a string
${item.split(';')[0]} Returns the result of the JavaScript expression

When RTILA resolves ${variable_name}, it checks in this order:

  1. Runtime variables (created during this run)
  2. Project variables (defined in project settings)
  3. Global variables (defined in preferences)

If a variable exists in multiple scopes, the most specific scope wins.


When you have a List variable with semicolon-separated columns, you can access individual columns using JavaScript.

A list variable named users with this value:

john;admin;user1
jane;editor;user2
bob;viewer;user3

Inside a for_each loop, the current line is available as ${item}:

Expression Result
${item} john;admin;user1 (the whole line)
${item.split(';')[0].trim()} john (first column)
${item.split(';')[1].trim()} admin (second column)
${item.split(';')[2].trim()} user1 (third column)

In the Visual Builder, when recording or editing commands:

  1. Right-click on any input field.
  2. Choose Insert Variable.
  3. A submenu shows all available variables.
  4. For CSV-style list variables, you see additional options:
    • The variable name (for the whole line)
    • Individual columns: Column 1 (john), Column 2 (admin), etc.
    • Entire Line option

Context menu showing variable insertion options with CSV column access

RTILA automatically detects CSV-style variables:

  1. It looks at the first line of the variable’s value.
  2. If the line contains semicolons (;), it splits into columns.
  3. Each column gets its own context menu entry.
  4. The generated syntax uses ${item.split(';')[N].trim()}.

Tip: The context menu shows a preview of the first row’s data in parentheses, so you can see what each column contains before inserting it.


When recording in the browser, you can insert variables directly into form fields:

  1. Right-click on an input field while recording.
  2. Select Insert Variable from the context menu.
  3. Choose the variable (or a specific CSV column).
  4. RTILA records a fill command with the variable reference: value: ${variable_name}

This is especially useful for:

  • Filling forms with different data on each iteration
  • Using credentials stored in secure variables
  • Parameterizing search queries

RTILA X automatically detects all variables used in your project’s commands. The detection scans for:

  • set_variable commands (creates variables)
  • output_variable parameters (stores results)
  • for_each loop variables (the as parameter)

These detected variables are available in:

  • The context menu for variable insertion
  • The AI Assistant’s understanding of your project
  • Variable matching with global variables

Tip Why It Matters
Use descriptive names ${product_price} is clearer than ${p}
Use global variables for shared values API keys, base URLs, credentials
Use project variables for project-specific values Search terms, target URLs
Mark sensitive variables as Secure Prevents accidental exposure
Use Required for critical variables Ensures values are provided before running
Use List variables for iteration Perfect for batch processing
Use Variable Matching Define once globally, use everywhere
Test variable resolution Check the preview to make sure variables resolve correctly
Avoid spaces in variable names Use underscores: my_variable not my variable