{
  "nodes": [
    {
      "id": "e70dcb2b-184f-4eb1-a9e3-69b0c583d411",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        2128,
        6544
      ],
      "parameters": {
        "color": 7,
        "width": 1936,
        "height": 928,
        "content": "# \ud83d\udd11 Test your n8n Version with HTTP Request\n\nThis workflow compares your **current n8n instance version** with the **latest release**.  \nTo make it work, you need to set up your **n8n API credentials**.\n"
      },
      "typeVersion": 1
    },
    {
      "id": "588b400f-76c4-40fa-a488-fa63cabb783e",
      "name": "Sticky Note23",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1680,
        6544
      ],
      "parameters": {
        "width": 400,
        "height": 928,
        "content": "\n\n## \u2699\ufe0f Setup Instructions\n\n### 1\ufe0f\u20e3 Set Up n8n API Credentials\n1. In your **n8n instance** \u2192 go to **Admin Panel \u2192 API**  \n2. Copy your **API Key**  \n3. In **n8n \u2192 Credentials \u2192 New \u2192 n8n API**  \n   - Paste the API Key  \n   - Save it  \n4. Attach this credential to the **n8n node** (`Set up your n8n credentials`)  \n\n---\n\n## \u2705 How It Works\n- **Get Most Recent n8n Version** \u2192 Fetches the latest release info from docs.n8n.io  \n- **Extract Version + Clean Value** \u2192 Parses the version string  \n- **Get your n8n version** \u2192 Reads the version of your own instance via API  \n- **Compare** \u2192 Checks if your instance is up-to-date  \n\n---\n\n## \ud83d\udcec Contact\nNeed help setting up API credentials or running this workflow?\n\n- \ud83d\udce7 **robert@ynteractive.com**  \n- \ud83d\udd17 **[Robert Breen](https://www.linkedin.com/in/robert-breen-29429625/)**  \n- \ud83c\udf10 **[ynteractive.com](https://ynteractive.com)**\n"
      },
      "typeVersion": 1
    },
    {
      "id": "9b890a79-1052-4bcc-a2d3-500e85ddb511",
      "name": "Set up your n8n credentials",
      "type": "n8n-nodes-base.n8n",
      "disabled": true,
      "position": [
        2432,
        7264
      ],
      "parameters": {
        "options": {},
        "resource": "execution",
        "operation": "get",
        "requestOptions": {}
      },
      "credentials": {
        "n8nApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "3487da8d-0334-4a25-9fb2-c025677557d6",
      "name": "Get Most Recent n8n version",
      "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": "Get your n8n version",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        3440,
        6992
      ],
      "parameters": {
        "url": "https://yourn8nurl.app.n8n.cloud/rest/settings",
        "options": {},
        "authentication": "predefinedCredentialType",
        "nodeCredentialType": "n8nApi"
      },
      "credentials": {
        "n8nApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 4.2
    },
    {
      "id": "71face2b-d555-41e9-ad80-0128d6b56278",
      "name": "Extract Version",
      "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": "Clean Value",
      "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": "Test your version",
      "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": "Sticky Note55",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        2336,
        7008
      ],
      "parameters": {
        "color": 3,
        "width": 288,
        "height": 448,
        "content": "### 1\ufe0f\u20e3 Set Up n8n API Credentials\n1. In your **n8n instance** \u2192 go to **Admin Panel \u2192 API**  \n2. Copy your **API Key**  \n3. In **n8n \u2192 Credentials \u2192 New \u2192 n8n API**  \n   - Paste the API Key  \n   - Save it  \n4. Attach this credential to the **n8n node** (`Set up your n8n credentials`)  \n"
      },
      "typeVersion": 1
    }
  ],
  "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
          }
        ]
      ]
    }
  }
}