Description:
The Read Environment Variables step enables a FlowWright workflow to retrieve the values of one or more configured environment variables.
Environment variables provide a centralized mechanism for storing application-wide configuration values such as file locations, API endpoints, server names, database identifiers, email addresses, feature flags, and other reusable settings. Rather than embedding these values directly within individual workflows, administrators can maintain them centrally and allow workflows to retrieve the latest values at runtime.
The workflow specifies one or more Environment Variable Mappings, which define which environment variables should be read and the workflow variables that will receive their values.
Typical uses include:
- Reading application configuration settings
- Loading API endpoints
- Retrieving file system locations
- Reading shared email addresses
- Loading environment-specific URLs
- Retrieving feature flag values
- Reading integration configuration
- Initializing workflow variables before processing begins
This step helps organizations centralize configuration management, simplify workflow maintenance, and reduce duplicated configuration across workflows.
Inputs
- Environment Variable Mappings – Specifies one or more mappings between FlowWright environment variables and workflow variables. Each configured environment variable is read, and its current value is assigned to the corresponding workflow variable.
Returns
- True – The configured environment variables were successfully read, and their values were assigned to the mapped workflow variables. Workflow execution continues through the success path.
- False – One or more environment variables could not be read because of invalid mappings, missing environment variables, configuration issues, or another execution error. Workflow execution follows the alternate path.
Usage:
The Read Environment Variables step is typically used near the beginning of a workflow to initialize configuration values that will be used throughout subsequent workflow activities.
During execution:
- Read the configured environment variable mappings.
- Retrieve the current value of each mapped environment variable.
- Assign each value to its corresponding workflow variable.
- Make the retrieved values available to downstream workflow steps.
- Continue workflow execution through either the True or False return path.
A typical workflow might look like this:

If the environment variables cannot be retrieved successfully, the workflow can follow the False path to log the error, notify an administrator, or terminate gracefully.
Typical workflow scenarios include:
- Loading API base URLs before REST calls
- Reading document storage locations
- Initializing email recipients
- Loading environment-specific configuration values
- Reading feature flag settings
- Retrieving shared application parameters
- Initializing integration settings
Example:
Let’s build and execute the "readEnvironmentVariablesDef" example.
- Create a new definition called “readEnvironmentVariablesDef” and open the definition in designer mode.
- Drag a “readEnvironmentVariables” step to the canvas.
- Connect the dots between the “Start” and “readEnvironmentVariables” steps, as shown above.
- Define a variable or a global to store the result.
- Click the "readEnvironmentVariables" step to configure its "Required" properties. Provide a name for the step. Click the button to configure environmental variable mappings, then click Save. Note: Click the "AI Predict" button for the Copilot to add new process steps that match your process description.

- Click the button to configure environment variable mappings. A pop-up window appears for configuration. Click the Add Row button to insert an empty row. Enter the environment variable and its value. Click the Save button. You may add multiple environment variables using the Add Row button.

- The “Logging” configuration is necessary for documentation and also measures workflow progress and percent complete. This is achieved by configuring the step state and percent fields individually, as shown in the images below. Configure the “Logging” using the following properties.

- Save the process definition, create a new instance, and execute it. Render the process instance. Click the “readEnvironmentVariables” process step to view its properties. The step should retrieve the environment variable value defined in the Windows system (previously set by the “setEnvironmentVariables” process step).

Create or modify environment variables on Windows 10:
- On the Windows taskbar, right-click the Windows icon and select System.
- In the Settings window, under Related Settings, click Advanced System Settings.

- On the Advanced tab, click Environment Variables to view the list of variables and their values.

Tips:
- Store configuration values that are shared across multiple workflows as environment variables.
- Use descriptive names for environment variables to simplify administration and maintenance.
- Retrieve environment variables once near the beginning of the workflow rather than repeatedly during execution.
- Verify that all required environment variables are configured before deploying workflows.
- Use workflow variables populated by this step throughout the remainder of the workflow instead of hardcoded values.
- Route the False path to logging or notification activities for easier troubleshooting.
- Combine this step with Set Environment Variables, REST Call, Send Email, Update Variable Values, or file-processing steps to build configurable and reusable workflows.
Notes:
- The Environment Variable Mappings property is required.
- Multiple environment variables can be retrieved during a single execution.
- Retrieved values are assigned to the configured workflow variables according to the defined mappings.
- The step reads environment variables only; it does not modify their stored values.
- Downstream workflow activities can immediately use the populated workflow variables.
- Both the True and False return paths should be implemented to provide complete workflow handling.
- Execution details and environment variable retrieval activities are recorded in the FlowWright workflow execution log.
Read Environment Variables vs. Set Environment Variables:
Both workflow steps work with FlowWright environment variables but perform complementary operations.
| Read Environment Variables | Set Environment Variables |
|---|---|
| Retrieves the values of configured environment variables. | Updates the values of configured environment variables. |
| Reads centralized configuration into workflow variables. | Writes workflow variable values back to environment variables. |
| Does not modify stored environment variables. | Persists updated values for future workflow executions. |
| Typically used at the beginning of a workflow. | Typically used after business logic or administrative updates have completed. |
| Ideal for loading configuration, connection information, and shared settings. | Ideal for saving updated configuration, runtime values, or administrative changes. |
As a general guideline:
- Use Read Environment Variables when workflows need to retrieve centralized configuration values before processing begins.
- Use Set Environment Variables when workflows need to update or persist shared configuration values that will be reused by subsequent workflows or application processes.
Definition Sample:
You may download the sample workflow definition from the link provided and import it into your FlowWright environment.
Note: Verify and complete any missing configuration after importing the sample, including:
- Environment variable mappings
- Workflow variable mappings
- Success and failure workflow branches
- Validation that the required environment variables exist
- Appropriate permissions to access environment configuration
After verifying the configuration, save and publish the workflow before execution.