Stay organized with collections
Save and categorize content based on your preferences.
You can access a workflow's environment information using built-in environment
variables. Built-in environment variables require no declaration and are
available in every workflow execution.
You can use the following built-in environment variables:
GOOGLE_CLOUD_LOCATION: The location of the workflow.
GOOGLE_CLOUD_PROJECT_ID: The project identifier of the workflow.
GOOGLE_CLOUD_PROJECT_NUMBER: The project number of the workflow.
GOOGLE_CLOUD_SERVICE_ACCOUNT_NAME: The name of the workflow execution's service
account.
GOOGLE_CLOUD_WORKFLOW_EXECUTION_ID: The identifier of the workflow execution.
GOOGLE_CLOUD_WORKFLOW_ID: The identifier of the workflow.
GOOGLE_CLOUD_WORKFLOW_REVISION_ID: The identifier of the workflow revision.
Access built-in environment variables
To access an environment variable, make a call to the sys.get_env() function
in an expression, passing the name of the environment variable as a parameter.
The name of the environment variable must be passed as a string.
For example, the following step assigns the value of the environment variable
GOOGLE_CLOUD_PROJECT_ID to a workflow variable called projectID:
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-08-28 UTC."],[],[],null,["# Built-in environment variables\n\nYou can access a workflow's environment information using built-in environment\nvariables. Built-in environment variables require no declaration and are\navailable in every workflow execution.\n\n[User-defined environment variables](/workflows/docs/use-environment-variables)\nare also supported.\n\nList of built-in environment variables\n--------------------------------------\n\nYou can use the following built-in environment variables:\n\n- `GOOGLE_CLOUD_LOCATION`: The location of the workflow.\n- `GOOGLE_CLOUD_PROJECT_ID`: The project identifier of the workflow.\n- `GOOGLE_CLOUD_PROJECT_NUMBER`: The project number of the workflow.\n- `GOOGLE_CLOUD_SERVICE_ACCOUNT_NAME`: The name of the workflow execution's service account.\n- `GOOGLE_CLOUD_WORKFLOW_EXECUTION_ID`: The identifier of the workflow execution.\n- `GOOGLE_CLOUD_WORKFLOW_ID`: The identifier of the workflow.\n- `GOOGLE_CLOUD_WORKFLOW_REVISION_ID`: The identifier of the workflow revision.\n\nAccess built-in environment variables\n-------------------------------------\n\nTo access an environment variable, make a call to the `sys.get_env()` function\nin an expression, passing the name of the environment variable as a parameter.\nThe name of the environment variable must be passed as a string.\n\nFor example, the following step assigns the value of the environment variable\n`GOOGLE_CLOUD_PROJECT_ID` to a workflow variable called `projectID`: \n\n```yaml\n- getProjectID:\n assign:\n - projectID: ${sys.get_env(\"GOOGLE_CLOUD_PROJECT_ID\")}\n```"]]