n8n - 💡(How to fix) Fix "Go to Sub-workflow" shows "Workflow not found" when sub-workflow ID is set via expression {{ $workflow.id }} [1 comments, 2 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
n8n-io/n8n#29749Fetched 2026-05-06 06:35:24
View on GitHub
Comments
1
Participants
2
Timeline
6
Reactions
0
Timeline (top)
labeled ×3commented ×1mentioned ×1subscribed ×1

Error Message

When an Execute Sub-workflow node is configured by ID using the expression {{ $workflow.id }} (to dynamically reference the current workflow), right-clicking the node and selecting Go to Sub-workflow opens a new tab and shows a "Workflow not found" error screen. This is unexpected - the workflow ID is valid but the URL does not resolve it correctly (.../workflow/=%7B%7B%20$workflow.id%20%7D%7D) which leads to a redirect to .../entity-not-found/workflow and the error screen. It should not show a "Workflow not found" error.

RAW_BUFFERClick to expand / collapse

Bug Description

When an Execute Sub-workflow node is configured by ID using the expression {{ $workflow.id }} (to dynamically reference the current workflow), right-clicking the node and selecting Go to Sub-workflow opens a new tab and shows a "Workflow not found" error screen.

<img width="450" height="294" alt="Image" src="https://github.com/user-attachments/assets/05eaf685-db8a-409e-a053-ba181741f084" />

This is unexpected - the workflow ID is valid but the URL does not resolve it correctly (.../workflow/=%7B%7B%20$workflow.id%20%7D%7D) which leads to a redirect to .../entity-not-found/workflow and the error screen.

To Reproduce

  1. Open any workflow in the n8n editor.
  2. Add an Execute Sub-workflow node.
  3. Set the Workflow field to By ID.
  4. Enter the expression {{ $workflow.id }} as the workflow ID.
  5. Right-click the node → select Go to Sub-workflow.
  6. The editor navigates away and shows "Workflow not found".

Note: This does not happen when the workflow ID is hardcoded as a static value - only when set via the {{ $workflow.id }} expression.

Expected behavior

Go to Sub-workflow should resolve the expression {{ $workflow.id }} at the time of the navigation action and open the corresponding workflow. Since the resolved ID is the current workflow, it should either stay on the current workflow and show a notification that this is the same workflow or navigate to it correctly in a new tab.

It should not show a "Workflow not found" error.

Debug Info

Not applicable here.

Operating System

Linux

n8n Version

2.19.0

Node.js Version

24.x

Database

PostgreSQL

Execution mode

queue

Hosting

self hosted

extent analysis

TL;DR

The issue can be resolved by properly encoding the workflow ID expression {{ $workflow.id }} in the Execute Sub-workflow node.

Guidance

  • Verify that the workflow ID expression {{ $workflow.id }} is correctly resolved at runtime by checking the node's configuration and the workflow's context.
  • Check if there are any existing issues or limitations in n8n version 2.19.0 related to dynamic workflow ID resolution.
  • Consider using a hardcoded workflow ID as a temporary workaround to confirm if the issue is specific to the dynamic expression.
  • Investigate if there are any URL encoding issues that might be causing the .../workflow/=%7B%7B%20$workflow.id%20%7D%7D redirect.

Example

No code snippet is provided as the issue seems to be related to the n8n workflow configuration and expression resolution.

Notes

The issue might be specific to the n8n version 2.19.0 and the Linux operating system. Further investigation is needed to determine the root cause.

Recommendation

Apply workaround: Use a hardcoded workflow ID as a temporary solution until the dynamic expression resolution issue is resolved. This is because the hardcoded workflow ID works as expected, and using it can help confirm if the issue is specific to the dynamic expression.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

FAQ

Expected behavior

Go to Sub-workflow should resolve the expression {{ $workflow.id }} at the time of the navigation action and open the corresponding workflow. Since the resolved ID is the current workflow, it should either stay on the current workflow and show a notification that this is the same workflow or navigate to it correctly in a new tab.

It should not show a "Workflow not found" error.

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

n8n - 💡(How to fix) Fix "Go to Sub-workflow" shows "Workflow not found" when sub-workflow ID is set via expression {{ $workflow.id }} [1 comments, 2 participants]