Back up your n8n workflows to Bitbucket every night. The system checks each workflow and commits only files that are new or changed. Teams gain a clear history and an easy way to roll back.
A 2 AM schedule starts the run. The n8n API pulls the full list of workflows, then a batch loop handles them one by one. For each item, a Bitbucket check looks for an existing file. A condition decides if the file has changed. If yes, a commit is created with a clean file name and a time stamp in the message. After each commit, a small code step reads headers to set a safe wait time, and a wait step pauses to avoid rate limits before the next item runs.
Setup is simple. Add credentials for your n8n instance and for Bitbucket, and set your workspace and repository once in the Set node. Expect near zero manual effort, fewer mistakes, and a solid audit trail. This is ideal for teams that run many n8n jobs and want dependable version control and nightly backups.