Learn how to export workflows from n8n with simple steps, tips, and best practices to manage, migrate, and back up your automation efficiently.

Book a call with an Expert
Starting a new venture? Need to upgrade your web app? RapidDev builds application with your growth in mind.
The simplest and most reliable way to export a workflow from n8n is to open the workflow, click the menu in the top‑right corner, and choose “Export”. This downloads a single JSON file containing the full workflow definition that you can import into another n8n instance. That exported file includes the workflow’s logic, nodes, settings, and connections, but not the credentials.
When you “export” a workflow, n8n generates a JSON representation of everything inside that workflow. n8n internally stores workflows as JSON, so the export is basically the same object that the runtime engine uses. This makes the exported file both portable and accurate — you can reimport it into any other n8n environment that has the same nodes available.
The export never includes your credentials. Credentials in n8n are stored separately for security and tied to the user or instance. After importing the workflow somewhere else, the new environment will ask you to map or recreate the credentials.
This is what most teams use day‑to‑day.
Steps inside the workflow editor:
If you're running n8n on your own server, you can use the n8n export:workflow command. This is great for backups, Git versioning, or deployment pipelines.
n8n export:workflow --id=12 --output=./my-workflow.json
<p>Where <b>--id</b> is the workflow ID from your instance.</p>
If you have the REST API enabled (self‑hosted only), you can pull the workflow JSON programmatically.
curl -X GET "https://your-n8n-server.com/rest/workflows/12" \
-H "X-N8N-API-KEY: YOUR_API_KEY"
<p>This returns the workflow JSON, which you can save to a file.</p>
They must be recreated or mapped after import. This is by design for security.
When you import a workflow into a different instance, the hostname or path might change. Always open the Webhook node and make sure it’s correct before activating the workflow.
When you import a workflow, it arrives inactive. You must activate it manually.
If you export from a newer n8n version and import into an older one, some nodes might break. Best practice is to keep environments on similar versions.
Since the export is a plain JSON file, many teams version‑control them for traceability.
{
"nodes": [
{
"id": "Webhook1",
"name": "Webhook",
"type": "n8n-nodes-base.webhook",
"parameters": {
"path": "my-endpoint",
"httpMethod": "GET"
}
}
],
"connections": {},
"settings": {},
"name": "Example Workflow",
"active": false
}
This is a simplified example, but it’s exactly the type of JSON n8n exports and imports.
Exporting workflows in n8n is reliable and straightforward: use the UI for everyday work, use the CLI or REST API when you need automation or version control. The exported JSON fully describes your workflow’s logic, but credentials and environment-specific details (like webhook URLs) must be handled separately when moving between instances.
When it comes to serving you, we sweat the little things. That’s why our work makes a big impact.