Workflow variables are the data that actions create, read, and update as a workflow runs. They allow actions to share information so each step can build on the results of previous steps.
Every workflow run has its own set of variables. When a new workflow starts, it creates a new set of inputs, outputs, and state values. Data from one workflow run never affects another.
How data moves through a workflow
A workflow begins with input data. As each action runs, it can produce new data, store values for later use, or use information created by earlier actions.
This flow lets information move through the workflow without requiring actions to collect the same data more than once.
Types of workflow variables
Workflow variables come from several sources.
Workflow inputs
Workflow inputs are created when the workflow starts.
Depending on how the workflow is triggered, inputs might come from:
- Information collected from the employee
- Employee profile data
- An external event
- Values passed into the workflow by another system.
Workflow inputs are often used throughout the rest of the workflow.
Action outputs
Many actions produce outputs that later actions can use.
For example:
- An Agent action can collect information from an employee.
- A Run Tool action can retrieve data from another system.
- A Transform action can reshape existing data.
Outputs let later actions reuse information without repeating the same work.
State variables
State variables store information that needs to be reused later in the workflow.
Unlike outputs, which belong to a specific action, state variables remain available until the workflow finishes.
Typical uses include:
- Saving values used by multiple actions.
- Remembering workflow decisions.
- Storing identifiers used later in the workflow.
List items
Inside a Process List action, variables represent the current item being processed.
This lets the same sequence of actions repeat for every item in a collection without creating separate workflows.
Workflow context
Some AI prompt fields provide additional context, such as branding information or the current date and time.
These values help the AI generate responses that are appropriate for your organization, but they aren't intended to store workflow data.
Using workflow variables
Most workflow configuration fields support workflow variables.
Use Insert Variable to browse available variables and insert them into the current field. The variables available depend on where you are configuring the workflow and which actions have already run.
If an action hasn't executed yet, its outputs aren't available to later actions.
Expressions and prompt tokens
Workflow variables are used in two different ways.
| Use case | Purpose |
| Expressions | Evaluate or transform data while the workflow runs. |
| Prompt tokens | Insert workflow values into text sent to an AI agent. |
Use expressions when configuring workflow logic, mappings, or calculations.
Use prompt tokens when you want an AI agent to include workflow data in its instructions or responses.
Although both use workflow variables, they serve different purposes.
Common patterns
Most workflows follow a few common data patterns.
| Goal | Typical approach |
| Pass information into an integration | Use workflow inputs. |
| Reuse information collected by an Agent | Use the Agent action's outputs. |
| Save a value for later | Store it as a state variable. |
| Process multiple records | Use list items inside a Process List action. |
| Make workflow decisions | Evaluate inputs, outputs, or state variables in a Condition action. |
| Prepare data for another action | Use a Transform action before mapping the result. |
Best practices
When working with workflow variables:
- Collect information once and reuse it throughout the workflow.
- Use descriptive names for inputs, outputs, and state variables.
- Store values in state variables when multiple actions need the same information.
- Keep workflow data organized so later actions are easier to understand.
- Test workflows to verify that variables contain the expected values before publishing.