Merge / IF data access

As I use custom runtime, the watchtower does not update my n8n container, hence I wanted to build a workflow within n8n itself to notify me about a new version, however, I’m having trouble with the merge and if blocks.
I got the two versions, latest, and current merged, but in the if I can’t access both values, only one.

What am I missing?

Here is the workflow:

{
  "name": "n8n self update",
  "nodes": [
    {
      "parameters": {},
      "name": "Start",
      "type": "n8n-nodes-base.start",
      "typeVersion": 1,
      "position": [
        250,
        300
      ]
    },
    {
      "parameters": {
        "url": "https://github.com/n8n-io/n8n/releases.atom"
      },
      "name": "RSS Feed Read",
      "type": "n8n-nodes-base.rssFeedRead",
      "typeVersion": 1,
      "position": [
        450,
        300
      ]
    },
    {
      "parameters": {
        "conditions": {
          "string": [
            {
              "value1": "={{$json[\"latest\"]}}",
              "operation": "notEqual",
              "value2": "={{$json[\"current\"]}}"
            }
          ]
        }
      },
      "name": "IF",
      "type": "n8n-nodes-base.if",
      "typeVersion": 1,
      "position": [
        1250,
        400
      ]
    },
    {
      "parameters": {
        "command": "n8n version | cut -f1 -d\" \" | tr / @"
      },
      "name": "Execute Command",
      "type": "n8n-nodes-base.executeCommand",
      "typeVersion": 1,
      "position": [
        650,
        500
      ]
    },
    {
      "parameters": {
        "keepOnlySet": true,
        "values": {
          "string": [
            {
              "name": "current",
              "value": "={{$json[\"stdout\"]}}"
            }
          ]
        },
        "options": {}
      },
      "name": "current version",
      "type": "n8n-nodes-base.set",
      "typeVersion": 1,
      "position": [
        850,
        500
      ]
    },
    {
      "parameters": {},
      "name": "Merge",
      "type": "n8n-nodes-base.merge",
      "typeVersion": 1,
      "position": [
        1050,
        400
      ]
    },
    {
      "parameters": {
        "command": "=echo \"{{$json[\"title\"]}}\""
      },
      "name": "array to item",
      "type": "n8n-nodes-base.executeCommand",
      "typeVersion": 1,
      "position": [
        650,
        300
      ]
    },
    {
      "parameters": {
        "keepOnlySet": true,
        "values": {
          "string": [
            {
              "name": "latest",
              "value": "={{$json[\"stdout\"]}}"
            }
          ]
        },
        "options": {}
      },
      "name": "latest version",
      "type": "n8n-nodes-base.set",
      "typeVersion": 1,
      "position": [
        850,
        300
      ]
    },
    {
      "parameters": {},
      "name": "NoOp",
      "type": "n8n-nodes-base.noOp",
      "typeVersion": 1,
      "position": [
        1450,
        490
      ]
    },
    {
      "parameters": {
        "message": "New version of n8n is avaible",
        "additionalFields": {
          "priority": 2
        }
      },
      "name": "Gotify",
      "type": "n8n-nodes-base.gotify",
      "typeVersion": 1,
      "position": [
        1450,
        300
      ],
      "credentials": {
        "gotifyApi": "gotify"
      }
    },
    {
      "parameters": {
        "triggerTimes": {
          "item": [
            {
              "hour": 6
            }
          ]
        }
      },
      "name": "Cron",
      "type": "n8n-nodes-base.cron",
      "typeVersion": 1,
      "position": [
        250,
        500
      ]
    }
  ],
  "connections": {
    "Start": {
      "main": [
        [
          {
            "node": "RSS Feed Read",
            "type": "main",
            "index": 0
          },
          {
            "node": "Execute Command",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Execute Command": {
      "main": [
        [
          {
            "node": "current version",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "RSS Feed Read": {
      "main": [
        [
          {
            "node": "array to item",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "current version": {
      "main": [
        [
          {
            "node": "Merge",
            "type": "main",
            "index": 1
          }
        ]
      ]
    },
    "Merge": {
      "main": [
        [
          {
            "node": "IF",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "array to item": {
      "main": [
        [
          {
            "node": "latest version",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "latest version": {
      "main": [
        [
          {
            "node": "Merge",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "IF": {
      "main": [
        [
          {
            "node": "Gotify",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "NoOp",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "NoOp": {
      "main": [
        []
      ]
    },
    "Cron": {
      "main": [
        [
          {
            "node": "RSS Feed Read",
            "type": "main",
            "index": 0
          },
          {
            "node": "Execute Command",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  },
  "active": false,
  "settings": {},
  "id": 8
}

Hey @user23!

In the Merge node, instead of using the Append mode, use the Merge By Index mode. This will correctly merge the data, which can then be referenced in the IF node.