📁🔁 Google Drive 复制文件夹结构 (n8n)
中级
这是一个IT Ops领域的自动化工作流,包含 12 个节点。主要使用 If, Set, Code, Merge, GoogleDrive 等节点。 在Google Drive中复制文件夹结构(不含文件)
前置要求
- •Google Drive API 凭证
分类
工作流预览
可视化展示节点连接关系,支持缩放和平移
导出工作流
复制以下 JSON 配置到 n8n 导入,即可使用此工作流
{
"id": "VroevTqXeech3Gjo",
"meta": {
"instanceId": "2d4b97f52377b00080bd41b0ce66bd68553d32852974b6b1df9d5b8b439728d9",
"templateCredsSetupCompleted": true
},
"name": "📁🔁 Google Drive 复制文件夹结构 (n8n)",
"tags": [
{
"id": "GviYgVwcOV5jZvGf",
"name": "tool agents",
"createdAt": "2025-05-19T16:06:57.753Z",
"updatedAt": "2025-05-19T16:06:57.753Z"
}
],
"nodes": [
{
"id": "0f7a36d4-baed-4001-b730-6444ec832e26",
"name": "当点击\"测试工作流\"时",
"type": "n8n-nodes-base.manualTrigger",
"position": [
0,
0
],
"parameters": {},
"typeVersion": 1
},
{
"id": "38847cef-8562-44a1-92df-7657988e5e64",
"name": "获取源文件夹",
"type": "n8n-nodes-base.googleDrive",
"position": [
1060,
0
],
"parameters": {},
"typeVersion": 3
},
{
"id": "483f4b3e-1259-4b12-9238-1ba07c29c085",
"name": "便签",
"type": "n8n-nodes-base.stickyNote",
"position": [
140,
-340
],
"parameters": {
"content": ""
},
"typeVersion": 1
},
{
"id": "07a21712-779e-477d-b7b9-35a861add96e",
"name": "便签1",
"type": "n8n-nodes-base.stickyNote",
"position": [
140,
240
],
"parameters": {
"content": ""
},
"typeVersion": 1
},
{
"id": "205429d5-ad05-494e-bea2-8303f7635d8c",
"name": "遍历项目",
"type": "n8n-nodes-base.splitInBatches",
"position": [
1280,
0
],
"parameters": {},
"typeVersion": 3
},
{
"id": "c19cf4c1-e4b7-4f70-b5de-e7ec0d63863c",
"name": "编辑此节点",
"type": "n8n-nodes-base.set",
"position": [
220,
0
],
"parameters": {},
"typeVersion": 3.4
},
{
"id": "10f6dc80-e038-42b4-92bb-9ea4b9e6c234",
"name": "创建文件夹",
"type": "n8n-nodes-base.googleDrive",
"position": [
1880,
120
],
"parameters": {},
"typeVersion": 1
},
{
"id": "8d337637-e567-48b4-9741-1c872edcb77f",
"name": "检查文件夹是否存在",
"type": "n8n-nodes-base.code",
"position": [
1520,
20
],
"parameters": {},
"typeVersion": 2
},
{
"id": "68745849-733d-4af6-90b6-9bf075343509",
"name": "如果存在",
"type": "n8n-nodes-base.if",
"position": [
1700,
20
],
"parameters": {},
"typeVersion": 2.2
},
{
"id": "34e50022-50ad-4ac3-aacb-9216fe5853a3",
"name": "获取目标文件夹",
"type": "n8n-nodes-base.googleDrive",
"position": [
420,
0
],
"parameters": {},
"typeVersion": 3,
"alwaysOutputData": true
},
{
"id": "cea69a53-6a46-4b51-80c8-65e38df1ef95",
"name": "设置目标名称",
"type": "n8n-nodes-base.set",
"position": [
860,
0
],
"parameters": {},
"typeVersion": 3.4
},
{
"id": "abb1ef22-91a3-426a-99ad-485a6f4412e6",
"name": "合并文件夹上下文",
"type": "n8n-nodes-base.merge",
"position": [
640,
0
],
"parameters": {},
"typeVersion": 3.1
}
],
"active": false,
"pinData": {},
"settings": {
"executionOrder": "v1"
},
"versionId": "05291ec7-25fe-4381-9663-8ac48af0b5a4",
"connections": {
"If exists": {
"main": [
[],
[
{
"node": "Create Folder",
"type": "main",
"index": 0
}
]
]
},
"Create Folder": {
"main": [
[
{
"node": "Loop Over Items",
"type": "main",
"index": 0
}
]
]
},
"EDIT_THIS_NODE": {
"main": [
[
{
"node": "Get_Folders_DESTINATION",
"type": "main",
"index": 0
},
{
"node": "Merge_Folder_Context",
"type": "main",
"index": 0
}
]
]
},
"Loop Over Items": {
"main": [
[],
[
{
"node": "Check if folder exists",
"type": "main",
"index": 0
}
]
]
},
"Get_Folders_SOURCE": {
"main": [
[
{
"node": "Loop Over Items",
"type": "main",
"index": 0
}
]
]
},
"Merge_Folder_Context": {
"main": [
[
{
"node": "Set Destination Names",
"type": "main",
"index": 0
}
]
]
},
"Set Destination Names": {
"main": [
[
{
"node": "Get_Folders_SOURCE",
"type": "main",
"index": 0
}
]
]
},
"Check if folder exists": {
"main": [
[
{
"node": "If exists",
"type": "main",
"index": 0
}
]
]
},
"Get_Folders_DESTINATION": {
"main": [
[
{
"node": "Merge_Folder_Context",
"type": "main",
"index": 1
}
]
]
},
"When clicking ‘Test workflow’": {
"main": [
[
{
"node": "EDIT_THIS_NODE",
"type": "main",
"index": 0
}
]
]
}
}
}常见问题
如何使用这个工作流?
复制上方的 JSON 配置代码,在您的 n8n 实例中创建新工作流并选择「从 JSON 导入」,粘贴配置后根据需要修改凭证设置即可。
这个工作流适合什么场景?
中级 - IT 运维
需要付费吗?
本工作流完全免费,您可以直接导入使用。但请注意,工作流中使用的第三方服务(如 OpenAI API)可能需要您自行付费。
相关工作流推荐
AI智能助手:与Supabase存储和Google Drive文件对话
AI智能助手:与Supabase存储和Google Drive文件对话
If
Set
Wait
+20
62 节点Mark Shcherbakov
工程
↔️ Airtable批量处理
Airtable批量更新/插入行(发送更快+节省API调用请求)
If
Set
Code
+12
35 节点Simon Mayerhofer
IT 运维
使用 Qdrant 的完整 RAG 系统,带自动来源引用
使用Qdrant、Gemini和OpenAI构建带自动引用的RAG系统
Set
Code
Wait
+15
29 节点Davide
人工智能
批量自动共享Google Drive文件并生成直接下载链接
批量自动共享Google Drive文件并生成直接下载链接
Set
Code
Merge
+5
9 节点Nskha
IT 运维
使用自动文件分块将大文件上传到 Kommo/AmoCRM
使用自动文件分块将大文件上传到 Kommo/AmoCRM
If
Set
Code
+11
36 节点yatolstoy
工程
使用Google套件、PDF和邮件自动化商业保险提交
通过Google套件、PDF和邮件自动化商业保险提交流程
If
Set
Code
+10
37 节点David Olusola
文档提取