Skip to content
FlowHubFluxonLab
GitLab
GitLabfree

Backup Tag-Selected Workflows to Gitlab

by Hubschrauberadapted from n8n official workflow galleryUpdated Aug 2026
RequiresGitLabGitLab
Share Post Share
MaBackup Now - Manual TriggerBackup Now - Ma…N8n8nSeGlobalsCreate New File(s)Create New File…Edit Existing File(s)Edit Existing F…SeDerive Filename From Workflow NameDerive Filename…Fetch Existing File ContentFetch Existing …FiSkip Unchanged FilesSkip Unchanged …ScSchedule TriggerFetch List of Existing FilesFetch List of E…AgCombine Gitlab Existing Files as Single List ItemCombine Gitlab …IfFile Exists in Gitlab?File Exists in …1234567891011
1/5
STEPS · 11
Run manually by an operator

Fetches workflow definitions from within n8n, selecting only the ones that have one or more (configurable) assigned tags and then: Derives a suitable backup filename by reducing the workflow name to a string with alphanumeric characters and no-spaces Note: This isn't bulletproof, but works as long as workflow names aren't too crazy. Determines which workflows need to be backed up based on whether each one: has been modified. (Note: Even repositioning a node counts.) ...or... is new. (Note: Renaming counts as this.) Commits JSON copies of each workflow, as necessary, to a Gitlab repository with a generated, date-stamped commit message. Setup Credentials Create a Gitlab Credentials item and assign it to all Gitlab nodes. Create an n8n Credentials item and assign it to the n8n node Note: This was tested with http://localhost:5678/api/v1 but should work with any reachable n8n instance and API key.

Tags

n8nreference-onlygitlab
Connects
gitlabGitLab
CategoryGitLab
Triggermanual
Complexitycomplex
Nodes12
AddedAug 11, 2024

Related workflows

See all GitLab
Cgitlab
free

Save your workflows into a Gitlab repository

This template is inspired by Save your workflows into a GitHub repository by hikerspath and Back Up Your n8n Workflows To Github by jon-n8n. Basic Retrieve all workflows from an n8n instance and save it on a gitlab project. If the workflow exist, il will only save the changes. Flow What the workflow does : Sets custom parameters Gets workflows Iterates through each workflow one by one Get the file from Gitlab if exists Compare the files as objects (not as strings) Return a status on the workflow Create, Edit or ignore the file depending on the status Return a list of status for each workflow Configuration Select a credential in each Gitlab nodes. Edit the data in node "Globals" : repo.owner : slug of the user or team owning the repo repo.name : slug of the repository repo.branch : branch to commit on repo.path : from root of the repository. Should end with / Comments Error on gitlab nodes will not stop the run but will list the current workflow as error in the results Some fields are ignored to determined if there is changes : updatedAt : should be ignored if only ignores fields are changed globals : it's running information, no need to follow the changes

by Julien DEL RIO