Backup Workflows to Git Repository on Gitea
Overview This workflow automates the backup of all workflows from your system to a Git repository hosted on Gitea. It runs on a scheduled trigger, fetching, encoding, and committing workflow data, ensuring seamless version control and disaster recovery.
π Quick Setup: Just update three global variables and configure authenticationβno manual exports needed!
How It Works (Quick Glance) 1οΈβ£ Scheduled Execution β Runs automatically at defined intervals. 2οΈβ£ Fetch Workflows β Uses the API to retrieve all workflows. 3οΈβ£ Process Workflows β Converts workflow data into a Git-friendly format. 4οΈβ£ Commit & Push to Git β Saves workflows in a Gitea repository.
Setup Steps (β‘ Takes ~5 min)
1οΈβ£ Set Global Variables Go to the Globals section in the workflow and update: repo.url* β https://your-gitea-instance.com (Replace with your actual Gitea URL) repo.name β workflows (Repository name where backups will be stored) repo.owner β octoleo *(Gitea account that owns the repository)
π These three variables define where the workflows are stored.
2οΈβ£ Configure Gitea Authentication Go to your Gitea account* β Generate a Personal Access Token* In the credential manager, create a new Gitea Token with: Name:** Authorization Value:** Bearer YOUR_PERSONAL_ACCESS_TOKEN
π Ensure there is a space after Bearer before the token!
3οΈβ£ Link Credentials to Git Nodes Attach the Gitea credentials to these three Git nodes: GetGitea** β Retrieves existing repository data PutGitea** β Updates workflows PostGitea** β Adds new workflows
4οΈβ£ Link Credentials for API Requests Add API authentication** in the node that fetches all workflows.
5οΈβ£ Test & Activate Run the workflow manually** to confirm backups work. Enable the schedule trigger for automation.
π The workflow automatically checks for changes before committing updates.
Why Use This Workflow? β Automated Backups β No manual exports needed. β Version Control β Easily track workflow changes. β Simple Setup β Just configure globals & credentials. β Secure β Uses token-based authentication.
Next Steps π¬ Have questions? Reach out on the forum! π
Related Templates
AI Weather Forecasts with MCP Integration
Real-time Weather Forecasts with MCP Tools This n8n workflow demonstrates how to integrate real-time weather intelligen...
Google Sheets UI for n8n Workflow
Google Sheets UI for Workflow Control This n8n template provides a practical and efficient way to manage your n8n workf...
Demo Workflow - How to use workflowStaticData()
This workflow demonstrates how to use the workflowStaticData() function to set any type of variable that will persist wi...
π Please log in to import templates to n8n and favorite templates
Workflow Visualization
Loading...
Preparing workflow renderer
Comments (0)
Login to post comments