How can we manage n8n projects through a Git Repository

I am using n8n for building complex workflows that will run accross different environments
( Beta, Production ) and which may require more than 1 person’s contribution.
Is there a way the changes in the workflow with modifications made to the flow can be managed through a git repository and we can practice other devops aspects like ci/cd etc.

Hi @Anand_Prabhakar, welcome to the community!

This isn’t something n8n supports out of the box I am afraid. While environments are something our product team is considering, a git integration isn’t something I’ve come across so far.

For a backup workflow regularly sending data to GitHub you could check out this well-documented example built by @Jon: Backup workflows to Github from the public API | n8n workflow template

For a more granular approach (sending every update to a Git repo), you could consider using custom hooks: Configuration - n8n Documentation. This requires development work on your end though, as I am not aware of a pre-built hook file sending data to a git repo and handling possible conflicts.

1 Like