Skip to content

feat(workflows): export an installed n8n workflow as a portable JSON download - #5828

Open
tang-vu wants to merge 1 commit into
Osmantic:public-betafrom
tang-vu:feat/workflows-installed-export-20260919
Open

tang-vu wants to merge 1 commit into
Osmantic:public-betafrom
tang-vu:feat/workflows-installed-export-20260919

Conversation

@tang-vu

@tang-vu tang-vu commented Sep 19, 2026

Copy link
Copy Markdown
Contributor

Summary

  • New authenticated GET /api/workflows/n8n/{n8n_id}/export fetches the definition from n8n with excludePinnedData=true and allow_redirects=False.
  • Response keeps only portable keys (name, nodes, connections, settings) — staticData, pin data, active, and shared metadata never leave the server.
  • Returns a no-store attachment download; maps n8n 404→404, other non-200→502, timeout→504, malformed payloads→502.
  • Documents the contract in docs/WORKFLOW_EXPORT.md; covered by tests/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

Test plan

  • python -m pytest tests/test_workflow_export.py — 6 passed locally (boundary matrix + identity validation).
  • CI dashboard-api suite.

…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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant