{
  "name": "Automated daily backup of n8n workflows to GitLab repositories",
  "nodes": [
    {
      "id": "91bb5db7-0bd4-4a17-859a-672515048d9e",
      "name": "Globals",
      "type": "n8n-nodes-base.set",
      "position": [
        -2060,
        205.5
      ]
    },
    {
      "id": "b8ed50c3-3b78-428a-997b-9efc109df984",
      "name": "Result",
      "type": "n8n-nodes-base.noOp",
      "position": [
        -1400,
        5.5
      ]
    },
    {
      "id": "04b6d718-d3bd-481c-8b7b-5b1188df2edf",
      "name": "Current workflow",
      "type": "n8n-nodes-base.noOp",
      "position": [
        -1400,
        205.5
      ]
    },
    {
      "id": "5db89b68-76d1-461d-a49b-955373359830",
      "name": "Loop Over Workflows",
      "type": "n8n-nodes-base.splitInBatches",
      "position": [
        -1620,
        205.5
      ]
    },
    {
      "id": "8944cbfa-e659-4683-a11f-c3510d0b34dc",
      "name": "Get file",
      "type": "n8n-nodes-base.gitlab",
      "position": [
        -1180,
        205.5
      ]
    },
    {
      "id": "10f24280-16ce-406c-b5fe-2d715ed66b0c",
      "name": "File status",
      "type": "n8n-nodes-base.code",
      "position": [
        -520,
        205.5
      ]
    },
    {
      "id": "548ae4ec-3d45-4880-a9a0-2abe48831e88",
      "name": "Status error",
      "type": "n8n-nodes-base.set",
      "position": [
        140,
        80.5
      ]
    },
    {
      "id": "06b4fe3e-ca4b-4ad5-a2dc-ca68ac74e7e5",
      "name": "End Loop",
      "type": "n8n-nodes-base.noOp",
      "position": [
        360,
        370
      ]
    },
    {
      "id": "1b5df0b1-9f85-422c-9ad7-4020086d49a1",
      "name": "Create file",
      "type": "n8n-nodes-base.gitlab",
      "position": [
        -80,
        -119.5
      ]
    },
    {
      "id": "06c2150b-491c-4b44-9b43-88b1e1df5793",
      "name": "Extract From File",
      "type": "n8n-nodes-base.extractFromFile",
      "position": [
        -960,
        105.5
      ]
    },
    {
      "id": "6a9b5a29-6874-433c-849a-97e37bfba40d",
      "name": "Switch",
      "type": "n8n-nodes-base.switch",
      "position": [
        -300,
        184.5
      ]
    },
    {
      "id": "84a7f4b9-b76e-41ee-8413-26fb095627a8",
      "name": "New file version",
      "type": "n8n-nodes-base.gitlab",
      "position": [
        -80,
        280.5
      ]
    },
    {
      "id": "ec89cb60-e144-4b77-bea8-e32122a32ea1",
      "name": "Error output to normal output",
      "type": "n8n-nodes-base.noOp",
      "position": [
        -740,
        520
      ]
    },
    {
      "id": "f11d589b-ad66-4347-b9e8-6e56f003de5c",
      "name": "Status diff",
      "type": "n8n-nodes-base.set",
      "position": [
        140,
        330.5
      ]
    },
    {
      "id": "67a1dfc1-f35e-4854-a61b-f9ba947d6371",
      "name": "Status same",
      "type": "n8n-nodes-base.set",
      "position": [
        140,
        530.5
      ]
    },
    {
      "id": "d788fe7a-c713-426b-b15b-9e3fb806c8f4",
      "name": "Retrieve all workflows",
      "type": "n8n-nodes-base.n8n",
      "position": [
        -1840,
        205.5
      ]
    },
    {
      "id": "19cd98bf-f055-43af-a86b-d0d77a331606",
      "name": "Save each version in a different field",
      "type": "n8n-nodes-base.set",
      "position": [
        -740,
        105.5
      ]
    },
    {
      "id": "5b62ca2a-af1b-4d47-8750-526efe24949d",
      "name": "Schedule Trigger",
      "type": "n8n-nodes-base.scheduleTrigger",
      "position": [
        -2500,
        205.5
      ]
    },
    {
      "id": "e0db3d90-cdbe-4854-968c-2bde224dd759",
      "name": "GitLab",
      "type": "n8n-nodes-base.gitlab",
      "position": [
        -2280,
        205.5
      ]
    }
  ],
  "connections": {
    "GitLab": {
      "main": [
        [
          {
            "node": "Globals",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Switch": {
      "main": [
        [
          {
            "node": "Create file",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Status same",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "New file version",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Status error",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Globals": {
      "main": [
        [
          {
            "node": "Retrieve all workflows",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "End Loop": {
      "main": [
        [
          {
            "node": "Loop Over Workflows",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get file": {
      "main": [
        [
          {
            "node": "Extract From File",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Error output to normal output",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Create file": {
      "main": [
        [],
        [
          {
            "node": "Status error",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "File status": {
      "main": [
        [
          {
            "node": "Switch",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Status diff": {
      "main": [
        [
          {
            "node": "End Loop",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Status same": {
      "main": [
        [
          {
            "node": "End Loop",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Status error": {
      "main": [
        [
          {
            "node": "End Loop",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Current workflow": {
      "main": [
        [
          {
            "node": "Get file",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "New file version": {
      "main": [
        [
          {
            "node": "Status diff",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Status error",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Schedule Trigger": {
      "main": [
        [
          {
            "node": "GitLab",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Extract From File": {
      "main": [
        [
          {
            "node": "Save each version in a different field",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Loop Over Workflows": {
      "main": [
        [
          {
            "node": "Result",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Current workflow",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Retrieve all workflows": {
      "main": [
        [
          {
            "node": "Loop Over Workflows",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Error output to normal output": {
      "main": [
        [
          {
            "node": "File status",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Save each version in a different field": {
      "main": [
        [
          {
            "node": "File status",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}