Workflow names are now available in your workflow's context

We released a change that now lets you reference the workflow name within your workflow’s context, so you can include it in error emails as well as surfacing the name in any downstream systems you may need.

In order to expose the workflow name, you’ll first need to re-deploy individual workflow(s). To access the workflow name in the global error workflow, you can reference steps.trigger.event.original_context.workflow_name. And if you’d like to reference the workflow name in the original workflow run, you can use steps.trigger.context.workflow_name.

To update the global error workflow so your error emails include the name of the workflow, you can refer to this example: The updated portions of the global error workflow are noted below:

  • Line 12: const { id, workflow_id, workflow_name } = event.original_context
  • Line 34: this.subject = `[pipedream] Error in workflow ${workflow_name ?? workflow_id} at ${errorTime}