Global variables
Global variables allow you to store and reuse input values and credentials across your projects. These variables can be used in any input field marked with the Globe icon.
Robility Flow stores all global variables in its internal database and secures them using encryption with a secret key.
Creating a Global Variable
To create a new global variable:
1. In the Robility Flow UI, click your profile icon and select Settings.
2. Go to the Global Variables
3. Click Add New.
4. In the Create Variable dialog:
5. Enter a Variable Name.
6. (Optional) Select the Type:
a. Generic: Value is visible in plain text.
b. Credential: Value is masked and hidden in the UI. Credential variables cannot be used in session ID fields.
7. Enter the Value.
8. (Optional) Use the Apply to Fields dropdown to auto-assign the variable to specific fields (e.g., OpenAI API Key).
9. Click Save Variable.
Once created, the variable will be available in any field that supports global variables.
Editing a Global Variable
1. Go to Settings > Global Variables.
2. Click the variable you want to edit.
3. In the Update Variable dialog, you can modify the Variable Name, Value, and Apply to Fields.
4. Click Update Variable to save your changes.
Deleting a Global Variable
1. Navigate to Settings > Global Variables.
2. Select the checkbox next to the variable you want to remove.
3. Click Delete.
The variable and any references to it will be removed.
Add a custom global variable from the environment
You can automatically populate global variables from your environment using the ROBILITY_FLOW_VARIABLES_TO_GET_FROM_ENVIRONMENT environment variable. All such variables are treated as Credential type.
Robility Flow already includes a set of default environment variables. You can extend this list with custom variables.
For Local Installations
1. Create a .env file in your project directory.
2. Add your environment variable configuration:
Option 1: Comma-separated list
ROBILITY_FLOW_VARIABLES_TO_GET_FROM_ENVIRONMENT=VARIABLE1,VARIABLE2
Option 2: JSON format
ROBILITY_FLOW_VARIABLES_TO_GET_FROM_ENVIRONMENT=[“VARIABLE1”, “VARIABLE2”]
Define the values:
VARIABLE1=”VALUE1″ VARIABLE2=”VALUE2″ python -m robility_flow run –env-file .env
Replace VARIABLE1,VARIABLE2 with your additional variables that you want Robility flow to source from the environment, such as my_key,some_string or [“my_key”, “some_string”]. These are added to the default list of variables that Robility flow already monitors.
3. Save and close the file.
4. Start Robility flow with the .env file:
VARIABLE1=”VALUE1″ VARIABLE2=”VALUE2″ python -m robilityflow run –env-file .env
In this example, the environment variables (VARIABLE1=”VALUE1″ and VARIABLE2=”VALUE2″) are prefixed to the startup command. This is a rudimentary method for exposing environment variables to Python on the command line and is meant for illustrative purposes. Make sure to expose your environment variables to Robility flow in a manner that best suits your own environment.
5. Confirm that Robility flow successfully sourced the global variables from the environment:
6. In the Robility flow header, click your profile icon, and then select Settings.
7. Click Global Variables and then make sure that your environment variables appear in the Global Variables
Info
When adding global variables from the environment, the following limitations apply:
1. You can only source the Name and Value from the environment.
To add additional parameters, such as the Apply To Fields parameter, you must edit the global variables in your Robility flow Settings.
2. Global variables that you add from the environment always have the Credential type.
If you want to explicitly prevent Robility flow from sourcing global variables from the environment, set ROBILITYFLOW_STORE_ENVIRONMENT_VARIABLES=False in your .env file.
If you want to automatically set fallback values for your global variables from environment variables, set ROBILITYFLOW_FALLBACK_FROM_ENV_VAR=True in your .env file. When this setting is enabled, if a global variable isn’t found, Robility flow attempts to use an environment variable with the same name as a backup.
Default Environment Variables Automatically Detected
Robility Flow automatically imports the following environment variables as Credential type global variables:
a. ANTHROPIC_API_KEY
b. ASTRA_DB_API_ENDPOINT
c. ASTRA_DB_APPLICATION_TOKEN
d. AWS_ACCESS_KEY_ID
e. AWS_SECRET_ACCESS_KEY
f. AZURE_OPENAI_API_DEPLOYMENT_NAME
g. AZURE_OPENAI_API_EMBEDDINGS_DEPLOYMENT_NAME
h. AZURE_OPENAI_API_INSTANCE_NAME
i. AZURE_OPENAI_API_KEY
j. AZURE_OPENAI_API_VERSION
k. COHERE_API_KEY
l. COMPOSIO_API_KEY
m. GOOGLE_API_KEY
n. GROQ_API_KEY
o. HUGGINGFACEHUB_API_TOKEN
p. NOVITA_API_KEY
q. OPENAI_API_KEY
r. PINECONE_API_KEY
s. SAMBANOVA_API_KEY
t. SEARCHAPI_API_KEY
u. SERPAPI_API_KEY
v. TAVILY_API_KEY
w. UPSTASH_VECTOR_REST_TOKEN
x. UPSTASH_VECTOR_REST_URL
y. VECTARA_API_KEY
z. VECTARA_CORPUS_ID and VECTARA_CUSTOMER_ID
For additional environment configuration options, refer to the Environment Variables documentation.