Templates / Backup n8n workflows to Bitbucket

Backup n8n workflows to Bitbucket

Ready for 3.0

by Gareth B. Davies ✓ · 1,762 views · created 2025-01-24 · DevOps

Ready for 3.0. This template uses no nodes that n8n 3.0 removes. No removed nodes, versions or helpers found. Static check, last run 2026-10-19.

What this workflow does

This workflow has 9 nodes and runs on a schedule (every day at 02:00). It uses only n8n's built-in nodes.

How it runs

Trigger: On a schedule (every day at 02:00).

  1. Set Bitbucket Workspace & Repository (Edit Fields (Set)): sets 2 fields: WorkspaceSlug, RepositorySlug
  2. Get All Workflows (n8n): uses n8n
  3. Loop Workflows (Loop Over Items (Split in Batches)): loops over the items in batches
  4. Get Existing Worfklow from Bitbucket (HTTP Request): calls an HTTP API
  5. New or Changed? (If): checks a condition and branches into true / false
  6. Upload Workflow to Bitbucket (HTTP Request): calls an HTTP API (POST)
  7. Wait: pauses before continuing
  8. Calculate Wait Time (Code): runs custom JavaScript code

Before you upgrade to n8n 3.0

Nothing in this workflow is removed in n8n 3.0, so it should import and run after the upgrade.

Nodes used (8)

From the author

An automated backup solution designed for self-hosted n8n users to automatically backup their workflows to Bitbucket, leveraging Bitbucket's free private repository offering. Perfect for maintaining version control of your n8n workflows without additional…

Excerpt from Gareth B. Davies's description on n8n.io.

View the original on n8n.io → Check your own copy

Get the weekly “what broke” email

New templates, newly broken ones, and n8n release changes. One short email a week.

Form not loading? Subscribe here.