8
n8n 中文网amn8n.com

JSON文件夹分离

高级

这是一个File Management领域的自动化工作流,包含 16 个节点。主要使用 Code, HttpRequest, GoogleSheets, ManualTrigger, ReadWriteFile 等节点。 从Google表格批量下载JSON文件到本地文件夹

前置要求
  • 可能需要目标 API 的认证凭证
  • Google Sheets API 凭证
工作流预览
可视化展示节点连接关系,支持缩放和平移
导出工作流
复制以下 JSON 配置到 n8n 导入,即可使用此工作流
{
  "id": "30LBIZdc1EWwxA14",
  "meta": {
    "instanceId": "8443f10082278c46aa5cf3acf8ff0f70061a2c58bce76efac814b16290845177",
    "templateCredsSetupCompleted": true
  },
  "name": "JSON 文件夹分离",
  "tags": [],
  "nodes": [
    {
      "id": "0fc0a74b-335e-40ea-9528-6fd4996e0054",
      "name": "当点击\"执行工作流\"时",
      "type": "n8n-nodes-base.manualTrigger",
      "position": [
        0,
        80
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "5ba7a93e-0de3-4f15-b617-dd51fa420f5b",
      "name": "获取表格中的行",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        224,
        80
      ],
      "parameters": {},
      "typeVersion": 4.6
    },
    {
      "id": "6304e17b-dbe7-4432-adf6-859d478452dc",
      "name": "HTTP 请求",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        1120,
        0
      ],
      "parameters": {},
      "typeVersion": 4.2
    },
    {
      "id": "bb8f9d28-f746-48e7-88a6-332e9ef5fa09",
      "name": "遍历项目",
      "type": "n8n-nodes-base.splitInBatches",
      "position": [
        896,
        80
      ],
      "parameters": {},
      "typeVersion": 3
    },
    {
      "id": "1b1dd00f-8b1d-4c7f-821c-800c3071d9e9",
      "name": "从磁盘读取/写入文件",
      "type": "n8n-nodes-base.readWriteFile",
      "position": [
        1568,
        80
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "b301e0e4-ab3a-451c-a16d-efc0a5d6de8c",
      "name": "代码2",
      "type": "n8n-nodes-base.code",
      "position": [
        1344,
        0
      ],
      "parameters": {},
      "typeVersion": 2
    },
    {
      "id": "570b681d-f903-4e04-9623-1158158dd29b",
      "name": "获取名称和 URL",
      "type": "n8n-nodes-base.code",
      "position": [
        448,
        80
      ],
      "parameters": {},
      "typeVersion": 2
    },
    {
      "id": "46ad6abd-0855-4e85-8b8b-ac238c0be541",
      "name": "URL 转下载 URL",
      "type": "n8n-nodes-base.code",
      "position": [
        672,
        80
      ],
      "parameters": {},
      "typeVersion": 2
    },
    {
      "id": "391c3ba3-b42a-4e37-81ec-40a50bdc1f0c",
      "name": "便签",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -272,
        -128
      ],
      "parameters": {
        "content": ""
      },
      "typeVersion": 1
    },
    {
      "id": "40c75f58-29aa-4155-89fd-96ef88f1310c",
      "name": "便签 1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        112,
        224
      ],
      "parameters": {
        "content": ""
      },
      "typeVersion": 1
    },
    {
      "id": "466c47bf-9d13-4625-b2f8-676de72fe4fd",
      "name": "便签 2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        256,
        -208
      ],
      "parameters": {
        "content": ""
      },
      "typeVersion": 1
    },
    {
      "id": "93cfa4f0-ff84-40fc-87df-513e22a0ef39",
      "name": "便签 3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        528,
        208
      ],
      "parameters": {
        "content": ""
      },
      "typeVersion": 1
    },
    {
      "id": "9c3eb039-e5db-4879-9e5e-ea7f7e3adefb",
      "name": "便签 4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        736,
        -240
      ],
      "parameters": {
        "content": ""
      },
      "typeVersion": 1
    },
    {
      "id": "c1a9dcd0-14e2-4722-be04-bf94cea15e40",
      "name": "便签 5",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1056,
        160
      ],
      "parameters": {
        "content": ""
      },
      "typeVersion": 1
    },
    {
      "id": "60544704-6597-4e82-93f8-55f505f4ce4c",
      "name": "便签6",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1216,
        -288
      ],
      "parameters": {
        "content": ""
      },
      "typeVersion": 1
    },
    {
      "id": "8b68dcbc-c163-4441-b546-6de20117f6db",
      "name": "便签7",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1712,
        -112
      ],
      "parameters": {
        "content": ""
      },
      "typeVersion": 1
    }
  ],
  "active": false,
  "pinData": {},
  "settings": {
    "executionOrder": "v1"
  },
  "versionId": "14a9eb5c-a80e-4d24-92d1-0610f6c0411c",
  "connections": {
    "Code2": {
      "main": [
        [
          {
            "node": "Read/Write Files from Disk",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "HTTP Request": {
      "main": [
        [
          {
            "node": "Code2",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Loop Over Items": {
      "main": [
        [],
        [
          {
            "node": "HTTP Request",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Take name and URL": {
      "main": [
        [
          {
            "node": "url to downloadurl",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "url to downloadurl": {
      "main": [
        [
          {
            "node": "Loop Over Items",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get row(s) in sheet": {
      "main": [
        [
          {
            "node": "Take name and URL",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Read/Write Files from Disk": {
      "main": [
        [
          {
            "node": "Loop Over Items",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "When clicking ‘Execute workflow’": {
      "main": [
        [
          {
            "node": "Get row(s) in sheet",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}
常见问题

如何使用这个工作流?

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

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

高级 - 文件管理

需要付费吗?

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

工作流信息
难度等级
高级
节点数量16
分类1
节点类型7
难度说明

适合高级用户,包含 16+ 个节点的复杂工作流

作者
Rahul Joshi

Rahul Joshi

@rahul08

Rahul Joshi is a seasoned technology leader specializing in the n8n automation tool and AI-driven workflow automation. With deep expertise in building open-source workflow automation and self-hosted automation platforms, he helps organizations eliminate manual processes through intelligent n8n ai agent automation solutions.

外部链接
在 n8n.io 查看

分享此工作流