n8n - 💡(How to fix) Fix GET /rest/workflows/:id returns 404 for specific IDs while list/export all shows them [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#29124Fetched 2026-04-25 06:21:40
View on GitHub
Comments
1
Participants
2
Timeline
4
Reactions
0
Author
Timeline (top)
commented ×1labeled ×1mentioned ×1subscribed ×1
RAW_BUFFERClick to expand / collapse

Summary\nSelf-hosted n8n: GET /rest/workflows/:id returns 404 ("Could not load the workflow - you can only access workflows owned by you") for specific workflow IDs, while the same workflows are visible in /rest/workflows and in n8n export:workflow --all.\n\n## Environment\n- Self-hosted Docker\n- n8n 2.10.3 (initial) -> upgraded to 2.17.7 (latest as of 2026-04-24)\n- Postgres 15 (pgvector image)\n- Basic auth enabled\n\n## Affected workflow IDs\n- hJfoNbvdOPwMLl1v (Create Meeting v2.5.4)\n- JkwQlKni4Lx8duw9 (Free slots Google Calendar)\n\nControl (works):\n- ORrDtJJaHDh5clTt (Gen-Critic Sales Loop v2.5.4)\n\n## Steps to reproduce\n1. Login via /rest/login (admin user, global owner).\n2. GET /rest/workflows/hJfoNbvdOPwMLl1v -> 404.\n3. GET /rest/workflows/JkwQlKni4Lx8duw9 -> 404.\n4. GET /rest/workflows/ORrDtJJaHDh5clTt -> 200.\n5. GET /rest/workflows (list) shows both broken IDs in the response.\n6. n8n export:workflow --all includes both broken IDs.\n7. n8n export:workflow --id=hJfoNbvdOPwMLl1v returns 'No workflows found with specified filters'.\n\n## Expected\nGET /rest/workflows/:id returns 200 for workflows owned by the user.\n\n## Actual\nGET /rest/workflows/:id returns 404 with message about ownership, only for specific IDs.\n\n## Notes\n- shared_workflow/project_relation rows look correct for all three IDs (same projectId, workflow:owner, project:personalOwner).\n- workflow_history row exists for activeVersionId for all three IDs.\n- workflow_publish_history has no missing workflow_history rows; duplicates exist only on the working workflow (ORr).\n- Upgrading from 2.10.3 -> 2.17.7 did not change behavior.\n

extent analysis

TL;DR

Check the workflow ownership and permissions to resolve the 404 error for specific workflow IDs.

Guidance

  • Verify the ownership of the affected workflows (hJfoNbvdOPwMLl1v and JkwQlKni4Lx8duw9) to ensure they match the authenticated user's ownership.
  • Compare the shared_workflow/project_relation rows for the affected and working workflows to identify any discrepancies.
  • Investigate the workflow_history and workflow_publish_history tables for any missing or duplicate rows that may be causing the issue.
  • Use the n8n export:workflow command with the --id flag to test if the workflow can be exported correctly.

Example

No code snippet is provided as the issue is related to workflow configuration and database rows.

Notes

The issue may be related to a specific configuration or data inconsistency in the Postgres database, and further investigation is needed to identify the root cause.

Recommendation

Apply a workaround by re-checking the workflow ownership and permissions, as the upgrade to version 2.17.7 did not resolve the issue.

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…

Still need to ship something?

×6

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

Back to top recommendations

TRENDING