[GOT CREATED] Autosave for workflows

We’ve been having lots of debates around autosave and a central topic is that ‘auto-deploy’ is bad indeed. A direction we’re thinking in is saving a copy locally in your browser that you can restore easily. You’d still have to actually click the ‘save’ button to deploy the new workflow.

(Yes, I lost a couple of hours of work this week myself too :man_facepalming: )

The other direction we’ve been thinking about is indeed a deploy scheme, where you can save a version but need to still deploy it later to be used in production.

5 Likes

10000% yes to this, even if autosave doesn’t come this should on its own

For the love all things holy. Please add autosave. Second time in two days I’ve lost hours of work.

“Oh snap! I suck at memory management and I’ve flushed half your day down the toilet. Now go cry in the corner.”

1 Like

I love the idea of local backups. When you’re using n8n and have a workflow open, it could cycle every 5 minutes, saving the current JSON of the unsaved workflow to a local folder with a timestamp. I’m not sure if this is feasible with a Chrome extension, just started exploring the possibility of building one today…

1 Like

Please implement auto-save, hours of work lost because of not having it.

Hi Shimon

While n8n doesn’t have a built-in autosave yet, I’ve built a Chrome extension that enables autosaving with a configurable interval. :rocket:

:link: Download it here

It helps prevent data loss by automatically saving workflows at your preferred time interval. Hope this helps! Let me know if you have any questions or feedback. :blush:

3 Likes

great idea

This is a life saver, much appreciated! :heart_eyes:

1 Like

It can be frustrating to realize you need to explicitly click Save in n8n, especially when most modern tools (such as Google Docs, Sheets, and Airtable) automatically save changes as you work. Autosave has become a standard expectation for many users.

A few thoughts on how autosave could be improved in n8n:

  • User Preferences: I understand that some users may prefer manual saving for better control and versioning. One potential solution could be to enable autosave by default, but offer a dropdown on the Save button to toggle between autosave and manual save modes. That way, users can choose their preferred workflow.
  • Save vs. Version Control: I personally think of “Save” more like a git commit — something I do when I’ve reached a meaningful state that I might want to revert to later. Ideally, autosave would prevent me from losing any work in progress, while the manual Save action could be extended to commit a version of the workflow (and optionally push it to Git). That would offer both real-time safety and intentional versioning.

Would love to see this evolve — autosave + Git integration would really bring the best of both worlds.

1 Like

I don’t understand how this is a “feature request”. Data loss is a bug. It’s great that n8n alerts you if you manually click away from the page, but there are lots of scenarios where navigating away from the page isn’t a manual action. For instance:

  • Browser decides n8n is using too much memory and arbitrarily decides to reload the page
  • Browser crashes
  • Step away for the night and your computer has applied an OS update and rebooted
  • You lose your connection for one reason or another and when you reconnect, your browser reloads the page

Some of these are browser-specific, some not. Data loss is not a good outcome no matter how you slice it.

What can we do to expedite a fix? Can we get a bug bounty going? I’d chip in several hundred dollars at a minimum if it means I don’t have to constantly re-do several hours of work from memory.

Hey @cweagans

That is an interesting take on it, there is more to this though than just saving the workflow but if we look at your examples…

Let’s say the auto save is every 5 minutes, 3 of your examples would still result in some of your work being lost but let’s look at the other side of that, you have had a workflow that has been running for weeks with no issue, you load it up to change something and as a test you disconnect a bunch of nodes to add a couple of new ones, at that point auto save kicks in and saves your workflow.

As this workflow was active it has just been saved and now for the next 5 minutes or until you notice the production runs are going to fail, the point here is adding auto save is tricky and it requires some thought on how to add it properly and it may mean having to change some core parts of how n8n works like instead of enabling a workflow we publish a version of the workflow so the editor and the running worklfow could be different versions, and this is partially why this is a feature / enhancement request and not a bug.

Right now though assuming you have saved your workflow once and you are storing execution history each time you run your workflow a copy of it is actually being saved in the execution log so if you do find something funky happens it may be possible that you can just swap to the execution view, select all the nodes then do a copy / paste and you are good to go again.

We are currently hiring for a number of roles though so if you fancied a career change and wanted to help plan / design / implement features like this we may have a role for you.

There are solutions other than something that does the equivalent of clicking Save on a timer.

For instance, changes to workflows could be persisted in localStorage. The client already has all of the state to represent the new version of the workflow - it’s not particularly difficult to just shove all of that state into localStorage (or whatever the local storage mechanism du jour is), load it back up when the page loads, and clear it when the user clicks save. I think the only extra thing you’d need in that case is a revert button (which just clears the local copy of the workflow and restores the canvas to whatever has actually been saved).

Another option would be to make it so that workflows that are not enabled auto-save on a timer + add some way to replace a workflow with another. Then, the way you work on your workflows would be:

  1. clone the workflow
  2. make your changes (which autosave because the cloned workflow shouldn’t be enabled)
  3. when you’re happy and things are tested, you replace version 1 of the workflow with version 2 of the workflow through some new mechanism.

Yet another option would be a simple config flag that lets users opt-in to autosaving every n seconds on their own n8n installations. Personally, I’d much rather risk a workflow being in a weird state while I’m actively working on it than lose a bunch of time.

I realize that these are all technically “features”, however you can also look at them as a little extra plumbing to support the resolution of a long standing, highly impactful data loss bug.

Right now though assuming you have saved your workflow once and you are storing execution history each time you run your workflow a copy of it is actually being saved in the execution log so if you do find something funky happens it may be possible that you can just swap to the execution view, select all the nodes then do a copy / paste and you are good to go again.

This is an ok workaround, I guess. I wouldn’t have ever thought to look there - I’m surprised that this is not more widely communicated, especially with the recent boom in n8n usage.

Hey, everybody! I have created a browser extension that has among other things an auto-save function.

:backhand_index_pointing_right: Install for Chrome

A simple TemperMonkey script which sends ctrl/cmd + s every 60 seconds, just in case anyone else is using TM:

Code (don't forget to set the 'match')
// ==UserScript==
// @name         Auto CMD+S on n8n workflow page
// @namespace    http://tampermonkey.net/
// @version      1.0
// @description  Send CMD+S every minute on the n8n workflow page
// @author       jabbson
// @match        https://your.domain.net/workflow*
// @grant        none
// ==/UserScript==

(function () {
  'use strict';

  function sendSaveShortcut() {
    const isMac = navigator.platform.toUpperCase().indexOf('MAC') >= 0;

    const keyboardEvent = new KeyboardEvent('keydown', {
      key: 's',
      code: 'KeyS',
      keyCode: 83,
      charCode: 0,
      which: 83,
      bubbles: true,
      cancelable: true,
      composed: true,
      ctrlKey: !isMac,
      metaKey: isMac, // CMD on Mac
    });

    document.dispatchEvent(keyboardEvent);
    console.log('Triggered save (CMD/CTRL + S)');
  }

  setInterval(sendSaveShortcut, 60 * 1000); // every 60 seconds
})();
1 Like

There is a very easy and ubiquitous solution for the above “technical limitation”:

Save - saves the current state with any new edits (automatic every time a change is made, on a timer etc)

Publish - Pushes a particular version of your changes into production, so anyone can make edits at any time but only when they want to publish a new version of a workflow do those changes get pushed out. Just like with Meta Ads, Tag Manager etc etc

I created a userscript that saves your workflows and a couple of related UX fixes.
More details on GitHub.
https://github.com/cybertigro/n8n-autosave-userscript

What if it has 2 stage method like Power automate?

Draft stage for all auto saves and only by manual publish putting into production mode.

And to prevent clash with collaborative edits, lock the flow for all others when one person is editing.

Power automate achieve this like that,

Also it does not save any error flows. Those are saved locally until you fix the error and save it again.

It’s finally here! Official n8n autosave. Check out the announcement:

This autosave has been bit of headache for us. Sometimes we just want to play around with the workflow but don’t want to save it. Previously before auto save we could safely do that but now in v2 we could be accidentally overwriting previous unpublished version.

Auto save is cool feature but it would be nice to have an option to discard the draft.

2 Likes