工作流节点更新检查插件
高级
这是一个Other领域的自动化工作流,包含 16 个节点。主要使用 N8n, Set, Code, Gmail, ExecuteWorkflowTrigger 等节点。 标记画布中过时的工作流节点并通过Gmail发送摘要(插件)
前置要求
- •Google 账号和 Gmail API 凭证
分类
工作流预览
可视化展示节点连接关系,支持缩放和平移
导出工作流
复制以下 JSON 配置到 n8n 导入,即可使用此工作流
{
"id": "xlMrGt0c1eFi4J1U",
"meta": {
"instanceId": "fb8bc2e315f7f03c97140b30aa454a27bc7883a19000fa1da6e6b571bf56ad6d",
"templateCredsSetupCompleted": true
},
"name": "工作流节点更新检查模板的附加组件",
"tags": [],
"nodes": [
{
"id": "e8068a93-5474-474e-a48e-947269b7ca5f",
"name": "执行工作流触发器",
"type": "n8n-nodes-base.executeWorkflowTrigger",
"position": [
860,
1140
],
"parameters": {},
"typeVersion": 1
},
{
"id": "9b4524d8-6ded-489b-bf45-6810f5306652",
"name": "便签 4",
"type": "n8n-nodes-base.stickyNote",
"position": [
800,
120
],
"parameters": {
"color": 5,
"width": 1316.8621045610755,
"height": 887.980239951363,
"content": "## 下载主工作流并将其输出连接到此工作流"
},
"typeVersion": 1
},
{
"id": "cb0cacc1-34d0-4e4d-a7db-e44ece1a155f",
"name": "准备输出",
"type": "n8n-nodes-base.set",
"position": [
2180,
1140
],
"parameters": {
"options": {},
"assignments": {
"assignments": [
{
"id": "26c2bf59-2051-47e3-a6bf-3896ad427404",
"name": "name",
"type": "string",
"value": "=<a href={{ $('Settings').item.json.instanceBaseUrl }}/workflow/{{ $json.id }}>{{ $json.name }}</a>"
}
]
}
},
"typeVersion": 3.4
},
{
"id": "4b914937-1cff-4fc2-886b-64ec6818daf3",
"name": "发送摘要",
"type": "n8n-nodes-base.gmail",
"position": [
2400,
1140
],
"webhookId": "1ad759b3-f1cd-49dd-b288-e3344fa94c8a",
"parameters": {
"message": "=These workflows contain outdated nodes:<br>\n<ul>\n{{ $('Prepare Output').all().pluck('json').pluck('name').map(item => \"<li>\"+item+\"</li>\").join('') }}\n</ul>",
"options": {
"appendAttribution": false
},
"subject": "Outdated n8n Workflow Nodes"
},
"credentials": {
"gmailOAuth2": {
"id": "TWM2BLjDHQtGAFQn",
"name": "Gmail (octionicsolutions)"
}
},
"executeOnce": true,
"typeVersion": 2.1
},
{
"id": "2f259d45-cb31-4007-beb0-93123cc619c3",
"name": "获取工作流",
"type": "n8n-nodes-base.n8n",
"position": [
1520,
1140
],
"parameters": {
"operation": "get",
"workflowId": {
"__rl": true,
"mode": "id",
"value": "={{ $('Start Reference').item.json.Id }}"
},
"requestOptions": {}
},
"credentials": {
"n8nApi": {
"id": "fRyEJuhN9Nf3aQap",
"name": "n8n account"
}
},
"typeVersion": 1
},
{
"id": "e2bbfc5b-1af6-43b1-9d03-f35b5837d3cc",
"name": "更新工作流",
"type": "n8n-nodes-base.n8n",
"position": [
1960,
1140
],
"parameters": {
"operation": "update",
"workflowId": {
"__rl": true,
"mode": "id",
"value": "={{ $json.id }}"
},
"requestOptions": {},
"workflowObject": "={{ JSON.stringify($json) }}"
},
"credentials": {
"n8nApi": {
"id": "fRyEJuhN9Nf3aQap",
"name": "n8n account"
}
},
"typeVersion": 1
},
{
"id": "f2bb0529-6e38-46c6-93e8-de76e9ecc31e",
"name": "修改工作流(如果需要)",
"type": "n8n-nodes-base.code",
"position": [
1740,
1140
],
"parameters": {
"mode": "runOnceForEachItem",
"jsCode": "let symbol = $('Settings').item.json.symbol;\nlet onlyMajorChanges = $('Settings').item.json.onlyMajorChanges;\nlet addNodesToCanvas = $('Settings').item.json.addNodesToCanvas;\n\n// create shallow copy including nested objects\nlet data = JSON.parse(JSON.stringify($json));\n\nchangeCount = 0;\n// Loop through nodes and update the names\nfor (let outdatedNode of $('Start Reference').item.json.outdated_nodes) {\n // skip minor changes, if settings require it\n if (onlyMajorChanges && outdatedNode.version.toString().substring(0, 1) == outdatedNode.latestVersion.toString().substring(0, 1)) {\n continue;\n }\n // update nodes, it they are not already renamed with symbol\n for (let existingNode of data.nodes) {\n if (outdatedNode.name == existingNode.name && !existingNode.name.startsWith(symbol) && existingNode.id) {\n // prepend new nodes, so they appear below outdated nodes on the canvas\n if (addNodesToCanvas) {\n let newNode = JSON.parse(JSON.stringify(existingNode));\n delete newNode.id;\n newNode.typeVersion = outdatedNode.latestVersion;\n newNode.position = [newNode.position[0] + 40, newNode.position[1] - 40];\n data.nodes.unshift(newNode);\n }\n // rename outdated nodes (prepend symbol)\n existingNode.name = symbol + \" \" + existingNode.name;\n \n // update connections\n for (let connectionKey in data.connections) {\n let connection = data.connections[connectionKey];\n \n // rename keys\n if (connectionKey == outdatedNode.name) {\n let newKey = symbol + \" \" + connectionKey;\n data.connections[newKey] = connection;\n delete data.connections[connectionKey];\n }\n \n // check the nested \"main\" array\n if (connection.main) {\n for (let mainArray of connection.main) {\n for (let nodeObj of mainArray) {\n if (nodeObj.node == outdatedNode.name) {\n nodeObj.node = symbol + \" \" + nodeObj.node;\n }\n }\n }\n }\n }\n changeCount++;\n }\n }\n}\n\nif (changeCount == 0) {\n return null;\n}\n\nreturn {\n id: data.id,\n name: data.name,\n nodes: data.nodes,\n connections: data.connections,\n settings: data.settings\n}"
},
"typeVersion": 2
},
{
"id": "b4b7d328-8128-4f07-841a-1efa26c3fdd5",
"name": "开始引用",
"type": "n8n-nodes-base.noOp",
"position": [
1080,
1140
],
"parameters": {},
"typeVersion": 1
},
{
"id": "7d80b557-15ac-479e-a219-dd254580a063",
"name": "便签",
"type": "n8n-nodes-base.stickyNote",
"position": [
800,
1020
],
"parameters": {
"color": 7,
"width": 216.6228464570463,
"height": 282.1449413577448,
"content": "此工作流由另一个工作流调用,该工作流提供包含主要和次要节点更新的所有工作流列表"
},
"typeVersion": 1
},
{
"id": "1becaab6-fe2a-44e9-bc7e-ce87665f25bd",
"name": "便签 2",
"type": "n8n-nodes-base.stickyNote",
"position": [
2120,
680
],
"parameters": {
"color": 7,
"width": 435.46822963832705,
"height": 327.68691689762716,
"content": "## 示例输入数据"
},
"typeVersion": 1
},
{
"id": "9ce81677-4dd4-4a9a-a7a3-66b113c69de6",
"name": "便签 1",
"type": "n8n-nodes-base.stickyNote",
"position": [
1020,
1020
],
"parameters": {
"color": 7,
"width": 216.6228464570463,
"height": 282.1449413577448,
"content": "以下节点从此处开始引用,因此可以轻松更改此节点之前的逻辑"
},
"typeVersion": 1
},
{
"id": "f6e7e7ce-1282-4292-8675-ca8bbe215d5f",
"name": "便签 5",
"type": "n8n-nodes-base.stickyNote",
"position": [
1240,
1020
],
"parameters": {
"width": 216.6228464570463,
"height": 282.1449413577448,
"content": "## 更新设置"
},
"typeVersion": 1
},
{
"id": "46b168d5-c866-497b-8664-92722a356feb",
"name": "设置",
"type": "n8n-nodes-base.set",
"position": [
1300,
1140
],
"parameters": {
"options": {},
"assignments": {
"assignments": [
{
"id": "99947a54-e9f9-4d04-b273-9d7eeed62775",
"name": "instanceBaseUrl",
"type": "string",
"value": "http://localhost:5432"
},
{
"id": "35a63bda-fcbb-4885-a8d6-4b52c6579206",
"name": "symbol",
"type": "string",
"value": "⚠️"
},
{
"id": "3481286b-359f-4e86-8f56-bdb267ebd6a2",
"name": "onlyMajorChanges",
"type": "boolean",
"value": true
},
{
"id": "2377c274-5501-494f-813e-0d3ebe47e375",
"name": "addNodesToCanvas",
"type": "boolean",
"value": true
}
]
}
},
"typeVersion": 3.4
},
{
"id": "d28ac933-7dbc-4039-821b-7cd4c4c5ec94",
"name": "便签6",
"type": "n8n-nodes-base.stickyNote",
"position": [
2120,
1020
],
"parameters": {
"color": 7,
"width": 216.6228464570463,
"height": 282.1449413577448,
"content": "为每个受影响的工作流生成 URL"
},
"typeVersion": 1
},
{
"id": "0fef2be5-92d5-4d4f-8afc-b958ee616787",
"name": "便签7",
"type": "n8n-nodes-base.stickyNote",
"position": [
2340,
1020
],
"parameters": {
"width": 216.6228464570463,
"height": 282.1449413577448,
"content": "## 设置 Gmail"
},
"typeVersion": 1
},
{
"id": "dc940f78-1eff-4393-9d9a-f4afefe24d45",
"name": "便签8",
"type": "n8n-nodes-base.stickyNote",
"position": [
1460,
1020
],
"parameters": {
"color": 7,
"width": 657.2496253932529,
"height": 282.1449413577448,
"content": "每个工作流都在被处理并在需要时修改。根据设置,会在过时节点名称前添加图标。此外,会在附近添加较新版本,以便用户可以更快地替换"
},
"typeVersion": 1
}
],
"active": false,
"pinData": {},
"settings": {
"executionOrder": "v1"
},
"versionId": "f4bb34b0-7561-4d77-beac-8f6988a0ed64",
"connections": {
"Settings": {
"main": [
[
{
"node": "Get Workflow",
"type": "main",
"index": 0
}
]
]
},
"Get Workflow": {
"main": [
[
{
"node": "Modify Workflow (if required)",
"type": "main",
"index": 0
}
]
]
},
"Prepare Output": {
"main": [
[
{
"node": "Send Summary",
"type": "main",
"index": 0
}
]
]
},
"Start Reference": {
"main": [
[
{
"node": "Settings",
"type": "main",
"index": 0
}
]
]
},
"Update Workflow": {
"main": [
[
{
"node": "Prepare Output",
"type": "main",
"index": 0
}
]
]
},
"Execute Workflow Trigger": {
"main": [
[
{
"node": "Start Reference",
"type": "main",
"index": 0
}
]
]
},
"Modify Workflow (if required)": {
"main": [
[
{
"node": "Update Workflow",
"type": "main",
"index": 0
}
]
]
}
}
}常见问题
如何使用这个工作流?
复制上方的 JSON 配置代码,在您的 n8n 实例中创建新工作流并选择「从 JSON 导入」,粘贴配置后根据需要修改凭证设置即可。
这个工作流适合什么场景?
高级 - 其他
需要付费吗?
本工作流完全免费,您可以直接导入使用。但请注意,工作流中使用的第三方服务(如 OpenAI API)可能需要您自行付费。
相关工作流推荐
工作流导入器
使用多表单导入工作流并映射其凭据
If
N8n
Set
+15
58 节点Mario
其他
实时Notion Todoist双向同步模板
使用Redis的Notion Todoist实时双向同步
If
Set
Code
+26
246 节点Mario
销售
备份工作流到 GitHub(子文件夹)
备份工作流到 GitHub(子文件夹)
If
N8n
Set
+12
25 节点Nazmy
其他
备份工作流到 GitHub
备份工作流到 GitHub
If
N8n
Set
+12
23 节点Solomon
其他
在可视化参考库中探索n8n节点
在可视化参考库中探索n8n节点
If
Ftp
Set
+93
113 节点I versus AI
其他
邮件转Notion V2
将电子邮件转换为Notion中的AI增强任务(支持多用户),集成Gmail、Airtable和Softr
Set
Code
Gmail
+11
38 节点Mario
人工智能
工作流信息
难度等级
高级
节点数量16
分类1
节点类型7
作者
Mario
@octionicWorkflow Optimization Expert | Software Architect. Use my link to book an initial consultation for custom built workflows using n8n.
外部链接
在 n8n.io 查看 →
分享此工作流