Conversation
2 tasks
…download
There was no way to get a workflow back out of n8n through the dashboard:
the catalog listed installed workflows but offered no export path, so a
user could not back up, diff, or migrate a definition they built.
GET /api/workflows/n8n/{id}/export fetches the definition with
excludePinnedData, refuses redirects, and returns only the portable keys
(name, nodes, connections, settings) as a no-store attachment — runtime
state, pin data, and sharing metadata never leave the server.
tang-vu
force-pushed
the
feat/workflows-installed-export-20260919
branch
from
September 19, 2026 04:51
84d1069 to
780d823
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
GET /api/workflows/n8n/{n8n_id}/exportfetches the definition from n8n withexcludePinnedData=trueandallow_redirects=False.name,nodes,connections,settings) —staticData, pin data,active, andsharedmetadata never leave the server.no-storeattachmentdownload; maps n8n 404→404, other non-200→502, timeout→504, malformed payloads→502.docs/WORKFLOW_EXPORT.md; covered bytests/test_workflow_export.py(6 cases).Why this matters
The dashboard could list and enable installed workflows but offered no way to get a definition back out — users couldn't back up, diff, or migrate work they built in n8n. Export is read-only and deliberately strips runtime/pin state so an export can't leak per-install secrets embedded in pinned data.
Overlap check
workflows,export,n8n,workflows.py— fix(workflows): tolerate malformed catalog records and executions payloads #5672 (malformed catalog records), fix(workflows): report the workflow n8n created when activation fails #5644 (activation reporting), fix(workflows): match n8n workflows by exact name and stop duplicate imports #5554 (name matching), fix(dashboard-api): validate pagination bounds on workflow executions endpoint #5181 (executions pagination bounds), Add exception chaining (from e) to all raise statements in except blo… #5476 (exception chaining) all touch different functions in the same file.Test plan
python -m pytest tests/test_workflow_export.py— 6 passed locally (boundary matrix + identity validation).