JUHE API Marketplace

Backup n8n Workflows to Bitbucket

Active

Backup n8n workflows to Bitbucket automatically every day at 2 AM, ensuring your workflows are securely stored and up-to-date. This workflow efficiently handles multiple workflows, checks for changes, and avoids rate limits, providing peace of mind and reliability in your automation processes.

Workflow Overview

Backup n8n workflows to Bitbucket automatically every day at 2 AM, ensuring your workflows are securely stored and up-to-date. This workflow efficiently handles multiple workflows, checks for changes, and avoids rate limits, providing peace of mind and reliability in your automation processes.

This workflow is ideal for:

  • Developers and DevOps Engineers: Those who need to automate the backup of their n8n workflows to Bitbucket.
  • Project Managers: Individuals managing multiple workflows who want to ensure version control and backup.
  • System Administrators: Professionals responsible for maintaining workflow integrity and preventing data loss.
  • Teams using n8n for Automation: Groups that rely on n8n for various automated processes and want to secure their configurations.

This workflow addresses the challenge of ensuring consistent backups of n8n workflows to Bitbucket, thereby mitigating the risk of data loss. It automates the process of checking for existing workflows, uploading new or modified workflows, and managing API rate limits effectively. By scheduling this task to run daily at 2 AM, it guarantees that the workflows are regularly updated in the repository without manual intervention.

  1. Schedule Trigger: The workflow is initiated daily at 2 AM using a schedule trigger.
  2. Set Bitbucket Workspace & Repository: It defines the Bitbucket workspace and repository where workflows will be backed up.
  3. Get All Workflows: The workflow retrieves all existing workflows from n8n.
  4. Loop Workflows: Each workflow is processed in batches to handle multiple workflows efficiently.
  5. Get Existing Workflow from Bitbucket: For each workflow, it checks if a backup already exists in Bitbucket.
  6. New or Changed?: It determines if the workflow is new or has been modified by comparing the current version with the one in Bitbucket.
  7. Upload Workflow to Bitbucket: If the workflow is new or changed, it uploads the workflow to Bitbucket, including a commit message with a timestamp.
  8. Calculate Wait Time: To avoid hitting API rate limits, it calculates a wait time based on the rate limit headers received from Bitbucket.
  9. Wait to Avoid Rate Limiting: The workflow pauses for the calculated wait time before processing the next workflow.

Statistics

9
Nodes
0
Downloads
38
Views
6611
File Size

Quick Info

Categories
Schedule Triggered
Complex Workflow
Complexity
complex

Tags

api
integration
logic
conditional
complex
schedule
schedule trigger
automation
+4 more

Boost your workflows with Wisdom Gate LLM API

Supporting GPT-5, Claude-4, DeepSeek v3, Gemini and more. Free trial.