Macros & Variables
export const meta = { title: 'Macros & Variables', description: 'Use macros for fresh test data and variables for values shared across your workflow.', tags: ['reference', 'workflows', 'macros', 'variables'], };
Macros generate fresh, unique data every time a workflow runs. Variables let you reference shared values across nodes — input data, macro results, and extracted values are all accessible as $var.{name}.
Both are available from the same $ suggestions menu in any macro-enabled field.
01Syntax
Macro expressions follow the format $MACRO_NAME() or $MACRO_NAME(args). They can appear standalone or inline within a larger string:
- Standalone:
$EMAIL()resolves totest-a1b2c3d4@example-test.com - Inline:
user-$UUID()@corp.comresolves touser-4f3a1b2c-...@corp.com - Escaped:
\$EMAIL()produces the literal text$EMAIL()(no resolution)
02Using macros
Type $ in any macro-enabled field to open suggestions. Browse the list, keep typing to filter, then press Enter to insert the item you want.
In workflow and node configuration fields, inserted macros now appear as inline token pills. This makes mixed text and dynamic values easier to read, especially when you combine plain text, macros, and variables in the same field.

Use the richer editor to work with dynamic values more easily:
- Type
$anywhere in a field to open suggestions at the cursor - Insert a macro inline without replacing the surrounding text
- Mix text, macros, and variables in the same field, such as
user-$UUID()@corp.com - Click a token pill to review or edit the inserted macro or variable
- Use the cursor keys to move through text and tokens when adjusting a field
Macros work in:
- Action input fields (text, email, number)
- Action titles
- Action descriptions
- Navigate node URL fields
- Email notification step fields, including recipients, subject lines, message bodies, and attachment filenames
- Workflow inputs and step fields where you want AI-generated values inserted directly during execution
Use macros directly in step fields when you want each run to generate realistic values at execution time. For example, enter $FIRST_NAME() $LAST_NAME() in a name field, Welcome $FIRST_NAME() in a short subject field, or Notes: $RANDOM_STRING(12) in a short text entry.
You can also use dynamic values in Workflow inputs so later steps reuse the generated result through variables. For example, set a workflow input to $FIRST_NAME(), $LAST_NAME(), or $RANDOM_STRING(8) when you want a realistic value available across the workflow.

Use macros in workflow navigation when the destination changes by environment, account, or test data. For example, set a Navigate node URL to /customers/$SEQUENCE("accounts") for root-relative routing, or https://app.example.com/users/$UUID() to generate a unique destination on each run.
Use macros in Email notification steps when you want each message to reflect the current run. For example, set the recipient to qa+$SEQUENCE("alerts")@example.com, the subject to Run $UUID() failed, the message body to Failure detected on $TODAY() at $NOW(), or an attachment filename to trace-$TIMESTAMP().zip.
Each run resolves macros independently at send time or execution time, so every run gets fresh values. In notification steps, macros resolve when the email sends during that run, not when you design the workflow. Cached runs also re-resolve macros on replay.
03Available macros
| Macro | Arguments | Output | Example |
|---|---|---|---|
$UUID() | — | Random UUID v4 | a1b2c3d4-e5f6-7890-abcd-ef1234567890 |
$EMAIL() | — | Unique test email | test-xk9mq2@example-test.com |
$FIRST_NAME() | — | Random first name | Jordan |
$LAST_NAME() | — | Random last name | Chen |
$PHONE() | — | US phone number (555 prefix) | +1-555-382-7491 |
$RANDOM_INT(min, max) | Two numbers | Random integer (inclusive) | 42 |
$RANDOM_STRING(length) | One number (1–1000) | Alphanumeric string | xK9mQ3bR |
$TODAY() | — | Current date | 2026-02-19 |
$DATE(days) | One number | Date offset from today | $DATE(-7) → last week |
$NOW() | — | ISO 8601 timestamp | 2026-02-19T14:30:00.000Z |
$TIMESTAMP() | — | Unix milliseconds | 1771520400000 |
$SEQUENCE("name") | Counter name | Auto-incrementing number per run | 1, 2, 3... |
04Common patterns
Unique user registration:
Set the email input to $EMAIL() and name to $FIRST_NAME() $LAST_NAME(). Each run creates a distinct test user.
Direct step values for realistic entries:
Enter macros directly in step fields to generate natural-looking values during execution. For example, use $FIRST_NAME() $LAST_NAME() for a full name, Intro to $RANDOM_STRING(6) for a short subject, or About $FIRST_NAME() for a short-form entry.
Workflow inputs with generated data:
Set a workflow input to $FIRST_NAME(), $LAST_NAME(), or $RANDOM_STRING(10) when you want generated data to be available as a reusable variable later in the workflow.
Numbered items:
Use $SEQUENCE("orders") to generate incrementing IDs. The counter resets with each new run and increments independently per name — $SEQUENCE("orders") and $SEQUENCE("items") maintain separate counts.
Date-relative testing:
Use $DATE(30) for a date 30 days in the future or $DATE(-7) for last week. Use $TODAY() for the current date.
Unique identifiers:
Use $UUID() for globally unique values or $RANDOM_STRING(8) for shorter random strings. Combine with text for readable IDs: order-$RANDOM_STRING(6).
Dynamic navigation targets:
Use macros in a Navigate node URL when the target should change per run. For example, /releases/$DATE(0) opens a date-based page, and https://app.example.com/invites/$RANDOM_STRING(12) navigates to a unique invite path.
05Best practices
- Use direct step macros when you need realistic one-off values only in that field for that run
- Use Workflow inputs with macros when later steps need to reuse the same generated value through
$var.{name} - Use AI-generated macros in step fields for short, natural-language entries such as names, subjects, and short text fields
- Prefer standard macros such as
$EMAIL(),$UUID(), or$SEQUENCE("name")when you need uniqueness, predictability, or a specific format - Expect AI-generated values to resolve at runtime for each run, so avoid relying on an exact phrase or wording in later assertions unless you first store and reuse that value through a variable
- When you mix AI-generated macros with workflow variables and inputs, generate the value once in a Workflow input if multiple steps must use the same text
- Keep AI-generated values short and task-focused so they fit reliably in the field you are automating
- Use
$EMAIL()instead of hardcoded addresses for any field that requires uniqueness - Use
$SEQUENCE("name")when you need predictable ordering within a single run - Prefer
$DATE(days)over fixed dates so tests stay valid over time - Insert macros from the
$suggestions menu instead of typing long expressions by hand - Keep mixed text and tokens in a single field when you need readable labels, URLs, identifiers, or notification content
- In Email notification steps, preview your full recipient, subject, body, and attachment naming pattern so the resolved values are clear when the email sends
- Remember that notification macros resolve when the step sends the email during each run, so avoid assuming a design-time or saved value
06Variables
Note: Workflow runs now block unresolved variable references before execution starts. If a field includes
$var.{name}, make sure that variable is defined earlier in the workflow and will have a value when the run begins.
Variables let you reference values that are set during a workflow run. When an action node has input values, macros, or extracted data, those become variables accessible to other nodes as $var.{name}.
How variables are created
Variables come from four sources:
| Source | How it works | Example |
|---|---|---|
| Input | A value you enter in an action's input field | Setting a company field creates $var.company |
| Macro | A macro expression in an input field | $EMAIL() creates $var.email |
| Extracted | Data extracted from the page during a run | An extraction step creates $var.order_id |
| Credential | Values from the credential used in a login node | Login credentials create $var.username |
Using variables in fields
Type $ in any macro-enabled field to open suggestions. Type $var. to narrow the list to variables only, then press Enter to insert the variable you want.
Variables now appear inline in the richer editor as token pills, just like macros. Use this to build mixed values such as /accounts/$var.account_id/details or Hello $var.first_name without losing the surrounding text.
Selecting a variable inserts $var.{name} — no parentheses needed, unlike macros.
You can also use variables in Navigate node URL fields. This lets you build dynamic destinations such as /accounts/$var.account_id or https://app.example.com/$var.region/dashboard after earlier nodes set those values.
Before you run a workflow, confirm that every referenced variable is valid:
- Open each field that uses
$var.{name}. - Verify the variable appears in suggestions or in the variables list.
- Make sure the variable is defined by an earlier node in the workflow.
- For extracted or credential values, confirm the workflow has the step or credential needed to populate that variable.
If a variable reference cannot be resolved, the workflow does not start until you fix or remove that reference.
Variables panel
When no node is selected in the Configure tab, the sidebar shows a list of all variables discovered across the workflow. Each variable displays its name and source. Click any variable to jump to the node that defines or references it.
Variables with an Input or Macro source have values at design time. Variables from Extracted or Credential sources are populated when the workflow runs.
Use the variables list to review workflow inputs before you run:
- Confirm the variable name matches the one you reference in other fields
- Confirm the source is the node or credential you expect
- Confirm extracted values come from a step that runs before the reference
07Using shared values in workflows
Use variables to carry values from one node to the next. This lets you create a value once, then reuse it in later inputs, assertions, descriptions, and Navigate node URL fields.
Common examples include reusing an account ID from an extraction step, passing a login username into a later form, or building a destination such as /accounts/$var.account_id/details.
When you decide between a direct macro and a variable, choose based on reuse:
- Insert a macro directly in a step field when only that step needs a fresh value.
- Set a Workflow input to a macro when later steps must reuse the same resolved value.
- Reference the saved value with
$var.{name}anywhere else in the workflow.
Use this pattern for AI-generated values too. For example, place an AI-generated macro in a Workflow input when you want one realistic name, subject, or short text value reused across multiple steps. Place it directly in a step field when you only need that text once.
To avoid blocked runs, check shared values before execution:
- Create the value in an earlier node with an input, macro, extraction, or credential.
- Insert the variable from the
$suggestions menu instead of typing the name manually. - Review the workflow order so the defining node runs before any node that references the variable.
- Recheck the variables list if you rename fields or remove steps.
When you need a value that is always available at design time, prefer an Input or Macro source. When you use an Extracted value, make sure the extraction step is still present and succeeds before any dependent step runs.
08Troubleshooting
| Issue | What to check | How to fix |
|---|---|---|
| A workflow will not start because of an unresolved variable | The referenced $var.{name} does not exist in the workflow, appears after the step that uses it, or no longer has a source | Insert the variable again from the suggestions menu, move the defining step earlier, or update the field to use an available variable |
| A variable does not appear in the suggestions list | The variable has not been created yet, the defining field was renamed, or the source step was removed | Recreate the input, macro, extraction, or credential value that defines the variable |
| A Navigate URL using a variable does not work | Part of the path uses a missing or empty variable | Open the variables list, confirm the value source, and verify the variable is populated before navigation |
| Editing mixed text and tokens feels difficult | The field contains both plain text and multiple macros or variables | Click the token pill you want to change, then use the cursor keys to move through the field and adjust text or reinsert a value from $ suggestions |
| An extracted value is unavailable in a later step | The extraction step does not run before the reference or no longer captures the value you expect | Move the extraction earlier or update the extraction so it produces the needed variable |
| An AI-generated value changes between steps when you expected one shared value | The AI-generated macro was inserted directly into multiple step fields, so each field resolves independently at runtime | Move the AI-generated macro into a Workflow input, then reuse that saved result with $var.{name} in later steps |
| A test expects exact AI-generated wording and fails intermittently | The step depends on a specific phrase instead of reusing the generated result | Save the AI-generated value once, reference it with $var.{name}, or use a standard macro when you need a fixed format |