⚙️ Save your workflows into a Gitlab repository

6,130 views · ⚙️ DevOps & CI/CD

💡 Pro Tip — If you need GitHub data beyond what the REST API gives you, ScraperNode has a repository scraper that extracts metadata at scale without token rate limits.

View All Scrapers

Description

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 :

  1. Sets custom parameters
  2. Gets workflows
  3. Iterates through each workflow one by one
    1. Get the file from Gitlab if exists
    2. Compare the files as objects (not as strings)
    3. Return a status on the workflow
  4. Create, Edit or ignore the file depending on the status
  5. Return a list of status for each workflow

Configuration

Select a credential in each Gitlab nodes.

Edit the data in node “Globals” :

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 :

🔗 Nodes Used

GitLab, n8n, Extract from File

📥 Import

Download workflow.json and import into n8n: Workflow menu → Import from File

📖 Importing guide · 🔑 Credential setup