8
n8n 中文网amn8n.com

工作流备份副本

中级

这是一个Engineering, IT Ops领域的自动化工作流,包含 12 个节点。主要使用 N8n, Limit, Filter, GoogleDrive, ConvertToFile 等节点。 自动备份工作流到Google Drive - 自动导出所有工作流

前置要求
  • Google Drive API 凭证
工作流预览
可视化展示节点连接关系,支持缩放和平移
导出工作流
复制以下 JSON 配置到 n8n 导入,即可使用此工作流
{
  "id": "qNt1EP9LpXpmPsrR",
  "meta": {
    "instanceId": "740c1df6d3b1b6ea8a9d2223701f6904173f9e3cf7381cd181644b043420ba09",
    "templateCredsSetupCompleted": true
  },
  "name": "工作流备份副本",
  "tags": [],
  "nodes": [
    {
      "id": "8a1a1151-af5f-4143-8748-c5a7e7df41e0",
      "name": "转换为文件",
      "type": "n8n-nodes-base.convertToFile",
      "position": [
        1000,
        220
      ],
      "parameters": {
        "options": {
          "format": true,
          "fileName": "={{ $json.name + \".json\" }} "
        },
        "operation": "toJson"
      },
      "typeVersion": 1.1
    },
    {
      "id": "2eeed47c-ab3e-4b8c-9cbc-4cbefa6fb59f",
      "name": "由 Github 模型提供支持",
      "type": "n8n-nodes-base.scheduleTrigger",
      "position": [
        0,
        260
      ],
      "parameters": {
        "rule": {
          "interval": [
            {
              "field": "weeks"
            }
          ]
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "9fd17067-54c0-4d59-91c1-8d69d87bae6e",
      "name": "筛选器",
      "type": "n8n-nodes-base.filter",
      "position": [
        1340,
        0
      ],
      "parameters": {
        "options": {
          "ignoreCase": true
        },
        "conditions": {
          "options": {
            "version": 2,
            "leftValue": "",
            "caseSensitive": false,
            "typeValidation": "loose"
          },
          "combinator": "and",
          "conditions": [
            {
              "id": "538fc29d-2693-4c62-9848-bdcaf8566909",
              "operator": {
                "type": "string",
                "operation": "notEquals"
              },
              "leftValue": "={{ $json.id }}",
              "rightValue": "={{ $('Create new folder').item.json.id }}"
            }
          ]
        },
        "looseTypeValidation": true
      },
      "typeVersion": 2.2
    },
    {
      "id": "632da5d2-eae3-4930-8024-6875d995ac7b",
      "name": "删除文件夹",
      "type": "n8n-nodes-base.googleDrive",
      "position": [
        1560,
        0
      ],
      "parameters": {
        "options": {
          "deletePermanently": true
        },
        "resource": "folder",
        "operation": "deleteFolder",
        "folderNoRootId": {
          "__rl": true,
          "mode": "id",
          "value": "={{ $json.id }}"
        }
      },
      "credentials": {
        "googleDriveOAuth2Api": {
          "id": "IjFafOCgIQMrz5cn",
          "name": "Google demo"
        }
      },
      "typeVersion": 3
    },
    {
      "id": "23999fdb-5501-4c75-9359-a63d72036e51",
      "name": "获取文件夹",
      "type": "n8n-nodes-base.googleDrive",
      "position": [
        1120,
        0
      ],
      "parameters": {
        "filter": {
          "folderId": {
            "__rl": true,
            "mode": "list",
            "value": ""
          }
        },
        "options": {},
        "resource": "fileFolder"
      },
      "credentials": {
        "googleDriveOAuth2Api": {
          "id": "IjFafOCgIQMrz5cn",
          "name": "Google demo"
        }
      },
      "typeVersion": 3
    },
    {
      "id": "81ad6d55-c569-42e5-93a0-9a2549080749",
      "name": "手动触发器",
      "type": "n8n-nodes-base.manualTrigger",
      "position": [
        0,
        0
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "db6e17c9-374a-4a14-9a83-97733becff11",
      "name": "创建新文件夹",
      "type": "n8n-nodes-base.googleDrive",
      "position": [
        200,
        0
      ],
      "parameters": {
        "name": "=Workflow Backups {{ $now.format('cccc t dd-MM-yyyy') }}",
        "driveId": {
          "__rl": true,
          "mode": "list",
          "value": ""
        },
        "options": {},
        "folderId": {
          "__rl": true,
          "mode": "list",
          "value": "1DHzXsjyUvDJsZssbX_kgHHLrvls3-_jA",
          "cachedResultUrl": "https://drive.google.com/drive/folders/1DHzXsjyUvDJsZssbX_kgHHLrvls3-_jA",
          "cachedResultName": "backup n8n"
        },
        "resource": "folder"
      },
      "credentials": {
        "googleDriveOAuth2Api": {
          "id": "IjFafOCgIQMrz5cn",
          "name": "Google demo"
        }
      },
      "typeVersion": 3
    },
    {
      "id": "393ac68c-f005-443c-ac5c-69679e0e3041",
      "name": "循环",
      "type": "n8n-nodes-base.splitInBatches",
      "position": [
        600,
        0
      ],
      "parameters": {
        "options": {}
      },
      "typeVersion": 3
    },
    {
      "id": "92f0685e-f093-40d0-ace0-523f97c4c1fe",
      "name": "上传工作流",
      "type": "n8n-nodes-base.googleDrive",
      "position": [
        1180,
        220
      ],
      "parameters": {
        "name": "={{ $('Loop ').item.json.name + \".json\" }}",
        "driveId": {
          "__rl": true,
          "mode": "list",
          "value": ""
        },
        "options": {},
        "folderId": {
          "__rl": true,
          "mode": "id",
          "value": "={{ $('Create new folder').item.json.id }}"
        }
      },
      "credentials": {
        "googleDriveOAuth2Api": {
          "id": "IjFafOCgIQMrz5cn",
          "name": "Google demo"
        }
      },
      "typeVersion": 3
    },
    {
      "id": "63204c20-fb38-4459-a925-28c3cfb8bf78",
      "name": "限制",
      "type": "n8n-nodes-base.limit",
      "position": [
        920,
        0
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "5f6b7108-e2f6-4e83-8644-6c6f96d22964",
      "name": "获取 n8n 工作流",
      "type": "n8n-nodes-base.n8n",
      "position": [
        400,
        0
      ],
      "parameters": {
        "filters": {},
        "requestOptions": {}
      },
      "credentials": {
        "n8nApi": {
          "id": "Qdcuw7Z9agi62dkb",
          "name": "n8n demo"
        }
      },
      "retryOnFail": true,
      "typeVersion": 1,
      "alwaysOutputData": true
    },
    {
      "id": "11719b22-f8ed-45cc-946d-90393a6af706",
      "name": "便签",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1840,
        -340
      ],
      "parameters": {
        "color": 4,
        "width": 1320,
        "height": 1660,
        "content": "# 🔄 n8n 工作流备份 → Google Drive"
      },
      "typeVersion": 1
    }
  ],
  "active": false,
  "pinData": {},
  "settings": {
    "timezone": "Europe/Warsaw",
    "callerPolicy": "workflowsFromSameOwner",
    "executionOrder": "v1"
  },
  "versionId": "b5965021-a283-4c62-bf51-b9be920327c6",
  "connections": {
    "Limit": {
      "main": [
        [
          {
            "node": "Get folders",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Loop ": {
      "main": [
        [
          {
            "node": "Limit",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Convert to File",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Filter": {
      "main": [
        [
          {
            "node": "delete folder",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get folders": {
      "main": [
        [
          {
            "node": "Filter",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Manual trigger": {
      "main": [
        [
          {
            "node": "Create new folder",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Convert to File": {
      "main": [
        [
          {
            "node": "Upload workflow",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Upload workflow": {
      "main": [
        [
          {
            "node": "Loop ",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get n8n workflow": {
      "main": [
        [
          {
            "node": "Loop ",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Schedule Trigger": {
      "main": [
        [
          {
            "node": "Create new folder",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Create new folder": {
      "main": [
        [
          {
            "node": "Get n8n workflow",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}
常见问题

如何使用这个工作流?

复制上方的 JSON 配置代码,在您的 n8n 实例中创建新工作流并选择「从 JSON 导入」,粘贴配置后根据需要修改凭证设置即可。

这个工作流适合什么场景?

中级 - 工程, IT 运维

需要付费吗?

本工作流完全免费,您可以直接导入使用。但请注意,工作流中使用的第三方服务(如 OpenAI API)可能需要您自行付费。

工作流信息
难度等级
中级
节点数量12
分类2
节点类型9
难度说明

适合有一定经验的用户,包含 6-15 个节点的中等复杂度工作流

作者
LukaszB

LukaszB

@lukaszb

AI Automation Expert | Web & Mobile App Integrator With 2+ years of experience, I build smart automations, web & mobile app workflows, and scalable platforms using tools like n8n, Make, and more. I help businesses reduce operational costs, save time, and scale faster with AI-powered solutions. For business enquiries, send me an email at kontakt@lumizone.pl

外部链接
在 n8n.io 查看

分享此工作流