Workflow to save the workflows to git?


I have a bunch of time lost modifications because bad manipulations or something, or having workflows with multiple persons changing and making a mess.

Is there a way to see the history of changes on n8n? assuming no, I would like to:

  • save all workflows as separate files
  • put them into git
  • everytime the workflow is saved, it’s a new commit

so basically creating a n8n workflow saving to git that is triggered by a n8n event. so meta.

does it exist already? I see there is a N8N trigger, but the only event that is available is when the instance starts?

1 Like

Hi @xavier

Hope you’re doing great.

Can you try this workflow? This might help.

You can change the cron trigger to your time of choice.


Good old 817, that is the same one I use and it works really well :+1:


Yes bro. Looks like so many using it. :tada:


Hi !

I tried this workflow, but I get an error right in the first Http request node :

n8n is on a DigitalOcean server.

Is there a problem with the URL ?

Thanks a lot :slight_smile:

Hey @PrintEurope,

It looks like you don’t have anything listening on localhost 8443 so I suspect you access n8n with port 8443 but locally it will still be on 5678.

Personally I would swap to the n8n node instead which is what this workflow template uses…

@Jon - Would this work with Gitea as well ? I couldnt find a node for Gitea in n8n - so if we have a selfhosted gitea, what would the best approach to do the same as what this workflow does ?

Hey @atomtr

You would need to use the gitea API and the http request node or maybe use the execute command node and handle everything from the cli.

If you have not already noticed it Git intergration is natively supported in the Enteprise edition and you can push and pull to Git repos over SSH from the normal n8n ui without needing a workflow to manage it.