Ed Kong
Ed Kong

Reputation: 79

How to get execution ID in workflow

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"}
    ```

Upvotes: 5

Views: 1698

Answers (1)

Jose V
Jose V

Reputation: 1496

It is now available as environment variable GOOGLE_CLOUD_WORKFLOW_EXECUTION_ID which can be accessed like this in your yaml configuration file:

${sys.get_env("GOOGLE_CLOUD_WORKFLOW_EXECUTION_ID")}

Upvotes: 3

Related Questions