8
n8n 中文网amn8n.com

使用 n8n API 比较您的 n8n 版本与最新发布

中级

这是一个DevOps, Multimodal AI领域的自动化工作流,包含 9 个节点。主要使用 If, N8n, Code, Html, HttpRequest 等节点。 使用 n8n API 比较您的 n8n 版本与最新发布

前置要求
  • 可能需要目标 API 的认证凭证
工作流预览
可视化展示节点连接关系,支持缩放和平移
导出工作流
复制以下 JSON 配置到 n8n 导入,即可使用此工作流
{
  "meta": {
    "instanceId": "ad0113c344ee237399e44e9f11798b05baeb83a6196d514a9ae9d2ad71c3b5c9"
  },
  "nodes": [
    {
      "id": "e70dcb2b-184f-4eb1-a9e3-69b0c583d411",
      "name": "便签",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        2128,
        6544
      ],
      "parameters": {
        "color": 7,
        "width": 1936,
        "height": 928,
        "content": "# 🔑 通过 HTTP 请求测试您的 n8n 版本"
      },
      "typeVersion": 1
    },
    {
      "id": "588b400f-76c4-40fa-a488-fa63cabb783e",
      "name": "便签23",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1680,
        6544
      ],
      "parameters": {
        "width": 400,
        "height": 928,
        "content": ""
      },
      "typeVersion": 1
    },
    {
      "id": "9b890a79-1052-4bcc-a2d3-500e85ddb511",
      "name": "设置您的 n8n 凭据",
      "type": "n8n-nodes-base.n8n",
      "disabled": true,
      "position": [
        2432,
        7264
      ],
      "parameters": {
        "options": {},
        "resource": "execution",
        "operation": "get",
        "requestOptions": {}
      },
      "credentials": {
        "n8nApi": {
          "id": "fmmFU3Ale1HZvMIL",
          "name": "n8n account 2"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "3487da8d-0334-4a25-9fb2-c025677557d6",
      "name": "获取最新 n8n 版本",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        2656,
        6832
      ],
      "parameters": {
        "url": "https://docs.n8n.io/release-notes/",
        "options": {}
      },
      "typeVersion": 4.2
    },
    {
      "id": "4b4ae554-2376-4b2a-9a99-4815e532666d",
      "name": "获取您的 n8n 版本",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        3440,
        6992
      ],
      "parameters": {
        "url": "https://yourn8nurl.app.n8n.cloud/rest/settings",
        "options": {},
        "authentication": "predefinedCredentialType",
        "nodeCredentialType": "n8nApi"
      },
      "credentials": {
        "n8nApi": {
          "id": "fmmFU3Ale1HZvMIL",
          "name": "n8n account 2"
        }
      },
      "typeVersion": 4.2
    },
    {
      "id": "71face2b-d555-41e9-ad80-0128d6b56278",
      "name": "提取版本",
      "type": "n8n-nodes-base.html",
      "position": [
        2944,
        7120
      ],
      "parameters": {
        "options": {},
        "operation": "extractHtmlContent",
        "extractionValues": {
          "values": [
            {
              "key": "versions",
              "cssSelector": "h2:contains(\"n8n@\")"
            }
          ]
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "2b506d24-badc-4af6-8d40-27a7ec3336e8",
      "name": "清理值",
      "type": "n8n-nodes-base.code",
      "position": [
        3184,
        6816
      ],
      "parameters": {
        "jsCode": "// Strip \"n8n@\" prefix and trailing \"#\"\nconst raw = $json.versions || '';\nconst clean = raw.replace(/^n8n@/, '').replace(/#$/, '');\nreturn [{ version: clean }];\n"
      },
      "typeVersion": 2
    },
    {
      "id": "4c7d9901-72b8-4e22-836e-525c24400729",
      "name": "测试您的版本",
      "type": "n8n-nodes-base.if",
      "position": [
        3696,
        6832
      ],
      "parameters": {
        "options": {},
        "conditions": {
          "options": {
            "version": 2,
            "leftValue": "",
            "caseSensitive": true,
            "typeValidation": "strict"
          },
          "combinator": "and",
          "conditions": [
            {
              "id": "060eee63-3c1d-485f-bbcd-4d8b59579771",
              "operator": {
                "name": "filter.operator.equals",
                "type": "string",
                "operation": "equals"
              },
              "leftValue": "={{ $json.data.versionCli }}",
              "rightValue": "={{ $('Clean Value').item.json.version }}"
            }
          ]
        }
      },
      "typeVersion": 2.2
    },
    {
      "id": "eec0952b-c17b-4961-85d3-92146b64d488",
      "name": "便签55",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        2336,
        7008
      ],
      "parameters": {
        "color": 3,
        "width": 288,
        "height": 448,
        "content": "### 1️⃣ 设置 n8n API 凭据"
      },
      "typeVersion": 1
    }
  ],
  "pinData": {},
  "connections": {
    "Clean Value": {
      "main": [
        [
          {
            "node": "Get your n8n version",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Extract Version": {
      "main": [
        [
          {
            "node": "Clean Value",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get your n8n version": {
      "main": [
        [
          {
            "node": "Test your version",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get Most Recent n8n version": {
      "main": [
        [
          {
            "node": "Extract Version",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}
常见问题

如何使用这个工作流?

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

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

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

需要付费吗?

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

工作流信息
难度等级
中级
节点数量9
分类2
节点类型6
难度说明

适合有一定经验的用户,包含 6-15 个节点的中等复杂度工作流

作者
Robert Breen

Robert Breen

@rbreen

Professional services consultant with over 10 years of experience solving complex business problems across industries. I specialize in n8n and process automation—designing custom workflows that integrate tools like Google Calendar, Airtable, GPT, and internal systems. Whether you need to automate scheduling, sync data, or streamline operations, I build solutions that save time and drive results.

外部链接
在 n8n.io 查看

分享此工作流