{
  "name": "Backup tag-selected workflows to Gitlab",
  "nodes": [
    {
      "id": "3e2820cb-24a4-491b-8f8b-60f97b0748dc",
      "name": "Backup Now - Manual Trigger",
      "type": "n8n-nodes-base.manualTrigger",
      "position": [
        520,
        320
      ]
    },
    {
      "id": "bc5588e5-b67a-4713-b8e7-c21227048a2d",
      "name": "n8n",
      "type": "n8n-nodes-base.n8n",
      "position": [
        980,
        520
      ]
    },
    {
      "id": "2a5af64d-b5c3-4180-bae5-9efeeaeba99d",
      "name": "Globals",
      "type": "n8n-nodes-base.set",
      "position": [
        740,
        400
      ]
    },
    {
      "id": "b6b44b4b-e5a7-4ce6-9cff-e7a21679ad32",
      "name": "Create New File(s)",
      "type": "n8n-nodes-base.gitlab",
      "position": [
        2060,
        540
      ]
    },
    {
      "id": "167ae6cd-b8dd-4e01-aca4-4888fcaf9958",
      "name": "Edit Existing File(s)",
      "type": "n8n-nodes-base.gitlab",
      "position": [
        2060,
        340
      ]
    },
    {
      "id": "a4437388-9143-4c91-841e-c062ab9af3c0",
      "name": "Derive Filename From Workflow Name",
      "type": "n8n-nodes-base.set",
      "position": [
        1160,
        520
      ]
    },
    {
      "id": "cb0fca8f-dc43-4903-a8e1-5b7acf9157b1",
      "name": "Fetch Existing File Content",
      "type": "n8n-nodes-base.gitlab",
      "position": [
        1640,
        340
      ]
    },
    {
      "id": "816843c4-769c-4033-a38e-1c6ef5325e15",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        940,
        120
      ],
      "parameters": {
        "width": 401,
        "height": 246,
        "content": "## Gather Gitlab Info"
      }
    },
    {
      "id": "19f3fe4d-acba-4e7b-b92c-ce9024a8f37d",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        940,
        460
      ],
      "parameters": {
        "width": 398,
        "height": 240,
        "content": "## Gather n8n Info"
      }
    },
    {
      "id": "418bef31-adf6-419b-87f1-faa2581e5766",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1380,
        280
      ],
      "parameters": {
        "width": 598,
        "height": 384.41789416257484,
        "content": "## Decide Whether to Create or Edit or Skip"
      }
    },
    {
      "id": "f3b98ded-c767-4822-bcf4-25931be03f48",
      "name": "Skip Unchanged Files",
      "type": "n8n-nodes-base.filter",
      "position": [
        1820,
        340
      ]
    },
    {
      "id": "6bbf5146-7129-4ca8-8576-39d5cbe8e0b9",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        480,
        220
      ],
      "parameters": {
        "width": 402,
        "height": 452,
        "content": "## Start / Trigger & Configure"
      }
    },
    {
      "id": "0e5d9c9f-40b4-494d-8233-a2b4fea67d76",
      "name": "Schedule Trigger",
      "type": "n8n-nodes-base.scheduleTrigger",
      "position": [
        520,
        520
      ]
    },
    {
      "id": "be08176e-3961-43d7-b182-89a4f45805f6",
      "name": "Fetch List of Existing Files",
      "type": "n8n-nodes-base.gitlab",
      "position": [
        980,
        180
      ]
    },
    {
      "id": "674cdaa8-f8fe-4f6d-8743-062d3fd1ff95",
      "name": "Combine Gitlab Existing Files as Single List Item",
      "type": "n8n-nodes-base.aggregate",
      "position": [
        1180,
        180
      ]
    },
    {
      "id": "463ae3fb-4d66-497d-81eb-7e55b5945d84",
      "name": "File Exists in Gitlab?",
      "type": "n8n-nodes-base.if",
      "position": [
        1440,
        460
      ]
    }
  ],
  "connections": {
    "n8n": {
      "main": [
        [
          {
            "node": "Derive Filename From Workflow Name",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Globals": {
      "main": [
        [
          {
            "node": "Fetch List of Existing Files",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Schedule Trigger": {
      "main": [
        [
          {
            "node": "Globals",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Skip Unchanged Files": {
      "main": [
        [
          {
            "node": "Edit Existing File(s)",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "File Exists in Gitlab?": {
      "main": [
        [
          {
            "node": "Fetch Existing File Content",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Create New File(s)",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Backup Now - Manual Trigger": {
      "main": [
        [
          {
            "node": "Globals",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Fetch Existing File Content": {
      "main": [
        [
          {
            "node": "Skip Unchanged Files",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Fetch List of Existing Files": {
      "main": [
        [
          {
            "node": "Combine Gitlab Existing Files as Single List Item",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Derive Filename From Workflow Name": {
      "main": [
        [
          {
            "node": "File Exists in Gitlab?",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Combine Gitlab Existing Files as Single List Item": {
      "main": [
        [
          {
            "node": "n8n",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}