Record10 Logo Record10
Documentation / Record Flow / Variables System

Variables System

Store, manage, and reuse data across your automation workflows with Record Flow's powerful variable system

What are Variables?

Variables allow you to store and reuse data throughout your flows. They make your automations dynamic, reusable, and easier to maintain.

Key Benefits

  • Dynamic Workflows: Use different data without changing the flow
  • Data Reuse: Extract data once, use it multiple times
  • Easy Maintenance: Update values in one place
  • Sensitive Data: Store credentials and API keys securely

Variable Scopes

Record Flow supports four variable scopes, each with different availability and use cases.

Global Variables

Available Everywhere

Global variables are accessible across all workspaces and flows in your Record Flow installation.

Best For:
  • User credentials (username, password)
  • API keys and tokens
  • Base URLs used across multiple projects
  • Common configuration values
Example:
Name: apiKey
Value: sk_test_1234567890
Scope: Global

Workspace Variables

Available in Workspace

Workspace variables are available to all flows within a specific workspace.

Best For:
  • Project-specific URLs
  • Environment-specific settings (dev, staging, prod)
  • Shared test data for related flows
  • Client-specific configuration
Example:
Name: baseUrl
Value: https://staging.example.com
Scope: E-Commerce Testing (workspace)

Flow Variables

Available in Flow

Flow variables are only available within a specific flow.

Best For:
  • Flow-specific test data
  • Temporary configuration
  • Flow-unique parameters
  • Isolated testing values
Example:
Name: testEmail
Value: user@test.com
Scope: Login Flow (flow)

Runtime Variables

Created During Execution

Runtime variables are created automatically during flow execution when you extract data from the page.

Created By:
  • Get Element Text action
  • Get Element Attribute action
  • Data extraction operations
Characteristics:
  • Temporary - only exist during flow execution
  • Not persisted after flow completes
  • Can be used in subsequent actions within same flow

Using Variables

Syntax

Reference variables using double curly braces:

{{variableName}}

In Actions

Variables can be used in any action parameter that accepts text:

Navigate Action

URL: {{baseUrl}}/login

Input Text Action

Selector: #username
Text: {{username}}

Assert Action

Operation: url_contains
Value: {{expectedPath}}

Concatenation

Combine variables with text:

{{baseUrl}}/api/users/{{userId}}
Welcome, {{firstName}} {{lastName}}!

Resolution Priority

When multiple variables have the same name, Record Flow resolves them in this order:

  1. 1. Runtime Variables - Created during execution (highest priority)
  2. 2. Flow Variables - Defined in the current flow
  3. 3. Workspace Variables - Defined in the current workspace
  4. 4. Global Variables - Defined globally (lowest priority)

Creating & Managing Variables

Creating Variables

  1. 1. Open Variables Panel - Click the Variables icon in the sidebar
  2. 2. Select Scope - Choose Global, Workspace, or Flow tab
  3. 3. Click "Add Variable"
  4. 4. Configure Variable:
    • Name - Variable identifier (no spaces)
    • Value - The data to store
    • Type - String, number, boolean, or JSON
    • Secret - Mark as sensitive (masks value)
  5. 5. Save Variable

Variable Types

String

Text values

Hello World

Number

Numeric values

42

Boolean

True/false values

true

JSON

Structured data

{"key": "value"}

Secret Variables

Mark variables as secret to hide their values in the UI:

Security Best Practices

  • Always mark passwords as secret
  • Mark API keys and tokens as secret
  • Never commit variables with sensitive data to version control
  • Use environment-specific variables for different stages

Extracting Data into Variables

Get Element Text

Extract text from an element and store it in a runtime variable:

Action: Get Element Text
Selector: .product-price
Variable Name: productPrice

Result: Creates runtime variable {{productPrice}}

Get Element Attribute

Extract attribute values and store them:

Action: Get Element Attribute
Selector: a.download-link
Attribute: href
Variable Name: downloadUrl

Result: Creates runtime variable {{downloadUrl}}

Using Extracted Data

Once extracted, use the variable in subsequent actions:

1. Get Element Text → Store in {{userName}}
2. Assert: equals → Value: {{userName}}
3. Navigate → URL: {{baseUrl}}/users/{{userName}}

Practical Examples

Example 1: Login Flow

Setup Variables:
Global Variables:
- username: admin@example.com
- password: ••••••••• (secret)
- loginUrl: https://app.example.com/login
Flow Actions:
1. Navigate → {{loginUrl}}
2. Input Text → #email → {{username}}
3. Input Text → #password → {{password}}
4. Click → button[type="submit"]
5. Wait → element_visible → .dashboard

Example 2: Data Scraping

Setup Variables:
Workspace Variables:
- targetUrl: https://example.com/products
Flow Actions:
1. Navigate → {{targetUrl}}
2. Get Element Text → .product-title → productName
3. Get Element Text → .product-price → productPrice
4. Get Element Attribute → .product-image → src → imageUrl
5. Assert → contains → Value: Product found
Result:
Runtime variables created:
- {{productName}} = "Premium Widget"
- {{productPrice}} = "$99.99"
- {{imageUrl}} = "https://example.com/images/widget.jpg"

Example 3: Environment-Specific Testing

Workspace "Development":
baseUrl: https://dev.example.com
apiKey: dev_key_123
Workspace "Production":
baseUrl: https://example.com
apiKey: prod_key_456
Same Flow Works in Both:
1. Navigate → {{baseUrl}}/api/test
2. Set Cookie → api_key → {{apiKey}}
3. Click → #run-test

Best Practices

Do's

  • Use descriptive variable names (camelCase recommended)
  • Choose the narrowest scope possible (flow > workspace > global)
  • Mark sensitive data as secret
  • Use global variables for truly universal values
  • Document complex variable usage in flow descriptions

Don'ts

  • Don't use spaces in variable names
  • Don't store sensitive data in flow or workspace variables if shared
  • Don't create duplicate variable names across scopes (confusing)
  • Don't hardcode values that might change - use variables instead
  • Don't forget to clean up unused variables

Naming Conventions

Good:
- baseUrl, apiKey, userName, productPrice
- isLoggedIn, hasPermission, shouldRetry

Avoid:
- url, key, name (too generic)
- user name (spaces)
- x, temp, foo (unclear meaning)

Next Steps