/n8n-tutorials

How to export workflows from n8n?

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

Matt Graham, CEO of Rapid Developers

Book a call with an Expert

Starting a new venture? Need to upgrade your web app? RapidDev builds application with your growth in mind.

Book a free consultation

How to export workflows from n8n?

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.

 

How exporting works in n8n

 

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.

 

Ways to export your workflow

 

  • Export from the UI

    This is what most teams use day‑to‑day.

    Steps inside the workflow editor:

    • Open the workflow.
    • Click the three‑dot menu in the top-right corner.
    • Select Export.
    • Your browser downloads a .json file.
  • Export using the CLI (for self‑hosted)

    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>
    
  • Export using the REST API (advanced)

    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>
    

 

Important details for production environments

 

  • Credentials never export

    They must be recreated or mapped after import. This is by design for security.

  • Webhooks may need updating

    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.

  • Active workflows don’t automatically stay active

    When you import a workflow, it arrives inactive. You must activate it manually.

  • Node versions must match

    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.

  • Good practice: keep exported workflows in Git

    Since the export is a plain JSON file, many teams version‑control them for traceability.

 

What an exported workflow looks like

 

{
  "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.

 

Bottom line

 

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.

Want to explore opportunities to work with us?

Connect with our team to unlock the full potential of no-code solutions with a no-commitment consultation!

Book a Free Consultation

Client trust and success are our top priorities

When it comes to serving you, we sweat the little things. That’s why our work makes a big impact.

Rapid Dev was an exceptional project management organization and the best development collaborators I've had the pleasure of working with. They do complex work on extremely fast timelines and effectively manage the testing and pre-launch process to deliver the best possible product. I'm extremely impressed with their execution ability.

CPO, Praction - Arkady Sokolov

May 2, 2023

Working with Matt was comparable to having another co-founder on the team, but without the commitment or cost. He has a strategic mindset and willing to change the scope of the project in real time based on the needs of the client. A true strategic thought partner!

Co-Founder, Arc - Donald Muir

Dec 27, 2022

Rapid Dev are 10/10, excellent communicators - the best I've ever encountered in the tech dev space. They always go the extra mile, they genuinely care, they respond quickly, they're flexible, adaptable and their enthusiasm is amazing.

Co-CEO, Grantify - Mat Westergreen-Thorne

Oct 15, 2022

Rapid Dev is an excellent developer for no-code and low-code solutions.
We’ve had great success since launching the platform in November 2023. In a few months, we’ve gained over 1,000 new active users. We’ve also secured several dozen bookings on the platform and seen about 70% new user month-over-month growth since the launch.

Co-Founder, Church Real Estate Marketplace - Emmanuel Brown

May 1, 2024 

Matt’s dedication to executing our vision and his commitment to the project deadline were impressive. 
This was such a specific project, and Matt really delivered. We worked with a really fast turnaround, and he always delivered. The site was a perfect prop for us!

Production Manager, Media Production Company - Samantha Fekete

Sep 23, 2022