Using Environment Variables in Variable Mapping - Using Environment Variables in Variable Mapping - Environment variables can be referenced in variable mappings to supply different values depending on the environment in which a process runs, such as staging or production. To use an environment variable at runtime, it must be mapped using an expression. This can be done wherever an expression is supported, including in tasks, scripts, and process variables. - Content Innovation Cloud - Hyland Agent Builder - Current/Hyland-Agent-Builder/wng9355546370906 - Current - Current

Hyland Agent Builder

Platform
Content Innovation Cloud
Product
Hyland Agent Builder
Release
Current
License
ft:lastPublication
2026-11-09T23:23:21.663012
ft:locale
en-US

Environment variables can be referenced in variable mappings to supply different values depending on the environment in which a process runs, such as staging or production. To use an environment variable at runtime, it must be mapped using an expression. This can be done wherever an expression is supported, including in tasks, scripts, and process variables.

You map an environment variable by referencing it in the Expression Editor. The general expression format is: ${vars.[EnvironmentVariableName]}. The variable name must exactly match the name of the environment variable you created.

Environment variables can be used in scripts, task properties, and other configurable fields that support expressions.

The following is an example of mapping an environment variable in a script task:

  1. Create a script task. The task will be used to perform a script automatically.
  2. Create a script that can be called using a task from your process which requires the variable.
  3. From the Script Properties on the right, select Edit Script Variables.
  4. Select Create Script Variable.
  5. Enter an easily recognizable name. It will be used later to edit the variable.
  6. Select the Input category from the Variable category drop-down menu.
  7. Select the string type from the Type drop-down menu.
  8. Click the Save button to save the variable.
  9. Use the cloud button to save the script.
  10. Open the process and the task to which the script was assigned.
  11. Click the pencil button next to the newly created variable name.
  12. Select the Expression tab.
  13. Enter ${vars.[EnvironmentVariableName]}.
    Note: The environment variable name will become available as auto-completion after the project is deployed.
  14. Save the variable.
The script task will use a different variable value, depending on the environment in which it is used.