Get the workflow name

when looking at Pipeline values and parameters - CircleCI I do not find any constant that would give me the name of the workflow that is actually running. Is there an option?

You can check in here they have workflow ID but not sure about the name of the workflow

I think it’d be good to share your intent of using such a value. If it’s unavailable you could always store it to be used across jobs. Something like (pseudocode):

init job: # run for each workflow, before other jobs
  workflowTable[$CIRCLE_WORKFLOW_ID] = <<parameter.workflowName>>

for each workflow:
  for each job:
    workflowName = workflow[$CIRCLE_WORKFLOW_ID]

Might be possible to get it from the API given the workflow ID?

one way of doing this is mentioned here (which also confirms that the name doesn’t seem to be available still)

Of course, depending on how many jobs you have, you could also define $WORKFLOW_NAME in the yaml config for each job in the workflow, though it’s a little clunky kludgy. If you were calling a job in multiple workflows, you could parameterize it and pass it in, but again, kind of messy vs. the above.