/n8n-tutorials

How to restore deleted workflows in n8n?

Learn how to easily restore deleted workflows in n8n with step‑by‑step methods to recover lost automations quickly and safely.

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 restore deleted workflows in n8n?

The short, direct answer is: n8n cannot restore a deleted workflow from inside the UI. Once you delete a workflow, it is gone unless you have an external backup — for example: database snapshots, filesystem backups (for file-based DB), or Git versioning if you exported workflows manually. Restoring means you must restore the underlying database or re-import an exported workflow JSON file.

 

What this means in practice

 

In n8n, all workflows are stored in its internal database. Depending on how your instance was installed, this database is usually:

  • SQLite (local file, typically .n8n/database.sqlite)
  • PostgreSQL (common in production installs)
  • MySQL (less common but supported)

When you press “Delete” on a workflow in the UI, n8n removes that workflow record from its database. There is no recycle bin, no undo button, and no built‑in version history. So the only real way to restore it is to restore the DB state from before deletion.

 

How to restore if you have backups

 

If you already have some form of backup, you can recover the deleted workflow. Here are the valid real‑world options:

  • Database snapshot — Restore the whole DB (or only the workflow\_entity table) from a snapshot taken before deletion.
  • SQLite file backup — Replace your current database.sqlite file with a backup version.
  • Manual JSON export — If the workflow was previously exported using the “Download” button, simply re‑import the JSON.
  • Git or filesystem backups — Some teams manually commit workflow exports to Git. If so, pull the last version and re‑import.

 

Example: Restoring a workflow from a PostgreSQL backup

 

If your n8n uses PostgreSQL, you might have a nightly dump. You can extract just the workflow you need instead of restoring the whole DB. This is a real, working command example:

// list contents of your backup file
pg_restore -l backup.dump

// extract only the workflow_entity table into a SQL file
pg_restore -t workflow_entity -f workflow.sql backup.dump

// apply the restored table (careful: this overwrites!)
psql -d n8n -f workflow.sql

After this, restart n8n and your deleted workflow should reappear.

 

If you have no backups

 

Then the workflow is truly gone. n8n does not store versions, does not keep deleted items, and cannot recover anything without a database copy. This is a limitation of current n8n architecture.

The only exception: if you deleted it in a browser tab but hadn’t refreshed, sometimes the old JSON is still in your browser’s devtools “Network” logs. That’s a rare lucky case, but it’s not a reliable method.

 

Production recommendation to avoid this in the future

 

  • Enable regular DB backups — at least daily snapshots.
  • Export important workflows to JSON before major edits.
  • Consider keeping workflows in Git by exporting them and committing changes.
  • Avoid giving delete permissions to all users in multi‑user setups.

In real production setups, backup automation is non‑negotiable. Without backups, n8n cannot recover deleted workflows.

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