Built-in environment variables

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.

User-defined environment variables are also supported.

List of built-in environment variables

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 :

 - 
  
 getProjectID 
 : 
  
 assign 
 : 
  
 - 
  
 projectID 
 : 
  
 ${sys.get_env("GOOGLE_CLOUD_PROJECT_ID")} 
Design a Mobile Site
View Site in Mobile | Classic
Share by: