⚙️ Backup tag-selected workflows to Gitlab

1,998 views · ⚙️ DevOps & CI/CD

Description

Fetches workflow definitions from within n8n, selecting only the ones that have one or more (configurable) assigned tags and then:

  1. 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.
  2. 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.)
  3. Commits JSON copies of each workflow, as necessary, to a Gitlab repository with a generated, date-stamped commit message.

Setup

Credentials

Modify these values in the “Globals” Node

Possible Enhancements

🔗 Nodes Used

GitLab, n8n, Schedule Trigger, Filter

📥 Import

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

📖 Importing guide · 🔑 Credential setup