8
n8n 中文网amn8n.com

GitHub 同步仪表板 - V2

高级

这是一个DevOps, Multimodal AI领域的自动化工作流,包含 94 个节点。主要使用 If, N8n, Set, Code, Html 等节点。 具有提交历史和回滚功能的 GitHub 工作流版本控制仪表板

前置要求
  • GitHub Personal Access Token
  • HTTP Webhook 端点(n8n 会自动生成)
  • 可能需要目标 API 的认证凭证
工作流预览
可视化展示节点连接关系,支持缩放和平移
导出工作流
复制以下 JSON 配置到 n8n 导入,即可使用此工作流
{
  "id": "rC1uVp3qxeCKbQYO",
  "meta": {
    "instanceId": "fb924c73af8f703905bc09c9ee8076f48c17b596ed05b18c0ff86915ef8a7c4a",
    "templateCredsSetupCompleted": true
  },
  "name": "GitHub 同步仪表板 - V2",
  "tags": [],
  "nodes": [
    {
      "id": "0b08c161-7f01-46fb-91b3-289d527fe7b9",
      "name": "全局变量",
      "type": "n8n-nodes-base.set",
      "position": [
        -656,
        1040
      ],
      "parameters": {},
      "typeVersion": 3.4
    },
    {
      "id": "b5c523ee-1d01-4dc8-b99c-36bd845ca11b",
      "name": "n8n-all-workflows",
      "type": "n8n-nodes-base.n8n",
      "position": [
        896,
        688
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "a2f9a23a-3e0c-47a4-bdbd-969cfff9728e",
      "name": "编辑字段1",
      "type": "n8n-nodes-base.set",
      "position": [
        1056,
        688
      ],
      "parameters": {},
      "typeVersion": 3.4
    },
    {
      "id": "85056683-4e15-4114-8cd1-ce3e5c57eed1",
      "name": "编辑字段2",
      "type": "n8n-nodes-base.set",
      "position": [
        1056,
        880
      ],
      "parameters": {},
      "typeVersion": 3.4
    },
    {
      "id": "561e3c45-95de-4564-9fdb-479325edacbf",
      "name": "比较数据集",
      "type": "n8n-nodes-base.compareDatasets",
      "position": [
        1984,
        816
      ],
      "parameters": {},
      "typeVersion": 2.3,
      "alwaysOutputData": true
    },
    {
      "id": "8229c54d-ab6e-4c70-aae1-03959dfe24ea",
      "name": "Webhook-打开仪表板",
      "type": "n8n-nodes-base.webhook",
      "position": [
        -608,
        368
      ],
      "webhookId": "1edbb326-bc24-4c89-bd70-90f17f125334",
      "parameters": {},
      "typeVersion": 2.1
    },
    {
      "id": "928fa6b4-732c-4aa5-a8a0-170876e84816",
      "name": "合并",
      "type": "n8n-nodes-base.merge",
      "position": [
        160,
        272
      ],
      "parameters": {},
      "typeVersion": 3.2
    },
    {
      "id": "1d157227-083d-432e-b40f-b0c5e03879f7",
      "name": "响应 Webhook",
      "type": "n8n-nodes-base.respondToWebhook",
      "position": [
        1664,
        272
      ],
      "parameters": {},
      "typeVersion": 1.4
    },
    {
      "id": "96326909-54cc-45d3-a867-f3e4a7b85df5",
      "name": "合并1",
      "type": "n8n-nodes-base.merge",
      "position": [
        128,
        1296
      ],
      "parameters": {},
      "typeVersion": 3.2
    },
    {
      "id": "442cec5b-b62c-49b1-a58a-38415c5d470d",
      "name": "空操作",
      "type": "n8n-nodes-base.noOp",
      "position": [
        720,
        784
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "b027b064-f332-46bb-a55f-72b1777a6ff4",
      "name": "仅n8n",
      "type": "n8n-nodes-base.aggregate",
      "position": [
        2208,
        688
      ],
      "parameters": {},
      "typeVersion": 1,
      "alwaysOutputData": true
    },
    {
      "id": "8c9172d3-1761-481a-ad8c-a7fef4675c0c",
      "name": "已同步",
      "type": "n8n-nodes-base.aggregate",
      "position": [
        2208,
        832
      ],
      "parameters": {},
      "typeVersion": 1,
      "alwaysOutputData": true
    },
    {
      "id": "6d9bedf5-a908-4529-b08f-28512388ea2a",
      "name": "仅GitHub",
      "type": "n8n-nodes-base.aggregate",
      "position": [
        2208,
        976
      ],
      "parameters": {},
      "typeVersion": 1,
      "alwaysOutputData": true
    },
    {
      "id": "f1fe289d-64f0-42a0-bd90-151509c343af",
      "name": "合并2",
      "type": "n8n-nodes-base.merge",
      "position": [
        2416,
        816
      ],
      "parameters": {},
      "typeVersion": 3.2,
      "alwaysOutputData": true
    },
    {
      "id": "5dabb40c-f549-4722-b633-5f2759e8b950",
      "name": "响应 Webhook1",
      "type": "n8n-nodes-base.respondToWebhook",
      "position": [
        2928,
        832
      ],
      "parameters": {},
      "typeVersion": 1.4
    },
    {
      "id": "da7c7416-7be6-4efe-b3e4-311ecef23f12",
      "name": "Webhook-操作",
      "type": "n8n-nodes-base.webhook",
      "position": [
        -624,
        1312
      ],
      "webhookId": "90dad0ac-e16c-4b42-8655-f534213546d7",
      "parameters": {},
      "typeVersion": 2.1
    },
    {
      "id": "b6968d06-2c44-42f4-b35e-c445189da7f0",
      "name": "激活工作流",
      "type": "n8n-nodes-base.n8n",
      "onError": "continueRegularOutput",
      "position": [
        928,
        1168
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "1bdaac23-ea7b-412c-b962-a4810aa68bdf",
      "name": "停用工作流",
      "type": "n8n-nodes-base.n8n",
      "position": [
        928,
        1360
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "2c1226d7-34e9-425d-b67c-3b619b00006e",
      "name": "查询操作",
      "type": "n8n-nodes-base.switch",
      "position": [
        352,
        1248
      ],
      "parameters": {},
      "typeVersion": 3.2
    },
    {
      "id": "fb9fcb20-3a0e-40fa-bf86-0ab5410a400c",
      "name": "工作流状态",
      "type": "n8n-nodes-base.switch",
      "position": [
        720,
        1264
      ],
      "parameters": {},
      "typeVersion": 3.2
    },
    {
      "id": "bc993e17-96f8-4c05-9711-a294270643cb",
      "name": "合并4",
      "type": "n8n-nodes-base.merge",
      "position": [
        1856,
        704
      ],
      "parameters": {},
      "typeVersion": 3.2
    },
    {
      "id": "339be0ea-37bf-4fec-9ae3-eba0f4b0b624",
      "name": "编辑字段3",
      "type": "n8n-nodes-base.set",
      "position": [
        1696,
        768
      ],
      "parameters": {},
      "typeVersion": 3.4
    },
    {
      "id": "21ca5a9e-22b4-4341-9708-b7b5d50585bf",
      "name": "编辑字段4",
      "type": "n8n-nodes-base.set",
      "position": [
        1200,
        1584
      ],
      "parameters": {},
      "typeVersion": 3.4
    },
    {
      "id": "12538dcc-bcda-464a-b666-970e9f680207",
      "name": "响应",
      "type": "n8n-nodes-base.respondToWebhook",
      "position": [
        1872,
        1360
      ],
      "parameters": {},
      "typeVersion": 1.4
    },
    {
      "id": "24a55760-968c-49d6-afb4-48e12e049328",
      "name": "响应 Webhook2",
      "type": "n8n-nodes-base.respondToWebhook",
      "position": [
        1520,
        1584
      ],
      "parameters": {},
      "typeVersion": 1.4
    },
    {
      "id": "cbcc9484-a237-4287-9b05-ad1cfc2f649b",
      "name": "获取提交记录",
      "type": "n8n-nodes-base.set",
      "position": [
        720,
        1584
      ],
      "parameters": {},
      "typeVersion": 3.4
    },
    {
      "id": "23a27ba3-a421-4fe4-aad3-d400e1a751ea",
      "name": "代码1",
      "type": "n8n-nodes-base.code",
      "position": [
        1504,
        1904
      ],
      "parameters": {},
      "typeVersion": 2
    },
    {
      "id": "0926b8bd-e45e-49fa-83e3-270657383049",
      "name": "导入工作流",
      "type": "n8n-nodes-base.set",
      "position": [
        720,
        1872
      ],
      "parameters": {},
      "typeVersion": 3.4
    },
    {
      "id": "d19994d6-916e-452d-a93f-d8485ecfd675",
      "name": "合并5",
      "type": "n8n-nodes-base.merge",
      "position": [
        1168,
        1888
      ],
      "parameters": {},
      "typeVersion": 3.2
    },
    {
      "id": "44f2c7ce-11b8-428a-bd1e-8a00d7cb020f",
      "name": "新建或替换?",
      "type": "n8n-nodes-base.switch",
      "position": [
        1680,
        1904
      ],
      "parameters": {},
      "typeVersion": 3.2
    },
    {
      "id": "098ce3e5-f83e-4b4f-89ac-c7682037940d",
      "name": "创建工作流",
      "type": "n8n-nodes-base.n8n",
      "onError": "continueRegularOutput",
      "position": [
        1856,
        1792
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "5f8caeda-4677-45f9-ae48-97c1bd418848",
      "name": "更新工作流",
      "type": "n8n-nodes-base.n8n",
      "onError": "continueRegularOutput",
      "position": [
        1856,
        2016
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "12c8d1ee-7a36-4451-8b0c-0b5d7dc94d4a",
      "name": "便签",
      "type": "n8n-nodes-base.set",
      "position": [
        1328,
        1904
      ],
      "parameters": {},
      "typeVersion": 3.4
    },
    {
      "id": "3a122392-ff93-4e6d-94fc-477373f4f070",
      "name": "筛选器",
      "type": "n8n-nodes-base.filter",
      "position": [
        864,
        2096
      ],
      "parameters": {},
      "typeVersion": 2.2,
      "alwaysOutputData": true
    },
    {
      "id": "6a07c2cb-3020-4d34-9671-f76d48d7de73",
      "name": "提交详情",
      "type": "n8n-nodes-base.set",
      "position": [
        1024,
        2096
      ],
      "parameters": {},
      "typeVersion": 3.4
    },
    {
      "id": "ed6f55da-6bc3-4be1-a54b-90d935547823",
      "name": "返回",
      "type": "n8n-nodes-base.set",
      "position": [
        1328,
        -304
      ],
      "parameters": {},
      "typeVersion": 3.3
    },
    {
      "id": "cbe520c0-2182-4fce-bcbc-3c3341259c24",
      "name": "如果文件过大",
      "type": "n8n-nodes-base.if",
      "position": [
        320,
        -352
      ],
      "parameters": {},
      "typeVersion": 2
    },
    {
      "id": "e920a463-1a06-43c1-91d0-25bc507ac978",
      "name": "合并项目",
      "type": "n8n-nodes-base.merge",
      "position": [
        320,
        -128
      ],
      "parameters": {},
      "typeVersion": 2
    },
    {
      "id": "f572a7af-2414-45a2-9997-c337537f28f9",
      "name": "是差异或新建",
      "type": "n8n-nodes-base.code",
      "position": [
        512,
        -128
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "968ec76f-8c1e-4c6b-9f9b-3f5a49175c56",
      "name": "相同文件 - 不执行操作",
      "type": "n8n-nodes-base.noOp",
      "position": [
        960,
        -304
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "c601d40f-b9c4-4ea1-9575-666e7776a3ad",
      "name": "文件存在差异",
      "type": "n8n-nodes-base.noOp",
      "position": [
        960,
        -128
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "52515c81-ac25-4fee-b816-63cba8096649",
      "name": "文件是新建的",
      "type": "n8n-nodes-base.noOp",
      "position": [
        960,
        48
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "f86c6052-bcf5-43c2-b66e-e29c84bb461d",
      "name": "遍历项目",
      "type": "n8n-nodes-base.splitInBatches",
      "position": [
        32,
        -672
      ],
      "parameters": {},
      "typeVersion": 3
    },
    {
      "id": "0f5d1337-a325-421e-910a-544a5184dad3",
      "name": "计划触发器",
      "type": "n8n-nodes-base.scheduleTrigger",
      "position": [
        -352,
        -672
      ],
      "parameters": {},
      "typeVersion": 1.2
    },
    {
      "id": "86503164-034c-4fc5-b7fb-8636e2bb178a",
      "name": "便签2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -400,
        -912
      ],
      "parameters": {
        "content": ""
      },
      "typeVersion": 1
    },
    {
      "id": "ced1474d-89dd-4dbd-9126-1e44847ba78c",
      "name": "n8n-获取单个",
      "type": "n8n-nodes-base.n8n",
      "position": [
        864,
        2304
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "5b7c84fd-4af7-4cdd-8395-e0b6bbe65011",
      "name": "同步单个工作流",
      "type": "n8n-nodes-base.executeWorkflow",
      "onError": "continueRegularOutput",
      "position": [
        1856,
        2304
      ],
      "parameters": {},
      "typeVersion": 1.2
    },
    {
      "id": "f8105931-feef-40eb-b8a6-ef44f7adb0a2",
      "name": "n8n-同步全部",
      "type": "n8n-nodes-base.n8n",
      "position": [
        -176,
        -672
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "cfbbaa96-5335-4b90-b20c-0c8fcca8dd06",
      "name": "同步所有工作流",
      "type": "n8n-nodes-base.executeWorkflow",
      "onError": "continueErrorOutput",
      "position": [
        272,
        -656
      ],
      "parameters": {},
      "typeVersion": 1.2
    },
    {
      "id": "177fe02c-976b-40f7-9769-21e0ae84e45e",
      "name": "当被其他工作流执行时",
      "type": "n8n-nodes-base.executeWorkflowTrigger",
      "position": [
        -352,
        -96
      ],
      "parameters": {},
      "typeVersion": 1.1
    },
    {
      "id": "186db81b-5edc-4451-bce9-d9216862329e",
      "name": "合并6",
      "type": "n8n-nodes-base.merge",
      "position": [
        112,
        -112
      ],
      "parameters": {},
      "typeVersion": 3.2
    },
    {
      "id": "c2fdd2c2-cce7-4299-a613-433b92770da1",
      "name": "检查状态",
      "type": "n8n-nodes-base.switch",
      "position": [
        720,
        -144
      ],
      "parameters": {},
      "typeVersion": 3.2
    },
    {
      "id": "4312498d-08eb-4490-8979-09cc918c0353",
      "name": "工作流数据",
      "type": "n8n-nodes-base.set",
      "position": [
        -128,
        -96
      ],
      "parameters": {},
      "typeVersion": 3.4
    },
    {
      "id": "9f38db6d-278f-40ee-8688-06ab78e4668f",
      "name": "源同步",
      "type": "n8n-nodes-base.set",
      "position": [
        -880,
        896
      ],
      "parameters": {},
      "typeVersion": 3.4
    },
    {
      "id": "61a1ba19-1707-4dc9-83f1-7b895e31043b",
      "name": "源仪表板",
      "type": "n8n-nodes-base.set",
      "position": [
        -864,
        1040
      ],
      "parameters": {},
      "typeVersion": 3.4
    },
    {
      "id": "3ff2a022-320c-471b-96a8-061ed426097d",
      "name": "源操作",
      "type": "n8n-nodes-base.set",
      "position": [
        -880,
        1184
      ],
      "parameters": {},
      "typeVersion": 3.4
    },
    {
      "id": "8eba5f56-9093-4861-9f75-d4705bca7a0a",
      "name": "分支",
      "type": "n8n-nodes-base.switch",
      "position": [
        -144,
        1024
      ],
      "parameters": {},
      "typeVersion": 3.2
    },
    {
      "id": "8f6dfa24-5602-4d14-8011-56e4c83589db",
      "name": "合并3",
      "type": "n8n-nodes-base.merge",
      "position": [
        1328,
        272
      ],
      "parameters": {},
      "typeVersion": 3.2
    },
    {
      "id": "76d0a82b-3278-417b-9adf-28c89a55f2c5",
      "name": "HTML",
      "type": "n8n-nodes-base.html",
      "position": [
        1488,
        272
      ],
      "parameters": {},
      "typeVersion": 1.2
    },
    {
      "id": "cb3f46df-e861-4fc6-97b5-5d8870cf0791",
      "name": "获取仪表板源",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        1168,
        336
      ],
      "parameters": {},
      "notesInFlow": true,
      "typeVersion": 4.2
    },
    {
      "id": "6514addd-2e8c-4177-b10b-5bb9bcc14f98",
      "name": "空操作1",
      "type": "n8n-nodes-base.noOp",
      "position": [
        464,
        -656
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "5aecec4b-0f03-4335-b266-4887d814d671",
      "name": "空操作2",
      "type": "n8n-nodes-base.noOp",
      "position": [
        464,
        -816
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "40c85f94-6153-4e0a-8c21-33808957680e",
      "name": "便签",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        208,
        -896
      ],
      "parameters": {
        "content": ""
      },
      "typeVersion": 1
    },
    {
      "id": "876ab126-dc88-427a-824a-db2f3cbb95e3",
      "name": "便签1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -400,
        -416
      ],
      "parameters": {
        "content": ""
      },
      "typeVersion": 1
    },
    {
      "id": "9542956e-cf3b-4125-af5a-d0d57a068e92",
      "name": "便签3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -704,
        224
      ],
      "parameters": {
        "content": ""
      },
      "typeVersion": 1
    },
    {
      "id": "b0039402-e79c-42a4-be35-9863824d5bed",
      "name": "便签4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -704,
        544
      ],
      "parameters": {
        "content": ""
      },
      "typeVersion": 1
    },
    {
      "id": "f126bd8b-76b6-4b28-b20f-2330391cce04",
      "name": "便签5",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        128,
        224
      ],
      "parameters": {
        "content": ""
      },
      "typeVersion": 1
    },
    {
      "id": "3e42f759-752d-40b6-9206-e9d1bf0a7591",
      "name": "便签6",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        688,
        624
      ],
      "parameters": {
        "content": ""
      },
      "typeVersion": 1
    },
    {
      "id": "e8955b91-eda4-44be-9365-1ef0cae278f3",
      "name": "便签7",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        688,
        1120
      ],
      "parameters": {
        "content": ""
      },
      "typeVersion": 1
    },
    {
      "id": "45dfcf00-b2a0-453c-b930-2c9551aad7a3",
      "name": "便签8",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        688,
        1520
      ],
      "parameters": {
        "content": ""
      },
      "typeVersion": 1
    },
    {
      "id": "f5b5cba9-881f-41e7-9027-4f9e9a0ff3ef",
      "name": "便签9",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        688,
        1760
      ],
      "parameters": {
        "content": ""
      },
      "typeVersion": 1
    },
    {
      "id": "37a1b4e4-092b-48bf-9b16-38965f7f2686",
      "name": "便签10",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        688,
        2256
      ],
      "parameters": {
        "content": ""
      },
      "typeVersion": 1
    },
    {
      "id": "2b714ce7-c5bc-408d-9e5b-e6005275bd73",
      "name": "GH | 获取文件数据",
      "type": "n8n-nodes-base.github",
      "position": [
        128,
        -352
      ],
      "webhookId": "a0590009-4492-44bd-892c-8cc91ffaf47f",
      "parameters": {},
      "typeVersion": 1,
      "continueOnFail": true,
      "alwaysOutputData": true
    },
    {
      "id": "c37148e3-49c8-4d4a-a978-2d70db6aeb9d",
      "name": "GH | 获取文件",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        512,
        -368
      ],
      "parameters": {},
      "typeVersion": 4.2
    },
    {
      "id": "8f0ad113-87e4-4c33-9d50-b12fe324eace",
      "name": "GH | 编辑现有文件",
      "type": "n8n-nodes-base.github",
      "position": [
        1184,
        -128
      ],
      "webhookId": "efbc28ce-f88e-4af5-8849-f6ba6c63cbb3",
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "4c543842-db16-4fd6-9aef-d10afd2eb956",
      "name": "GH | 创建新文件",
      "type": "n8n-nodes-base.github",
      "position": [
        1184,
        48
      ],
      "webhookId": "88916171-eeb8-4e3e-961b-0451a6d397d2",
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "e2cc27fd-e73d-4d13-8ab0-1f78a2049cac",
      "name": "GH | 所有工作流",
      "type": "n8n-nodes-base.github",
      "position": [
        896,
        880
      ],
      "webhookId": "fd89f9db-10dc-49f7-a043-d521691e8f8e",
      "parameters": {},
      "typeVersion": 1.1
    },
    {
      "id": "da684cdc-7409-4104-aea0-1fd882775a32",
      "name": "GH | 获取文件提交记录",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        1040,
        1584
      ],
      "parameters": {},
      "typeVersion": 4.2
    },
    {
      "id": "84235900-b068-4ad6-af14-1536423a364c",
      "name": "GH | 获取提交信息",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        720,
        2096
      ],
      "parameters": {},
      "typeVersion": 4.2
    },
    {
      "id": "ebf78678-a674-4abe-87aa-2044c1a76e83",
      "name": "GH | 获取提交内容",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        944,
        1952
      ],
      "parameters": {},
      "typeVersion": 4.2
    },
    {
      "id": "b3898298-e00e-4f1e-8c55-67c03cc4e78a",
      "name": "打包工作流",
      "type": "n8n-nodes-base.set",
      "position": [
        1024,
        2304
      ],
      "parameters": {},
      "typeVersion": 3.4
    },
    {
      "id": "97a086d8-6490-417e-b58d-a9cb278524a8",
      "name": "准备同步",
      "type": "n8n-nodes-base.noOp",
      "position": [
        704,
        2304
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "90322d7a-b6e1-4fa3-b841-fcb33ece5f72",
      "name": "编辑字段",
      "type": "n8n-nodes-base.set",
      "position": [
        1568,
        880
      ],
      "parameters": {},
      "typeVersion": 3.4
    },
    {
      "id": "25f48e51-08c4-44f6-b293-593963696e34",
      "name": "获取相同工作流ID的所有文件",
      "type": "n8n-nodes-base.summarize",
      "position": [
        1392,
        880
      ],
      "parameters": {},
      "typeVersion": 1.1,
      "alwaysOutputData": true
    },
    {
      "id": "38fc4ccd-9d6d-4933-874f-5f639f4de354",
      "name": "排序",
      "type": "n8n-nodes-base.sort",
      "position": [
        1360,
        1584
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "75a0396f-4e05-4980-8048-c2c262a0bea0",
      "name": "GH | 检查目录是否存在",
      "type": "n8n-nodes-base.github",
      "position": [
        336,
        400
      ],
      "webhookId": "1d648777-0678-4bfe-8b58-1fab699b4ade",
      "parameters": {},
      "typeVersion": 1.1
    },
    {
      "id": "4cdae560-7585-4444-8b7b-9335be8c1027",
      "name": "聚合",
      "type": "n8n-nodes-base.aggregate",
      "position": [
        512,
        400
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "aba5c6d8-15ae-4e82-8075-0106e3b7453b",
      "name": "文件夹是否存在?",
      "type": "n8n-nodes-base.if",
      "position": [
        704,
        400
      ],
      "parameters": {},
      "typeVersion": 2.2
    },
    {
      "id": "b82e47ff-1e52-40b2-92fc-5e82cf2a8d19",
      "name": "GH | 创建初始文件夹",
      "type": "n8n-nodes-base.github",
      "position": [
        896,
        384
      ],
      "webhookId": "52c6bf7e-bbd8-4c4a-be8e-881b1466e32c",
      "parameters": {},
      "typeVersion": 1.1
    },
    {
      "id": "e1a3287b-8b37-41e0-8189-bec730752121",
      "name": "合并7",
      "type": "n8n-nodes-base.merge",
      "position": [
        704,
        256
      ],
      "parameters": {},
      "typeVersion": 3.2
    },
    {
      "id": "fe7da895-93d4-4938-90c8-cb5b1e74f9d9",
      "name": "筛选器1",
      "type": "n8n-nodes-base.filter",
      "position": [
        1232,
        880
      ],
      "parameters": {},
      "typeVersion": 2.2,
      "alwaysOutputData": true
    },
    {
      "id": "7c9c60fe-9019-43f5-81fc-6dc36f1d3002",
      "name": "归约",
      "type": "n8n-nodes-base.set",
      "position": [
        2592,
        832
      ],
      "parameters": {},
      "executeOnce": true,
      "typeVersion": 3.4
    },
    {
      "id": "e95fde69-3981-4ac3-a14a-c8e15d167d02",
      "name": "最终数组",
      "type": "n8n-nodes-base.set",
      "position": [
        2752,
        832
      ],
      "parameters": {},
      "typeVersion": 3.4
    },
    {
      "id": "8ec86b70-9989-414d-9e33-9f66d66beaae",
      "name": "拆分提交路径",
      "type": "n8n-nodes-base.splitOut",
      "position": [
        864,
        1584
      ],
      "parameters": {},
      "typeVersion": 1
    }
  ],
  "active": true,
  "pinData": {},
  "settings": {
    "callerPolicy": "workflowsFromSameOwner",
    "executionOrder": "v1",
    "saveDataSuccessExecution": "all"
  },
  "versionId": "17326b4a-645e-48fe-8b40-fc52a3b6ea0f",
  "connections": {
    "HTML": {
      "main": [
        [
          {
            "node": "Respond to Webhook",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "NOOP": {
      "main": [
        [
          {
            "node": "n8n-all-workflows",
            "type": "main",
            "index": 0
          },
          {
            "node": "GH | all-workflows",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Sort": {
      "main": [
        [
          {
            "node": "Respond to Webhook2",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Code1": {
      "main": [
        [
          {
            "node": "New or Replace?",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Merge": {
      "main": [
        [
          {
            "node": "GH | Check directory exists",
            "type": "main",
            "index": 0
          },
          {
            "node": "Merge7",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "NOOP1": {
      "main": [
        [
          {
            "node": "Loop Over Items",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Filter": {
      "main": [
        [
          {
            "node": "commit details",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Merge1": {
      "main": [
        [
          {
            "node": "Query action",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Merge2": {
      "main": [
        [
          {
            "node": "Reduce",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Merge3": {
      "main": [
        [
          {
            "node": "HTML",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Merge4": {
      "main": [
        [
          {
            "node": "Compare Datasets",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Merge5": {
      "main": [
        [
          {
            "node": "sticky_note",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Merge6": {
      "main": [
        [
          {
            "node": "Merge Items",
            "type": "main",
            "index": 1
          },
          {
            "node": "GH | Get file data",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Merge7": {
      "main": [
        [
          {
            "node": "Get Dashboard Source",
            "type": "main",
            "index": 0
          },
          {
            "node": "Merge3",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Reduce": {
      "main": [
        [
          {
            "node": "Final arrays",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Switch": {
      "main": [
        [
          {
            "node": "Merge6",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Merge",
            "type": "main",
            "index": 1
          }
        ],
        [
          {
            "node": "Merge1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "synced": {
      "main": [
        [
          {
            "node": "Merge2",
            "type": "main",
            "index": 1
          }
        ]
      ]
    },
    "Filter1": {
      "main": [
        [
          {
            "node": "Get all files with the same workflow id",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Globals": {
      "main": [
        [
          {
            "node": "Switch",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "n8nOnly": {
      "main": [
        [
          {
            "node": "Merge2",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Aggregate": {
      "main": [
        [
          {
            "node": "Folder exists?",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "githubOnly": {
      "main": [
        [
          {
            "node": "Merge2",
            "type": "main",
            "index": 2
          }
        ]
      ]
    },
    "Edit Fields": {
      "main": [
        [
          {
            "node": "Compare Datasets",
            "type": "main",
            "index": 1
          },
          {
            "node": "Edit Fields3",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "File is new": {
      "main": [
        [
          {
            "node": "GH | Create new file",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Merge Items": {
      "main": [
        [
          {
            "node": "isDiffOrNew",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "isDiffOrNew": {
      "main": [
        [
          {
            "node": "Check Status",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "source-sync": {
      "main": [
        [
          {
            "node": "Globals",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "sticky_note": {
      "main": [
        [
          {
            "node": "Code1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Check Status": {
      "main": [
        [
          {
            "node": "Same file - Do nothing",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "File is different",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "File is new",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Edit Fields1": {
      "main": [
        [
          {
            "node": "Merge4",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Edit Fields2": {
      "main": [
        [
          {
            "node": "Filter1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Edit Fields3": {
      "main": [
        [
          {
            "node": "Merge4",
            "type": "main",
            "index": 1
          }
        ]
      ]
    },
    "Edit Fields4": {
      "main": [
        [
          {
            "node": "Sort",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Final arrays": {
      "main": [
        [
          {
            "node": "Respond to Webhook1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Query action": {
      "main": [
        [
          {
            "node": "NOOP",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Workflow status",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "fetchCommits",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "importWorkflow",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "prepare-sync",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "WorkflowData": {
      "main": [
        [
          {
            "node": "Merge6",
            "type": "main",
            "index": 1
          }
        ]
      ]
    },
    "fetchCommits": {
      "main": [
        [
          {
            "node": "Split Commits Path",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "n8n-sync-all": {
      "main": [
        [
          {
            "node": "Loop Over Items",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "prepare-sync": {
      "main": [
        [
          {
            "node": "n8n-fetch-single",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "GH | Get File": {
      "main": [
        [
          {
            "node": "Merge Items",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Pack Workflow": {
      "main": [
        [
          {
            "node": "Sync-single-workflow",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Folder exists?": {
      "main": [
        [
          {
            "node": "Merge7",
            "type": "main",
            "index": 1
          }
        ],
        [
          {
            "node": "GH | Create initial folder",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "commit details": {
      "main": [
        [
          {
            "node": "Merge5",
            "type": "main",
            "index": 2
          }
        ]
      ]
    },
    "importWorkflow": {
      "main": [
        [
          {
            "node": "Merge5",
            "type": "main",
            "index": 0
          },
          {
            "node": "GH | Get commit content",
            "type": "main",
            "index": 0
          },
          {
            "node": "GH | Get commit info",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "source-actions": {
      "main": [
        [
          {
            "node": "Globals",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Loop Over Items": {
      "main": [
        [
          {
            "node": "NOOP2",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Sync-all-workflows",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "New or Replace?": {
      "main": [
        [
          {
            "node": "Create a workflow",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Update a workflow",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Webhook-actions": {
      "main": [
        [
          {
            "node": "Merge1",
            "type": "main",
            "index": 1
          },
          {
            "node": "source-actions",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Workflow status": {
      "main": [
        [
          {
            "node": "Activate a workflow",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Deactivate a workflow",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Compare Datasets": {
      "main": [
        [
          {
            "node": "n8nOnly",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "synced",
            "type": "main",
            "index": 0
          }
        ],
        [],
        [
          {
            "node": "githubOnly",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Schedule Trigger": {
      "main": [
        [
          {
            "node": "n8n-sync-all",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "n8n-fetch-single": {
      "main": [
        [
          {
            "node": "Pack Workflow",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "source-dashboard": {
      "main": [
        [
          {
            "node": "Globals",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Create a workflow": {
      "main": [
        [
          {
            "node": "Respond",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "File is different": {
      "main": [
        [
          {
            "node": "GH | Edit existing file",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "If file too large": {
      "main": [
        [
          {
            "node": "GH | Get File",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Merge Items",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Update a workflow": {
      "main": [
        [
          {
            "node": "Respond",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "n8n-all-workflows": {
      "main": [
        [
          {
            "node": "Edit Fields1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "GH | Get file data": {
      "main": [
        [
          {
            "node": "If file too large",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "GH | all-workflows": {
      "main": [
        [
          {
            "node": "Edit Fields2",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Split Commits Path": {
      "main": [
        [
          {
            "node": "GH | Get file commits",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Sync-all-workflows": {
      "main": [
        [
          {
            "node": "Loop Over Items",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "NOOP1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Activate a workflow": {
      "main": [
        [
          {
            "node": "Respond",
            "type": "main",
            "index": 0
          }
        ],
        []
      ]
    },
    "GH | Create new file": {
      "main": [
        [
          {
            "node": "Return",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "GH | Get commit info": {
      "main": [
        [
          {
            "node": "Filter",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get Dashboard Source": {
      "main": [
        [
          {
            "node": "Merge3",
            "type": "main",
            "index": 1
          }
        ]
      ]
    },
    "Sync-single-workflow": {
      "main": [
        [
          {
            "node": "Respond",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Deactivate a workflow": {
      "main": [
        [
          {
            "node": "Respond",
            "type": "main",
            "index": 0
          }
        ],
        []
      ]
    },
    "GH | Get file commits": {
      "main": [
        [
          {
            "node": "Edit Fields4",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Same file - Do nothing": {
      "main": [
        [
          {
            "node": "Return",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Webhook-open-dashboard": {
      "main": [
        [
          {
            "node": "Merge",
            "type": "main",
            "index": 0
          },
          {
            "node": "source-dashboard",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "GH | Edit existing file": {
      "main": [
        [
          {
            "node": "Return",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "GH | Get commit content": {
      "main": [
        [
          {
            "node": "Merge5",
            "type": "main",
            "index": 1
          }
        ]
      ]
    },
    "GH | Create initial folder": {
      "main": [
        [
          {
            "node": "Merge7",
            "type": "main",
            "index": 1
          }
        ]
      ]
    },
    "GH | Check directory exists": {
      "main": [
        [
          {
            "node": "Aggregate",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "When Executed by Another Workflow": {
      "main": [
        [
          {
            "node": "WorkflowData",
            "type": "main",
            "index": 0
          },
          {
            "node": "source-sync",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get all files with the same workflow id": {
      "main": [
        [
          {
            "node": "Edit Fields",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}
常见问题

如何使用这个工作流?

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

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

高级 - 开发运维, 多模态 AI

需要付费吗?

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

工作流信息
难度等级
高级
节点数量94
分类2
节点类型23
难度说明

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

外部链接
在 n8n.io 查看

分享此工作流