Keep every automation safe by copying all n8n workflows to GitHub on a schedule. Each workflow is saved as a JSON file named with its ID, so your team can track changes, recover fast, and keep history clean. Great for IT, operations, and makers who want simple version control without manual exports.
A daily schedule kicks off the run, or you can start it by hand. The n8n node lists all workflows, then a loop processes them in batches using a subworkflow to save memory. For each item, the GitHub node checks if a file exists. If the file is large, a direct download grabs the raw content. A code step sorts JSON keys and compares the current workflow with the stored file to decide if it is the same, different, or new. A switch then skips identical files or commits only new and changed ones. Files live under your chosen repo path, and commit messages include the workflow name and status.
Set your repo owner, name, and folder in the Globals node. Connect GitHub and your n8n API in credentials. Expect fewer manual backups, faster audits, and clear change history. Useful for disaster recovery, change reviews, and handoffs across teams. Turn on the schedule to run at the time you choose and watch new commits appear as your automations evolve.