{
  "name": "Automated Workflow Backup System with Google Drive, Gmail and Discord Alerts'",
  "nodes": [
    {
      "id": "d74c545f-17ab-47f7-bb2a-93c9e9673bab",
      "name": "Schedule Trigger",
      "type": "n8n-nodes-base.scheduleTrigger",
      "position": [
        460,
        -20
      ]
    },
    {
      "id": "fc54b674-dc64-49ad-819d-66a4e416efc2",
      "name": "Get all n8n Workflows",
      "type": "n8n-nodes-base.n8n",
      "position": [
        680,
        -20
      ]
    },
    {
      "id": "b23cd260-8e68-42e7-935c-a658ae35cccd",
      "name": "Backup to Google Drive2",
      "type": "n8n-nodes-base.googleDrive",
      "position": [
        1260,
        400
      ]
    },
    {
      "id": "29a69d92-f416-489d-9a96-3a22844556e0",
      "name": "Loop Over Items",
      "type": "n8n-nodes-base.splitInBatches",
      "position": [
        920,
        -20
      ]
    },
    {
      "id": "ddee56fd-8610-4cae-9ae0-76e58e7fd111",
      "name": "Backup to Google Drive4",
      "type": "n8n-nodes-base.googleDrive",
      "position": [
        1380,
        720
      ]
    },
    {
      "id": "8fdf83b1-5884-45a2-8710-e9012c07ccca",
      "name": "ifDriveEmpty",
      "type": "n8n-nodes-base.if",
      "position": [
        680,
        420
      ]
    },
    {
      "id": "01437168-bb55-4308-a83c-a26c0f9c1843",
      "name": "firstWorkflowJson",
      "type": "n8n-nodes-base.set",
      "position": [
        1000,
        720
      ]
    },
    {
      "id": "7bcb95db-b13b-4bef-9a34-acd1194f6d96",
      "name": "JsonToFile",
      "type": "n8n-nodes-base.code",
      "position": [
        1180,
        720
      ]
    },
    {
      "id": "efdb7ea6-f4bf-4553-993c-448cd7bb2039",
      "name": "CodeJsonToFile1",
      "type": "n8n-nodes-base.code",
      "position": [
        1080,
        400
      ]
    },
    {
      "id": "411b1585-4be1-4a92-a54b-64965f0d529d",
      "name": "Limit",
      "type": "n8n-nodes-base.limit",
      "position": [
        1100,
        -40
      ]
    },
    {
      "id": "dcd2e2ee-fc18-47bc-9210-b1b42c270961",
      "name": "Workflow Data",
      "type": "n8n-nodes-base.executionData",
      "position": [
        -140,
        420
      ]
    },
    {
      "id": "d243a474-9139-4af4-8134-df815a4af806",
      "name": "successEmail",
      "type": "n8n-nodes-base.gmail",
      "position": [
        1360,
        -40
      ]
    },
    {
      "id": "306a1d38-27ef-4249-956a-cfec30d898b1",
      "name": "failureEmail",
      "type": "n8n-nodes-base.gmail",
      "position": [
        1620,
        420
      ]
    },
    {
      "id": "544cb91c-4f96-4a84-8db2-9c88e758a1e3",
      "name": "Sticky Note6",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        600,
        -80
      ],
      "parameters": {
        "width": 260,
        "height": 220,
        "content": "## Set n8n API"
      }
    },
    {
      "id": "84d6b3e9-9f01-40b8-980d-acd2f95d30fe",
      "name": "Sticky Note7",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        600,
        -180
      ],
      "parameters": {
        "width": 150,
        "height": 80,
        "content": "## Edit this node 👇"
      }
    },
    {
      "id": "a3f1669b-41da-4256-af2c-e556738eabf1",
      "name": "getDriveFileData",
      "type": "n8n-nodes-base.googleDrive",
      "position": [
        300,
        420
      ]
    },
    {
      "id": "f1771f9e-4153-4595-bbd9-22abfef23c54",
      "name": "When Executed by Another Workflow",
      "type": "n8n-nodes-base.executeWorkflowTrigger",
      "position": [
        -300,
        420
      ]
    },
    {
      "id": "7110911a-c6c6-4ef6-888f-f640784d077b",
      "name": "Execute Workflow",
      "type": "n8n-nodes-base.executeWorkflow",
      "position": [
        1100,
        100
      ]
    },
    {
      "id": "cb5cc7fb-f24f-48be-a175-c24bf830dce2",
      "name": "Parameters",
      "type": "n8n-nodes-base.set",
      "position": [
        20,
        420
      ]
    },
    {
      "id": "0ab79967-aa4e-4914-abbd-8a60057b083d",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -20,
        300
      ],
      "parameters": {
        "width": 150,
        "height": 80,
        "content": "## Edit this node 👇"
      }
    },
    {
      "id": "948c9276-88a7-4d02-85dc-525c4e8b0c01",
      "name": "Sticky Note10",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1240,
        -100
      ],
      "parameters": {
        "width": 340,
        "height": 220,
        "content": "## Send complete message"
      }
    },
    {
      "id": "cabf9b91-5a2f-4c8f-ae07-318fca57b54f",
      "name": "Discord",
      "type": "n8n-nodes-base.discord",
      "position": [
        1360,
        80
      ]
    },
    {
      "id": "ea46a8fb-5a43-400e-85d6-602ef1c68c5e",
      "name": "Sticky Note8",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        20,
        -280
      ],
      "parameters": {
        "width": 370,
        "height": 480,
        "content": "## 重要！ 👇\n\n**啟動前： **\n\n### 作者資訊與資源\n作者：Hochien Chang\nYouTube 頻道：[HC AI說人話](https://www.youtube.com/channel/UCvGfUB-wBdG4i_TdDGBCwJg)\n說明影片連結： https://youtu.be/PA15H5qunC0\n\n1.  **更新認證：** 確認已設定「Google Drive"
      }
    },
    {
      "id": "af7f9d0e-6ce4-4277-801d-92bf05a424d6",
      "name": "Sticky Note9",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -380,
        -280
      ],
      "parameters": {
        "width": 390,
        "height": 480,
        "content": "### IMPORTANT! 👇\n\n**Before activating:**\n### Author Information and Resources\nCreator：Hochien Chang\nYouTube 頻道：[HC HumanizeAI](www.youtube.com/@HC-HumanizeAI)\nExplanation Video Link: https://youtu.be/"
      }
    },
    {
      "id": "f24c9b0c-1bf4-40dc-9492-8c452e5d9905",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        920,
        600
      ],
      "parameters": {
        "width": 620,
        "height": 300,
        "content": "## 新工作流上傳\n## New Workflow upload👇"
      }
    },
    {
      "id": "dac5bca9-9d7f-4131-a563-9115bf0528cc",
      "name": "Sticky Note11",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        920,
        300
      ],
      "parameters": {
        "width": 620,
        "height": 280,
        "content": "## 現有工作流更新\n## existing Workflow update👇"
      }
    },
    {
      "id": "6d126534-8b9b-4935-bce7-471ecc931e83",
      "name": "Sticky Note12",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        140,
        300
      ],
      "parameters": {
        "width": 440,
        "height": 280,
        "content": "## 取得 Google Drive 現有的檔案資訊\n## Get Google Drive existing file info👇"
      }
    },
    {
      "id": "2ed623f4-faca-40ea-9ace-ab6d0933f6ba",
      "name": "Sticky Note13",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        580,
        300
      ],
      "parameters": {
        "width": 320,
        "height": 280,
        "content": "## 確認是否為第一次備份\n## Only for initialing👇"
      }
    },
    {
      "id": "46f0dbdc-4023-426c-b87b-3431817981c0",
      "name": "Sticky Note14",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -380,
        -380
      ],
      "parameters": {
        "width": 760,
        "height": 80,
        "content": "# HC AI 說人話"
      }
    }
  ],
  "connections": {
    "Limit": {
      "main": [
        [
          {
            "node": "successEmail",
            "type": "main",
            "index": 0
          },
          {
            "node": "Discord",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "JsonToFile": {
      "main": [
        [
          {
            "node": "Backup to Google Drive4",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Parameters": {
      "main": [
        [
          {
            "node": "getDriveFileData",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "ifDriveEmpty": {
      "main": [
        [
          {
            "node": "CodeJsonToFile1",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "firstWorkflowJson",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Workflow Data": {
      "main": [
        [
          {
            "node": "Parameters",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "CodeJsonToFile1": {
      "main": [
        [
          {
            "node": "Backup to Google Drive2",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Loop Over Items": {
      "main": [
        [
          {
            "node": "Limit",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Execute Workflow",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Execute Workflow": {
      "main": [
        [
          {
            "node": "Loop Over Items",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Schedule Trigger": {
      "main": [
        [
          {
            "node": "Get all n8n Workflows",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "getDriveFileData": {
      "main": [
        [
          {
            "node": "ifDriveEmpty",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "firstWorkflowJson": {
      "main": [
        [
          {
            "node": "JsonToFile",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get all n8n Workflows": {
      "main": [
        [
          {
            "node": "Loop Over Items",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Backup to Google Drive2": {
      "main": [
        [],
        [
          {
            "node": "failureEmail",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Backup to Google Drive4": {
      "main": [
        [],
        [
          {
            "node": "failureEmail",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "When Executed by Another Workflow": {
      "main": [
        [
          {
            "node": "Workflow Data",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}