n8n export:workflow --id=123 --published --output=published.json

Category: n8n & Workflow Automation

n8n export:workflow --id=123 --published --output=published.json

Export the published version of a workflow

Writes the currently published version of workflow 123 to published.json instead of the draft. Exporting the published version captures exactly what production is running, including its version metadata. The --published and --version flags are mutually exclusive.
Looking for more? Search all 7,657 commands — works offline, in English or Spanish, and fixes typos.