Issue in "IF conditions"

Hi dear @jan

As bellow image my “IF” result should be “false” while it goes “true”?!

Could you please help me to solve it or You think it is bug on 0.40 version of n8n?

Best regards;

Nothing on the IF-Node changed, so have no idea why it would have broke. I just tested and it works perfectly for me:

{
  "nodes": [
    {
      "parameters": {
        "functionCode": "return [\n  {\n    json: {\n      name: 'test',\n      valule: 100\n    }\n  }\n];"
      },
      "name": "Function",
      "type": "n8n-nodes-base.function",
      "typeVersion": 1,
      "position": [
        500,
        400
      ]
    },
    {
      "parameters": {
        "conditions": {
          "number": [
            {
              "value1": "={{$node[\"Function\"].data[\"valule\"]}}",
              "operation": "larger"
            },
            {
              "value1": "={{$node[\"Function\"].data[\"valule\"]}}",
              "value2": 98
            }
          ]
        }
      },
      "name": "IF",
      "type": "n8n-nodes-base.if",
      "typeVersion": 1,
      "position": [
        650,
        400
      ]
    }
  ],
  "connections": {
    "Function": {
      "main": [
        [
          {
            "node": "IF",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}

So I guess what is happening in your case is that you have multiple items. The first one has a value of “100” and will so end up in the false branch. The other one is having a value between 0 and 98 and ends up so in the true branch. That would probably be clearer if you would have at least left that information in the screenshot as it would have been important. Also, a screenshot of “false” being selected as output would make that clearer.

Anyway, that is the only explanation I would have and can think of unless you provide a workflow in which I can reproduce it. Then I would be happy to debug it.

It was so wired.
Like “Daddy Pig” I just restart n8n on my server (windows) and the problem is solved.
I’m so sorry.

Very strange! Glad to hear that it “solved itself” but would still like to know what was going on there! Especially because I am surprised that a restart would “repair” it especially because each workflow gets started in a totally new process anyway which is kind of a “restart” in itself.

Hi dear @jan
Unfortunately I have same problem again.

My second condition is true

Sadly can still not do anything without an example that I can reproduce the problem.

Are both of the same type? So are both strings or both numbers?
Because “750254796” is NOT 750254796

You right.
The problem was because of Webhook variables.

Now my question is that how can I send numbers as number via post feature in http request for my webhooks?

Great to hear that you found the problem!

Yes, if you use POST it should send numbers as numbers. Only when sending via the query-string like when doing a GET will everything be a string.