{
  "name": "Automate daily workflow backups to Google Drive",
  "nodes": [
    {
      "id": "sticky-main",
      "name": "Main Description",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -920,
        500
      ],
      "parameters": {
        "width": 380,
        "height": 460,
        "content": "## Daily n8n Workflow Backup\nAutomatically backs up all workflows to Google Drive daily.\n\n### How it works\n1. Creates a timestamped folder in Google Drive\n2. Fetches all workflows from n8n\n3. Converts"
      }
    },
    {
      "id": "sticky-section-1",
      "name": "Section 1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -460,
        500
      ],
      "parameters": {
        "width": 680,
        "height": 500,
        "content": "## 1. Initialization\nStarts the schedule and creates the daily backup folder."
      }
    },
    {
      "id": "sticky-section-2",
      "name": "Section 2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        260,
        500
      ],
      "parameters": {
        "width": 860,
        "height": 500,
        "content": "## 2. Process & Upload\nLoops through workflows, converts to JSON, and saves to Drive."
      }
    },
    {
      "id": "sticky-section-3",
      "name": "Section 3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1160,
        500
      ],
      "parameters": {
        "width": 400,
        "height": 500,
        "content": "## 3. Maintenance\nDeletes backup folders older than 7 days."
      }
    },
    {
      "id": "convert-json",
      "name": "Convert to JSON",
      "type": "n8n-nodes-base.convertToFile",
      "position": [
        560,
        640
      ]
    },
    {
      "id": "manual-trigger",
      "name": "When clicking ‘Execute workflow’",
      "type": "n8n-nodes-base.manualTrigger",
      "position": [
        -400,
        580
      ]
    },
    {
      "id": "create-folder",
      "name": "Create Backup Folder",
      "type": "n8n-nodes-base.googleDrive",
      "position": [
        -160,
        640
      ]
    },
    {
      "id": "schedule-trigger",
      "name": "Schedule Trigger",
      "type": "n8n-nodes-base.scheduleTrigger",
      "position": [
        -400,
        720
      ]
    },
    {
      "id": "fetch-workflows",
      "name": "Fetch Workflows",
      "type": "n8n-nodes-base.n8n",
      "position": [
        40,
        640
      ]
    },
    {
      "id": "loop-workflows",
      "name": "Loop Workflows",
      "type": "n8n-nodes-base.splitInBatches",
      "position": [
        320,
        640
      ]
    },
    {
      "id": "upload-drive",
      "name": "Upload to Drive",
      "type": "n8n-nodes-base.googleDrive",
      "position": [
        820,
        700
      ]
    },
    {
      "id": "cleanup-code",
      "name": "Cleanup Old Backups",
      "type": "n8n-nodes-base.code",
      "position": [
        1220,
        640
      ]
    }
  ],
  "connections": {
    "Loop Workflows": {
      "main": [
        [
          {
            "node": "Cleanup Old Backups",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Convert to JSON",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Convert to JSON": {
      "main": [
        [
          {
            "node": "Upload to Drive",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Fetch Workflows": {
      "main": [
        [
          {
            "node": "Loop Workflows",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Upload to Drive": {
      "main": [
        [
          {
            "node": "Loop Workflows",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Schedule Trigger": {
      "main": [
        [
          {
            "node": "Create Backup Folder",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Create Backup Folder": {
      "main": [
        [
          {
            "node": "Fetch Workflows",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "When clicking ‘Execute workflow’": {
      "main": [
        [
          {
            "node": "Create Backup Folder",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}