动态GitHub工作流

高级

这是一个Engineering、DevOps、IT Ops领域的自动化工作流,包含 44 个节点。主要使用 N8n、Set、Code、Html、Github 等节点。 🔄 Workflow Repos8r:n8n工作流的GitHub版本控制用户界面

前置要求
  • GitHub Personal Access Token
  • HTTP Webhook 端点(n8n 会自动生成)
工作流预览
可视化展示节点连接关系,支持缩放和平移
导出工作流
复制以下 JSON 配置到 n8n 导入,即可使用此工作流
{
  "id": "19zAOGWLxA9g9epQ",
  "meta": {
    "instanceId": "ba3fa76a571c35110ef5f67e5099c9a5c1768ef125c2f3b804ba20de75248c0b",
    "templateCredsSetupCompleted": true
  },
  "name": "动态 GitHub 工作流",
  "tags": [
    {
      "id": "n7iHVPoDy5TG4oVr",
      "name": "utility",
      "createdAt": "2025-01-14T14:58:44.872Z",
      "updatedAt": "2025-01-14T14:58:44.872Z"
    }
  ],
  "nodes": [
    {
      "id": "077b5015-2b26-44ac-aac7-a868a7ab9647",
      "name": "n8n | 获取 wf1",
      "type": "n8n-nodes-base.n8n",
      "position": [
        2240,
        1440
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "8b048484-3aba-4e7a-99f3-d11cd76a0fda",
      "name": "通过 UI 响应",
      "type": "n8n-nodes-base.respondToWebhook",
      "position": [
        3820,
        760
      ],
      "parameters": {},
      "typeVersion": 1.1
    },
    {
      "id": "2fb30621-c1fc-4e2c-bd80-5aa19e95e1fe",
      "name": "HTML-UI",
      "type": "n8n-nodes-base.html",
      "position": [
        3540,
        760
      ],
      "parameters": {},
      "typeVersion": 1.2
    },
    {
      "id": "eb55c132-b001-463c-bca7-7e7850f3dffb",
      "name": "Webhook-ideogener8r",
      "type": "n8n-nodes-base.webhook",
      "position": [
        1680,
        760
      ],
      "webhookId": "e892f1af-d192-40e1-9c27-7fda6539d911",
      "parameters": {},
      "typeVersion": 2
    },
    {
      "id": "9f89ec58-5f63-4358-82a8-8ee5263f09c3",
      "name": "便签7",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1620,
        660
      ],
      "parameters": {
        "content": ""
      },
      "typeVersion": 1
    },
    {
      "id": "121f6666-7731-40e0-93a4-4599197305c2",
      "name": "设置流程",
      "type": "n8n-nodes-base.set",
      "position": [
        2920,
        760
      ],
      "parameters": {},
      "typeVersion": 3.4
    },
    {
      "id": "eb1a073b-8353-494c-9711-1bc40d1b0ee3",
      "name": "聚合",
      "type": "n8n-nodes-base.aggregate",
      "position": [
        3260,
        760
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "6b40c70a-3592-4ecf-9311-99bc39b9ff63",
      "name": "GitHub",
      "type": "n8n-nodes-base.github",
      "position": [
        2640,
        760
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "4b4e4846-cbb6-4ab0-aad4-d7de542568e1",
      "name": "提交表单",
      "type": "n8n-nodes-base.webhook",
      "position": [
        1680,
        1900
      ],
      "webhookId": "d541171c-731e-4104-ac30-6a32f2c0af03",
      "parameters": {},
      "typeVersion": 2
    },
    {
      "id": "da4b75e6-1cf0-43d6-8994-9c920669f7a7",
      "name": "响应 Webhook",
      "type": "n8n-nodes-base.respondToWebhook",
      "position": [
        3820,
        1100
      ],
      "parameters": {},
      "typeVersion": 1.1
    },
    {
      "id": "87a1185f-9f9f-401d-818c-b4f52e12dd82",
      "name": "GitHub2",
      "type": "n8n-nodes-base.github",
      "position": [
        2140,
        1100
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "3fb50870-df6a-4e0c-b9e8-c1f94e86728f",
      "name": "设置 GH 仓库和路径3",
      "type": "n8n-nodes-base.set",
      "position": [
        1940,
        1100
      ],
      "parameters": {},
      "typeVersion": 3.4
    },
    {
      "id": "85ed78b0-d257-4164-b8d1-753ebd1f2e3a",
      "name": "从文件提取",
      "type": "n8n-nodes-base.extractFromFile",
      "position": [
        2360,
        1100
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "9ebe75fe-3e9c-4a28-8d83-1054d6c703fa",
      "name": "设置 Git 工作流 ID",
      "type": "n8n-nodes-base.set",
      "position": [
        2640,
        1100
      ],
      "parameters": {},
      "typeVersion": 3.4
    },
    {
      "id": "a803bd8f-809b-4955-9e89-1586abcbf00c",
      "name": "获取 n8n 工作流",
      "type": "n8n-nodes-base.n8n",
      "position": [
        2940,
        1100
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "a2f799b5-5325-4820-969f-be0949e563b8",
      "name": "设置 n8n 工作流",
      "type": "n8n-nodes-base.set",
      "position": [
        3260,
        1100
      ],
      "parameters": {},
      "typeVersion": 3.4
    },
    {
      "id": "755eaa25-fb21-4df5-8cf9-36f4c530e5c9",
      "name": "比较节点",
      "type": "n8n-nodes-base.code",
      "position": [
        3540,
        1100
      ],
      "parameters": {},
      "typeVersion": 2
    },
    {
      "id": "8d77291b-d517-4321-9c72-d0287fab1c52",
      "name": "Respond to Webhook1",
      "type": "n8n-nodes-base.respondToWebhook",
      "position": [
        3820,
        1760
      ],
      "parameters": {},
      "typeVersion": 1.1
    },
    {
      "id": "c610bcb1-04c7-4b79-9fca-dd7bc5ad68f4",
      "name": "获取 n8n 工作流",
      "type": "n8n-nodes-base.webhook",
      "position": [
        1680,
        1440
      ],
      "webhookId": "e892f1af-d192-40e1-9c27-7fda6539d911",
      "parameters": {},
      "typeVersion": 2
    },
    {
      "id": "9b71c203-6c9a-4798-ae9e-c6f1ff14d633",
      "name": "Respond to Webhook2",
      "type": "n8n-nodes-base.respondToWebhook",
      "position": [
        3820,
        1440
      ],
      "parameters": {},
      "typeVersion": 1.1
    },
    {
      "id": "ebbd2611-27e9-48c4-8224-6e18a59cf5c3",
      "name": "获取工作流变更",
      "type": "n8n-nodes-base.webhook",
      "position": [
        1680,
        1100
      ],
      "webhookId": "e892f1af-d192-40e1-9c27-7fda6539d911",
      "parameters": {},
      "typeVersion": 2
    },
    {
      "id": "f768d245-9f92-4232-9b8f-381cb18e609c",
      "name": "设置工作流",
      "type": "n8n-nodes-base.set",
      "position": [
        2680,
        1440
      ],
      "parameters": {},
      "typeVersion": 3.4
    },
    {
      "id": "3facd854-5d61-468f-8a2a-f230ebade3ac",
      "name": "获取简报",
      "type": "n8n-nodes-base.set",
      "position": [
        3400,
        1440
      ],
      "parameters": {},
      "typeVersion": 3.4
    },
    {
      "id": "39f4fbb3-fc33-4f12-8aee-a85f4ebd3ed7",
      "name": "聚合1",
      "type": "n8n-nodes-base.aggregate",
      "position": [
        3020,
        1440
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "0bfa387a-0513-4239-af6f-6cde51d374db",
      "name": "开关1",
      "type": "n8n-nodes-base.switch",
      "position": [
        2680,
        1900
      ],
      "parameters": {},
      "typeVersion": 3.2
    },
    {
      "id": "33e97127-b0da-44d9-bcc4-43b033342c6d",
      "name": "设置 GH 仓库和路径4",
      "type": "n8n-nodes-base.set",
      "position": [
        2220,
        1900
      ],
      "parameters": {},
      "typeVersion": 3.4
    },
    {
      "id": "921bfed2-52c0-4da5-a208-34d445175fdb",
      "name": "n8n",
      "type": "n8n-nodes-base.n8n",
      "position": [
        3020,
        1760
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "6a92ecd5-aa28-4224-8700-b9cd7ee82904",
      "name": "提交工作流编辑",
      "type": "n8n-nodes-base.github",
      "position": [
        3400,
        1760
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "8f88c306-08df-4b8f-9c44-8936562901f3",
      "name": "n8n1",
      "type": "n8n-nodes-base.n8n",
      "position": [
        3020,
        1980
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "f15b37f4-a0c2-4c27-9b22-c586cd3636cd",
      "name": "提交新文件",
      "type": "n8n-nodes-base.github",
      "position": [
        3400,
        1980
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "d766a2fd-b05d-4a9d-a5f9-53009c5e198b",
      "name": "响应 Webhook3",
      "type": "n8n-nodes-base.respondToWebhook",
      "position": [
        3820,
        1980
      ],
      "parameters": {},
      "typeVersion": 1.1
    },
    {
      "id": "712e2d80-f659-4d60-95c6-342883fc6eca",
      "name": "便签",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1620,
        1000
      ],
      "parameters": {
        "content": ""
      },
      "typeVersion": 1
    },
    {
      "id": "c569ff75-eb1b-4783-a65d-376069a43c50",
      "name": "便签1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1620,
        1340
      ],
      "parameters": {
        "content": ""
      },
      "typeVersion": 1
    },
    {
      "id": "d6d223d5-67dd-419c-9e88-9762c51ce692",
      "name": "便签2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1620,
        1680
      ],
      "parameters": {
        "content": ""
      },
      "typeVersion": 1
    },
    {
      "id": "b705cb50-b982-4d0e-ac4c-32556128fe53",
      "name": "便签3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1900,
        700
      ],
      "parameters": {
        "content": ""
      },
      "typeVersion": 1
    },
    {
      "id": "ea518e3e-274a-4b1a-b0ed-06408457c77d",
      "name": "便签4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1880,
        1060
      ],
      "parameters": {
        "content": ""
      },
      "typeVersion": 1
    },
    {
      "id": "b8017298-cefd-4126-8959-4515e18fb163",
      "name": "便签5",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        2160,
        1840
      ],
      "parameters": {
        "content": ""
      },
      "typeVersion": 1
    },
    {
      "id": "22cc7d73-c424-4ea3-bacb-0526222b1f81",
      "name": "便签6",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1400,
        740
      ],
      "parameters": {
        "content": ""
      },
      "typeVersion": 1
    },
    {
      "id": "b25d9672-28cb-4c26-ac4a-7d259352de17",
      "name": "便签8",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1400,
        1080
      ],
      "parameters": {
        "content": ""
      },
      "typeVersion": 1
    },
    {
      "id": "82b3e0c7-5a7c-4cda-acc8-dc9de63ce9a3",
      "name": "### 替换 Airtable 连接",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1400,
        1420
      ],
      "parameters": {
        "content": ""
      },
      "typeVersion": 1
    },
    {
      "id": "d8bbf686-0173-4863-948d-c5cdb1dc1b76",
      "name": "便签10",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1380,
        1880
      ],
      "parameters": {
        "content": ""
      },
      "typeVersion": 1
    },
    {
      "id": "aa62e288-3628-40f6-ad38-54768d76dff9",
      "name": "设置工作流变量",
      "type": "n8n-nodes-base.set",
      "position": [
        1940,
        760
      ],
      "parameters": {},
      "typeVersion": 3.4
    },
    {
      "id": "73986aeb-c311-4acf-9427-dcfe65d6bc34",
      "name": "工作流变量",
      "type": "n8n-nodes-base.set",
      "position": [
        1960,
        1900
      ],
      "parameters": {},
      "typeVersion": 3.4
    },
    {
      "id": "a8c438f1-be8c-4461-b83c-ffdc612f2a04",
      "name": "便签11",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1620,
        240
      ],
      "parameters": {
        "content": ""
      },
      "typeVersion": 1
    }
  ],
  "active": true,
  "pinData": {},
  "settings": {
    "executionOrder": "v1"
  },
  "versionId": "24bded7d-e0f5-4c66-b64f-f6324a5a2d35",
  "connections": {
    "n8n": {
      "main": [
        [
          {
            "node": "Commit Workflow Edit",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "n8n1": {
      "main": [
        [
          {
            "node": "Commit New File",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "GitHub": {
      "main": [
        [
          {
            "node": "Set Flows",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "GitHub2": {
      "main": [
        [
          {
            "node": "Extract from File",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "HTML-UI": {
      "main": [
        [
          {
            "node": "Respond with UI",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Switch1": {
      "main": [
        [
          {
            "node": "n8n",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "n8n1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Aggregate": {
      "main": [
        [
          {
            "node": "HTML-UI",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Set Flows": {
      "main": [
        [
          {
            "node": "Aggregate",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Aggregate1": {
      "main": [
        [
          {
            "node": "Edit Fields",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Edit Fields": {
      "main": [
        [
          {
            "node": "Respond to Webhook2",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "submit-form": {
      "main": [
        [
          {
            "node": "Workflow Vars",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "ComapreNodes": {
      "main": [
        [
          {
            "node": "Respond to Webhook",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "SetWorkflows": {
      "main": [
        [
          {
            "node": "Aggregate1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Workflow Vars": {
      "main": [
        [
          {
            "node": "Set GH Repo and Path4",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "n8n | get wf1": {
      "main": [
        [
          {
            "node": "SetWorkflows",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Commit New File": {
      "main": [
        [
          {
            "node": "Respond to Webhook3",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get n8n Workflow": {
      "main": [
        [
          {
            "node": "Set n8n Workflow",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Set n8n Workflow": {
      "main": [
        [
          {
            "node": "ComapreNodes",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Extract from File": {
      "main": [
        [
          {
            "node": "Set Git Workflow Id",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get-n8n-workflows": {
      "main": [
        [
          {
            "node": "n8n | get wf1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Set Git Workflow Id": {
      "main": [
        [
          {
            "node": "Get n8n Workflow",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Webhook-ideogener8r": {
      "main": [
        [
          {
            "node": "Set Workflow Variables",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Commit Workflow Edit": {
      "main": [
        [
          {
            "node": "Respond to Webhook1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get-Workflow-Changes": {
      "main": [
        [
          {
            "node": "Set GH Repo and Path3",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Set GH Repo and Path3": {
      "main": [
        [
          {
            "node": "GitHub2",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Set GH Repo and Path4": {
      "main": [
        [
          {
            "node": "Switch1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Set Workflow Variables": {
      "main": [
        [
          {
            "node": "GitHub",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}
常见问题

如何使用这个工作流?

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

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

这是一个高级难度的工作流,适用于Engineering、DevOps、IT Ops等场景。适合高级用户,包含 16+ 个节点的复杂工作流

需要付费吗?

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

工作流信息
难度等级
高级
节点数量44
分类3
节点类型11
难度说明

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

作者
外部链接
在 n8n.io 上查看 →

分享此工作流