How to get {{Workflow Run Id}}?

There is workflowContext

image

And one of the fields of a workflowContext is "Workflow Run Id" which appears in retool logs like this:

But this guid does not seem to be available to application code at runtime inside some {{foo}} variable. At least I have been unable to find it.

It's not inside "currentRun" and it is not "workflowId". That is a constant assigned for each distinct workflow.

1 Like

Hey Roland! This should be the same as workflowId :slight_smile: https://docs.retool.com/reference/workflows/global/workflowcontext

I don't understand what property you refer to.

Does not show a guid and workflowId is a constant for the workflow, not a specific run.

Ah, I see!

The Workflow ID refers to a specific workflow in your Retool application and stays constant (as you noted) and it can be found in your workflow settings or under workflowContext.workflowId.

Conversely, the Workflow Run ID is generated each time a workflow is executed, allowing you to track specific runs of a workflow. This can be viewed in the Run History section of a workflow in the Workflow IDE. Click on "Run history" in the bottom left and open up the "Logs" tag to find the Workflow Run Ids.

With that said, I don't believe there's currently a way to get {{Workflow Run Id}}, but I just created a feature request for it :+1: