Add $execution.url and $workflow.url properties

The idea is:

The idea is to output the url of the execution/workflow with additional properties like

$execution.url -> https://n8n-instance.local/workflow/wf12345/executions/ex12345 
$workflow.url -> https://n8n-instance.local/workflow/wf12345

My use case:

We have configured a lot of traces to the n8n executions in our automation (e.g. the error handling with the link to the broken execution, or playbooks with links to the workflows). The issue is that we have a DEV instance of n8n and PRD instance. They have different fqdn’s and every time when we need to move the workflow from dev to prod, it’s very time-consuming to replace all the urls (usually our playbooks consists of 3-5 workflows).

I think it would be beneficial to add this because:

it will be way easier to use some metadata variable to output the full link instead of building it every-time with the https://my-dev-instance.n8n.local/workflow/{{ $workflow.id }}/executions/{{$execution.id}}

And I suppose it should not be that hard to implement :grinning:

+1

We can use $vars or environment variables with $env but it would be nice to have an out-of-the-box solution

2025 update: It’s all in the env variables. Set N8N_EDITOR_BASE_URL in your env variables and give it a value of “https://my-domain.com”. This is per Deployment environment variables | n8n Docs

Then, in your workflow, you can now access this via the handy $env variable. Something like

Execution URL: {{ ${$env.N8N_EDITOR_BASE_URL}/workflow/${$json.workflow.id}/executions/${$json.execution.id} }}

Note that you won’t be able to see this value when typing in. You’ll see something like “[not accessible via UI, please run node]”. This variable only resolves at runtime for safety reasons. But it will run correctly and you’ll get the proper execution url.

better to not mess with the N8N_EDITOR_BASE_URL, but rather to use another ENV variable (you can use any variable there and refer it back later with the $env.MYENV)