Workflow variables let actions share data during a workflow run. Depending on the action you're configuring, you can insert variables into expressions, mappings, conditions, and AI prompts.
Use Insert Variable to browse available variables for the current field.
For an introduction to workflow data, see Understand workflow variables.
Variable categories
The variables available depend on where you're configuring the workflow and which actions have already executed.
| Category | Description |
| Workflow Inputs | Data provided when the workflow starts. |
| Outputs | Data produced by earlier workflow actions. |
| State Variables | Values stored by Set State actions. |
| List Items | The current item when configuring actions inside a Process List. |
| Workflow Context | Contextual values available to AI prompt fields. |
Workflow inputs
Workflow inputs are created by the Start action.
They can originate from:
- Employee responses
- Employee profile information
- Event payloads
- Values supplied by another system
Example
| Variable | Example path |
| Employee ID | $.inputs.employeeId |
| Request type | $.inputs.requestType |
| Manager | $.inputs.manager |
The available inputs depend on how the Start action is configured.
Action outputs
Many workflow actions produce outputs that later actions can use.
Actions that commonly produce outputs include:
- Agent
- Run Tool
- Transform
- Wait (event-based)
Outputs are grouped by the action that created them.
Example
| Output | Example path |
| Start date | $.TimeOffAgent.startDate |
| Request ID | $.CreateRequest.requestId |
| Approval status | $.ManagerApproval.status |
Output paths use the identifier of the action that produced them.
State variables
State variables are created by Set State actions.
Unlike action outputs, state variables remain available throughout the workflow run.
Typical uses include:
- Saving identifiers
- Reusing calculated values
- Passing values between distant workflow actions
Example
| Variable | Example path |
| Resume token | $resumeToken |
| Request number | $requestNumber |
| Manager ID | $managerId |
List items
List item variables are available only inside Process List actions.
They represent the current item being processed.
| Variable | Description |
| $.item | Current list item |
| $.outerItem | Parent item in a nested Process List |
| $.outerOuterItem | Grandparent item in a nested Process List |
These variables aren't available outside a Process List.
Workflow context
Workflow context variables are available in AI prompt fields.
| Variable | Description |
| $datetime | Current date and time |
| $companyName | Customer company name |
| $brandName | Customer-facing brand name |
| $toneOfVoice | Configured AI tone of voice |
Workflow context provides information to AI prompts. It isn't intended to store workflow data.
Variable availability
Variables become available only after they have been created.
For example:
| Variable type | Available after... |
| Workflow inputs | The Start action runs. |
| Action outputs | The producing action completes. |
| State variables | A Set State action executes. |
| List items | The workflow enters a Process List. |
Variables can't be referenced before they exist.
Expressions and AI prompts
Workflow variables can be used in two types of fields.
| Field type | Variable format |
| Expressions, mappings, and conditions | Workflow variable paths |
| AI prompt fields | Prompt tokens |
Expression fields evaluate workflow data.
AI prompt fields insert workflow values into the text provided to an Agent action.
Naming recommendations
Use meaningful names for workflow inputs, outputs, and state variables.
Good examples include:
- employeeId
- requestNumber
- managerEmail
- approvalStatus
Avoid generic names such as:
- value
- data
- result
- temp
Clear names make workflows easier to understand and maintain.
Common variable patterns
| Goal | Recommended variable |
| Pass information from the Start action | Workflow Inputs |
| Reuse information collected by an Agent | Action Outputs |
| Store information for later actions | State Variables |
| Process each item in a collection | List Items |
| Personalize AI prompts | Workflow Context |