3

When executing a workflow there is a unique Execution ID. Is it possible to access this value from within the workflow. For example, if I was to use the Execution ID as the filename in a step:

        url: https://storage.googleapis.com/upload/storage/v1/b/bucketname/o
        headers:
            Content-Type: application/json
        query:
            uploadType: media
            name: ${string(EXECUTION_ID) + ".json"}
    ```
Ed Kong
  • 59
  • 3

1 Answers1

2

As of now, it's not possible to get the Workflow execution id.

The only Environment variables that you can access are the following:

  • GOOGLE_CLOUD_PROJECT_NUMBER: The workflow project's number.
  • GOOGLE_CLOUD_PROJECT_ID: The workflow project's identifier.
  • GOOGLE_CLOUD_LOCATION: The workflow's location.
  • GOOGLE_CLOUD_WORKFLOW_ID: The workflow's identifier.
  • GOOGLE_CLOUD_WORKFLOW_REVISION_ID: The workflow's revision identifier.

You can access them within the workflow with sys.get_env(). For example:

- getProjectID:
  assign:
    - projectID: ${sys.get_env("GOOGLE_CLOUD_PROJECT_ID")}

See source

Jose V
  • 1,356
  • 1
  • 4
  • 12