{
  "name": "Automated n8n workflows backup on GitLab with username organization",
  "nodes": [
    {
      "id": "79975f6a-5aa3-4452-ba09-b489eb8c197e",
      "name": "Manual Backup Trigger",
      "type": "n8n-nodes-base.manualTrigger",
      "position": [
        -820,
        35
      ]
    },
    {
      "id": "2d5d5165-ba45-410c-8c5a-37c142b24cc1",
      "name": "Scheduled Weekly Backup",
      "type": "n8n-nodes-base.scheduleTrigger",
      "position": [
        -820,
        235
      ]
    },
    {
      "id": "6662cc05-fe42-4f80-a59a-ba670ed143f2",
      "name": "Fetch N8N Workflows",
      "type": "n8n-nodes-base.n8n",
      "position": [
        -600,
        135
      ]
    },
    {
      "id": "08d1c5cc-725b-4c9b-a7e4-55df5cd74a27",
      "name": "Prepare Backup Metadata",
      "type": "n8n-nodes-base.set",
      "position": [
        -380,
        135
      ]
    },
    {
      "id": "cbae944a-2622-4ae7-99c1-56efc56d07cf",
      "name": "Process Each Workflow",
      "type": "n8n-nodes-base.splitInBatches",
      "position": [
        -160,
        135
      ]
    },
    {
      "id": "693af3e9-5e9c-44c6-84a3-9a7c7dcca189",
      "name": "Format Workflow for GitLab",
      "type": "n8n-nodes-base.set",
      "position": [
        60,
        -140
      ]
    },
    {
      "id": "dea22b1e-e1b3-4440-b757-ba70339950de",
      "name": "Rate Limit Control",
      "type": "n8n-nodes-base.wait",
      "position": [
        280,
        -140
      ]
    },
    {
      "id": "419a3294-fe3c-41e8-a863-3b9143c8fbba",
      "name": "Check Backup Status",
      "type": "n8n-nodes-base.if",
      "position": [
        720,
        -140
      ]
    },
    {
      "id": "bf9ad468-20ad-412a-aceb-034e06795780",
      "name": "Log Backup Results",
      "type": "n8n-nodes-base.set",
      "position": [
        60,
        60
      ]
    },
    {
      "id": "7d67c031-8c4a-409b-9c7e-69775b28abf1",
      "name": "Update Backup Summary",
      "type": "n8n-nodes-base.gitlab",
      "position": [
        940,
        35
      ]
    },
    {
      "id": "52424bd4-cbce-44a9-ab17-ddf1a910a5b9",
      "name": "Send email",
      "type": "n8n-nodes-base.emailSend",
      "position": [
        280,
        60
      ]
    },
    {
      "id": "5447ade3-d338-4341-ac86-36e1c1379f5f",
      "name": "Create to GitLab Repository",
      "type": "n8n-nodes-base.gitlab",
      "position": [
        500,
        -140
      ]
    },
    {
      "id": "bf1d778c-2363-46da-8197-2fc673b0b258",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -900,
        -160
      ],
      "parameters": {
        "width": null,
        "height": 560,
        "content": "## Backup Initiation: \n\nTriggers manually or weekly to start the process "
      }
    },
    {
      "id": "742d27cd-19e4-46d5-bffb-0bac0d101a58",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -630,
        -265
      ],
      "parameters": {
        "width": 380,
        "height": 560,
        "content": "## Workflow Retrieval & Prep: \n\nFetches workflows and prepares metadata"
      }
    },
    {
      "id": "8c5e0911-391d-44ca-871b-8d6e20e65939",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -230,
        -265
      ],
      "parameters": {
        "width": 1340,
        "height": 560,
        "content": "## Combined Processing, Storage, and Notification: \n\nProcesses and formats workflows, saves them to GitLab with file existence checks and updates user-wise, logs results, and sends a success email."
      }
    }
  ],
  "connections": {
    "Log Backup Results": {
      "main": [
        [
          {
            "node": "Send email",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Rate Limit Control": {
      "main": [
        [
          {
            "node": "Create to GitLab Repository",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Check Backup Status": {
      "main": [
        [
          {
            "node": "Update Backup Summary",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Process Each Workflow",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Fetch N8N Workflows": {
      "main": [
        [
          {
            "node": "Prepare Backup Metadata",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Manual Backup Trigger": {
      "main": [
        [
          {
            "node": "Fetch N8N Workflows",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Process Each Workflow": {
      "main": [
        [
          {
            "node": "Log Backup Results",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Format Workflow for GitLab",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Update Backup Summary": {
      "main": [
        [
          {
            "node": "Process Each Workflow",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Prepare Backup Metadata": {
      "main": [
        [
          {
            "node": "Process Each Workflow",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Scheduled Weekly Backup": {
      "main": [
        [
          {
            "node": "Fetch N8N Workflows",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Format Workflow for GitLab": {
      "main": [
        [
          {
            "node": "Rate Limit Control",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Create to GitLab Repository": {
      "main": [
        [
          {
            "node": "Check Backup Status",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}