← All N8N workflows
Automation & utilitiesCodeHTTP RequestIfN8NSchedule Trigger

Backup workflows to git repository on Gitea

Configured with HTTP Request, N8N, Schedule Trigger, Loop Over Items. Review the connections and setup before adapting this template.

Workflow preview
TransformGlobalsEdit FieldsIntegrationn8nN8NTriggerSchedule TriggerSchedule TriggerTransformSetDataUpdateNodeEdit FieldsTransformSetDataCreateNodeEdit FieldsCodeBase64EncodeUpdateCodeCodeBase64EncodeCreateCodeRoutingExistIfRoutingChangedIfWeb / APIPutGiteaHTTP RequestWeb / APIGetGiteaHTTP RequestWeb / APIPostGiteaHTTP RequestRoutingForEachLoop Over Items

Node categories in this workflow

  • Transform
  • Integration
  • Trigger
  • Code
  • Routing
  • Web / API

Icons describe general node roles, inferred from node types. Inspect the parameters for the configured action.

Drag to pan; use + and − to zoom. Reconstructed from the exported node positions; nothing runs here. Dashed lines represent non-main connections. Full node names and notes appear below.

How it works

The exported workflow contains the following configured nodes. Their connections are shown above; inspect the JSON for the complete logic, expressions, and external actions.

Workflow node names, types, and operations
NodeCategoryTypeOperation
GlobalsTransformEdit FieldsSee node parameters
n8nIntegrationN8NSee node parameters
Schedule TriggerTriggerSchedule TriggerSee node parameters
SetDataUpdateNodeTransformEdit FieldsSee node parameters
SetDataCreateNodeTransformEdit FieldsSee node parameters
Base64EncodeUpdateCodeCodeSee node parameters
Base64EncodeCreateCodeCodeSee node parameters
ExistRoutingIfSee node parameters
ChangedRoutingIfSee node parameters
PutGiteaWeb / APIHTTP RequestPUT
GetGiteaWeb / APIHTTP RequestSee node parameters
PostGiteaWeb / APIHTTP RequestPOST
ForEachRoutingLoop Over ItemsSee node parameters

Setup

  1. Download the JSON and import it into an isolated n8n instance. Leave the workflow inactive.
  2. Connect your own credentials through n8n’s credential store. Replace REPLACE_WITH_* values with your resource identifiers.
  3. Inspect API destinations, Code nodes, database queries, file paths, and outbound actions.
  4. Run with synthetic data and harmless destinations. Enable triggers only after checking the actual outputs.

Requirements

An n8n instance with the listed node types and compatible versions. Service-connected workflows may require accounts, credentials, or paid APIs.

Credential types declared in the source

  • httpHeaderAuth
  • n8nApi

Workflow notes

Sticky Note

Workflow changes committed to the repository

Sticky Note1

Check if there are any changes in the workflow

Sticky Note2

Create a new file for the workflow

Sticky Note3

Check if file exists in the repository

Sticky Note5

Get all workflows

Sticky Note6

Set variables

**📌 Setup Guide for Backup Workflows to Git Repository on Gitea**

📌 Setup Guide for Backup Workflows to Git Repository on Gitea

🔧 1. Configure Global Variables

Go to the Globals node and update the following:

  • 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 settings define where workflows will be backed up.


🔑 2. Set Up Gitea Authentication

1️⃣ In Gitea:

  • Generate a Personal Access Token under Settings → Applications → Generate Token
  • Ensure the token has repo read/write permissions

2️⃣ In the Credentials Manager:

  • Create a new Gitea Token credential
  • Set the Name as Authorization
  • Set the Value as:
Bearer REPLACE_WITH_CREDENTIAL

📌 Ensure there is a space after Bearer before the token!


🔗 3. Connect Gitea Credentials to Git Nodes

  • Open each of these three Git nodes:

  • GetGitea → Retrieves existing repository data

  • PutGitea → Updates workflows

  • PostGitea → Adds new workflows

  • Assign the Gitea Token credential to each node.

📌 These nodes handle pushing your workflows to Gitea.


🌐 4. Set Up API Credentials for Workflow Retrieval

  • Locate the API request node that fetches workflows.
  • Add your API authentication credentials (Token or Basic Auth).

📌 This ensures the workflow can fetch all available workflows from your system.


🛠️ 5. Test & Activate the Workflow

✅ Run the workflow manually → Check that workflows are being backed up correctly. ✅ Review the Gitea repository → Ensure the files are updated. ✅ Enable the scheduled trigger → Automates backups at defined intervals.

📌 The workflow automatically checks for changes before committing updates!


🚀 Done! Your Workflows Are Now Backed Up Securely!

💬 Have issues? Reach out on the forum for help!

Backup workflows to git repository on Gitea

Backup workflows to git repository on Gitea

Purpose and structure

This folder contains the Backup workflows to git repository on Gitea workflow. Its executable nodes use code, httpRequest, if, n8n, scheduleTrigger, set, splitInBatches. The table and connection map below are derived from the JSON, not an inferred guarantee of behavior.

Setup

Import inactive. Configure your own credentials and replace REPLACE_WITH_* values. Review external destinations and Code nodes before running.

Entry points

Schedule Trigger

Verification

Sanitized source candidate; not runtime-tested. This overview is generated from node metadata. Read the folder README for the connection map, credential types, and license.

Attribution

https://github.com/Zie619/n8n-workflows/blob/94007c1445d9258a7da116646b79473e7c7c3282/workflows/Code/1426_Code_Schedule_Export_Webhook.json MIT; preserve source notices.

More in Automation & utilities