使用Coolify自动更新n8n至最新版本
中级
这是一个DevOps领域的自动化工作流,包含 9 个节点。主要使用 Limit, Filter, HttpRequest, ScheduleTrigger, RemoveDuplicates 等节点。 使用Coolify自动更新n8n至最新版本
前置要求
- •可能需要目标 API 的认证凭证
分类
工作流预览
可视化展示节点连接关系,支持缩放和平移
导出工作流
复制以下 JSON 配置到 n8n 导入,即可使用此工作流
{
"nodes": [
{
"id": "35e69169-c5c2-49c8-beef-6ea6d0edc6bf",
"name": "获取发布版本",
"type": "n8n-nodes-base.httpRequest",
"position": [
620,
-120
],
"parameters": {
"url": "https://api.github.com/repos/n8n-io/n8n/releases/latest",
"options": {},
"sendQuery": true,
"queryParameters": {
"parameters": [
{
"name": "per_page",
"value": "10"
}
]
}
},
"notesInFlow": true,
"typeVersion": 4.2
},
{
"id": "00cfe0a8-d757-4980-a3d6-cf190c740a25",
"name": "更新环境变量",
"type": "n8n-nodes-base.httpRequest",
"position": [
1060,
-220
],
"parameters": {
"url": "=https://console.buatan.id/api/v1/applications/{{ 'm8ccg8k44coogsk84swk8kgs' }}/envs",
"method": "PATCH",
"options": {},
"sendBody": true,
"authentication": "genericCredentialType",
"bodyParameters": {
"parameters": [
{
"name": "key",
"value": "N8N_VERSION"
},
{
"name": "value",
"value": "={{ $json.name.split('@').last() }}"
},
{
"name": "is_preview",
"value": "={{ false }}"
},
{
"name": "is_build_time",
"value": "={{ true }}"
},
{
"name": "is_literal",
"value": "={{ false }}"
}
]
},
"genericAuthType": "httpHeaderAuth"
},
"credentials": {
"httpBearerAuth": {
"id": "WMYtkCgKxL6oblQO",
"name": "Coolify - console.buatan.id"
},
"httpHeaderAuth": {
"id": "Psy1vTIAINFnvPV1",
"name": "Coolify - console.buatan.id"
}
},
"notesInFlow": true,
"typeVersion": 4.2
},
{
"id": "43ed4660-01ca-456f-b161-475a41f5cedc",
"name": "部署",
"type": "n8n-nodes-base.httpRequest",
"position": [
1280,
-220
],
"parameters": {
"url": "=https://console.buatan.id/api/v1/deploy?uuid={{ 'm8ccg8k44coogsk84swk8kgs' }}&force=false",
"options": {},
"authentication": "genericCredentialType",
"genericAuthType": "httpHeaderAuth"
},
"credentials": {
"httpBearerAuth": {
"id": "WMYtkCgKxL6oblQO",
"name": "Coolify - console.buatan.id"
},
"httpHeaderAuth": {
"id": "Psy1vTIAINFnvPV1",
"name": "Coolify - console.buatan.id"
}
},
"notesInFlow": true,
"typeVersion": 4.2
},
{
"id": "4373ef71-d47f-435e-81c6-39bd19c82fab",
"name": "过滤器",
"type": "n8n-nodes-base.filter",
"position": [
400,
-320
],
"parameters": {
"options": {},
"conditions": {
"options": {
"version": 2,
"leftValue": "",
"caseSensitive": true,
"typeValidation": "strict"
},
"combinator": "and",
"conditions": [
{
"id": "14dc4b16-6592-41ca-a252-a82aa3abcaa4",
"operator": {
"type": "boolean",
"operation": "true",
"singleValue": true
},
"leftValue": "={{ $json.prerelease }}",
"rightValue": ""
}
]
}
},
"typeVersion": 2.2
},
{
"id": "5a737954-5eed-44fb-9ce9-d5036667b431",
"name": "限制",
"type": "n8n-nodes-base.limit",
"position": [
620,
-320
],
"parameters": {},
"typeVersion": 1
},
{
"id": "8605cae6-3be8-4e79-9ab7-f1adbfe0cbd4",
"name": "移除重复项",
"type": "n8n-nodes-base.removeDuplicates",
"position": [
840,
-220
],
"parameters": {
"options": {},
"operation": "removeItemsSeenInPreviousExecutions",
"dedupeValue": "={{ $json.name }}"
},
"typeVersion": 2
},
{
"id": "9a244465-1b0a-423c-8345-695e1b79a371",
"name": "获取发布版本",
"type": "n8n-nodes-base.httpRequest",
"position": [
180,
-320
],
"parameters": {
"url": "https://api.github.com/repos/n8n-io/n8n/releases",
"options": {},
"sendQuery": true,
"queryParameters": {
"parameters": [
{
"name": "per_page",
"value": "10"
}
]
}
},
"notesInFlow": true,
"typeVersion": 4.2
},
{
"id": "ee7f6381-80a2-40c9-adf5-6d9b12ccf4bc",
"name": "自动更新最新发布版本",
"type": "n8n-nodes-base.scheduleTrigger",
"disabled": true,
"position": [
400,
-120
],
"parameters": {
"rule": {
"interval": [
{
"field": "hours"
}
]
}
},
"notesInFlow": true,
"typeVersion": 1.2
},
{
"id": "822e9e48-cbc2-40f0-b54f-91b873146a82",
"name": "自动更新测试版发布版本",
"type": "n8n-nodes-base.scheduleTrigger",
"position": [
-40,
-320
],
"parameters": {
"rule": {
"interval": [
{}
]
}
},
"notesInFlow": true,
"typeVersion": 1.2
}
],
"connections": {
"Limit": {
"main": [
[
{
"node": "Remove Duplicates",
"type": "main",
"index": 0
}
]
]
},
"Deploy": {
"main": [
[]
]
},
"Filter": {
"main": [
[
{
"node": "Limit",
"type": "main",
"index": 0
}
]
]
},
"Update ENV": {
"main": [
[
{
"node": "Deploy",
"type": "main",
"index": 0
}
]
]
},
"Get Release": {
"main": [
[
{
"node": "Remove Duplicates",
"type": "main",
"index": 0
}
]
]
},
"Get Releases": {
"main": [
[
{
"node": "Filter",
"type": "main",
"index": 0
}
]
]
},
"Remove Duplicates": {
"main": [
[
{
"node": "Update ENV",
"type": "main",
"index": 0
}
]
]
},
"Auto Update Beta Release": {
"main": [
[
{
"node": "Get Releases",
"type": "main",
"index": 0
}
]
]
},
"Auto Update Latest Release": {
"main": [
[
{
"node": "Get Release",
"type": "main",
"index": 0
}
]
]
}
}
}常见问题
如何使用这个工作流?
复制上方的 JSON 配置代码,在您的 n8n 实例中创建新工作流并选择「从 JSON 导入」,粘贴配置后根据需要修改凭证设置即可。
这个工作流适合什么场景?
中级 - 开发运维
需要付费吗?
本工作流完全免费,您可以直接导入使用。但请注意,工作流中使用的第三方服务(如 OpenAI API)可能需要您自行付费。
相关工作流推荐
在可视化参考库中探索n8n节点
在可视化参考库中探索n8n节点
If
Ftp
Set
+93
113 节点I versus AI
其他
使用Google Maps生成潜在客户 - AlexK1919
使用Google Maps生成潜在客户
If
Set
Code
+13
42 节点Alex Kim
销售
源发现 - 自动搜索更及时的信息源
多平台源发现系统,集成 SerpAPI、DuckDuckGo、GitHub、Reddit 和 Bluesky
Set
Code
Limit
+18
68 节点Hybroht
市场调研
灵活新闻聚合器 - 多源集成、AI分析和可设置频道
多源新闻策展系统,集成Mistral AI分析、摘要和自定义频道
If
Set
Xml
+32
120 节点Hybroht
内容创作
将您的工作流保存到 GitHub 仓库
每日工作流备份至 GitHub 并发送 Slack 通知
If
N8n
Set
+10
18 节点Andrew
开发运维
Docker注册表清理工作流
Docker注册表清理工作流
Set
Ssh
Code
+6
16 节点Muzaffer AKYIL
工程