Get Started
Screenshot of n8n workflow
FREE TEMPLATE
Automate Gitea n8n Workflow Backups
1
Views
0
Downloads
20
Nodes
Download Template
Free
Preview Template
Utility Rating
7 / 10
Business Function
IT
Automation Orchestrator
n8n
Integrations
n8n API
Gitea
Trigger Type
Schedule
Approx setup time ≈ 35 min
Need help setting up this template?
Ask in our free Futurise community
About
Community
Courses
Events
Members
Templates

How to Automate Gitea n8n Workflow Backups?

Leon Petrou
FREE TEMPLATE
Automate Gitea n8n Workflow Backups
1
Views
0
Downloads
20
Nodes
Download Template
Free
Preview Template
Utility Rating
7 / 10
Business Function
IT
Automation Orchestrator
n8n
Integrations
n8n API
Gitea
Trigger Type
Schedule
Approximate setup time ≈ 35 minutes
Need help setting up this template?
Ask in our free Futurise community

Description

Keep every n8n workflow safely stored in a Git repo so your team has history, audit, and quick recovery. Ideal for teams that build many flows and want simple version control without manual exports.

A schedule runs every 45 minutes. The n8n node pulls all workflows. SplitInBatches handles them one by one. The system checks Gitea to see if a file already exists. If it does not exist, it creates it. If it exists, it encodes the new content and compares using a change check. Updates use the file SHA so only changed workflows are committed. Globals hold the repo URL, owner, and name, and HTTP Request nodes handle GET, POST, and PUT calls to Gitea with a token.

Setup needs a Gitea personal access token and an n8n API credential. Enter the repo details in the Globals node, then connect the credentials to the three Gitea request nodes. Run a test and confirm files appear and update as you change flows. Expect less manual work, clear history, and faster recovery after mistakes. Great for IT teams, platform owners, and any group that must track automation changes.

Copy link

Tools Required

n8n API
Sign up
Community Edition (self-hosted): $0 (public REST API available). Cloud Starter: $20 / mo billed annually ($24 monthly); API unavailable during free trial.
n8n
Sign up
$24 / mo or $20 / mo billed annually to use n8n in the cloud. However, the local or self-hosted n8n Community Edition is free.
Gitea
Sign up
Self-hosted open-source: $0 (API available via personal access token)

What this workflow does?

  • Schedule Trigger runs the backup every 45 minutes or at your chosen interval.
  • n8n node fetches all workflows from your n8n account.
  • SplitInBatches processes workflows one by one to stay stable.
  • HTTP Request nodes call Gitea to check, create, and update files.
  • If nodes decide when a file exists and when content has changed.
  • Code nodes encode workflow JSON to Base64 for the Gitea API.
  • Globals store repo URL, owner, and name for easy reuse.
  • Uses file SHA on updates so only changed workflows are committed.

What are the benefits?

  • Reduce manual backup work from 60 minutes to 5 minutes per day
  • Automate 100 percent of workflow versioning with scheduled commits
  • Update only changed files to cut API calls and noise
  • Improve backup accuracy to near 100 percent with SHA checks
  • Handle hundreds of workflows reliably with batch processing
  • Connect n8n and Gitea so your automations have a single source of truth

How to set this up?

  1. Import the template into n8n: Create a new workflow in n8n > Click the three dots menu > Select 'Import from File' > Choose the downloaded JSON file.
  2. You'll need accounts with Gitea and n8n. See the Tools Required section above for links to create accounts with these services.
  3. Open the Globals node and set repo.url, repo.owner, and repo.name to match your Gitea server and repository.
  4. In Gitea, create a Personal Access Token with repo read and write permissions. Copy the token.
  5. In the n8n credentials manager, create a new HTTP Header credential. Set the header name to Authorization and the value to Bearer YOUR_TOKEN, then save.
  6. Open the GetGitea, PostGitea, and PutGitea nodes. In Credential to connect with, choose your Gitea token credential.
  7. Open the n8n node. In Credential to connect with, click Create new credential and follow the on screen steps to connect to your n8n instance.
  8. Check the Schedule Trigger and adjust the interval if needed. Save the workflow.
  9. Run the workflow once. In your Gitea repo, confirm that workflow files were created. Make a small change to a workflow and run again to confirm an update commit appears.
  10. If you get 401 errors, verify the Gitea token and Authorization header format. If you see 404 errors, confirm repo URL, owner, and name in Globals. If updates fail, check that the file path and SHA values are present in the responses.
  11. Enable the workflow so backups run on the set schedule.

Need help or want to customize this?

Similar Templates

See More Templates

These templates were sourced from publicly available materials across the web, including n8n’s official website, YouTube and public GitHub repositories. We have consolidated and categorized them for easy search and filtering, and supplemented them with links to integrations, step-by-step setup instructions, and personalized support in the Futurise community. Content in this library is provided for education, evaluation and internal use. Users are responsible for checking and complying with the license terms with the author of the templates before commercial use or redistribution.Where an original author was identified, attribution has been provided. Some templates did not include author information. If you know who created this template, please let us know so we can add the appropriate credit and reference link. If you are the author and would like this template removed from the library, email us at info@futurise.com and we will remove it promptly.