If Node No Output even though Node Executed Successfully

I can’t figure out why I’m not getting any output from my IF Node. It shows that it’s running sucessfully but no output is passed when I execute the IF statement.

({
  "nodes": [
    {
      "parameters": {
        "conditions": {
          "options": {
            "caseSensitive": true,
            "leftValue": "",
            "typeValidation": "strict",
            "version": 2
          },
          "conditions": [
            {
              "id": "67005321-954e-4c3d-ae76-27fa056943b7",
              "leftValue": "={{ $json.meta.count > 0 }}",
              "rightValue": 0,
              "operator": {
                "type": "boolean",
                "operation": "true",
                "singleValue": true
              }
            }
          ],
          "combinator": "and"
        },
        "options": {}
      },
      "type": "n8n-nodes-base.if",
      "typeVersion": 2.2,
      "position": [
        1216,
        -688
      ],
      "id": "bd650e01-02d4-472e-a9fa-02df784c3791",
      "name": "If"
    }
  ],
  "connections": {
    "If": {
      "main": [
        [],
        []
      ]
    }
  },
  "pinData": {},
  "meta": {
    "templateCredsSetupCompleted": true,
    "instanceId": "7ddc5ba71ece2bc8e039aa93f200c517617c9549d4a6431f8d6baf3eb73fbb7d"
  }
}

Share the output returned by the last node

Output is blank, that’s the problem, nothing is passed on to the following nodes.

Information on your n8n setup

  • n8n version: online
  • Database (default: SQLite):
  • n8n EXECUTIONS_PROCESS setting (default: own, main):
  • Running n8n via (Docker, npm, n8n cloud, desktop app): n8n cloud
  • Operating system: windows 11

Hey @Renegade hope all is good. Welcome.

For me it does return output through a false branch

This is because $json.meta.count is not defined, since we have none of the previous nodes in your workflow. Would you like to add another node just before the If node and pin the data in it, so that we could take a look at the input?

The code you provided is the IF node itself, and without context it is hard to spot where the issue lies. But I have noticed that you are using an unnecessary logic by doing this:

if {{ $json.meta.count > 0 }} is boolean & true

Instead if meta.count item returns a number then use this:

if {{ $json.meta.count }} is a number & greater than ( 0 )

Note: This is the same logic with a different approach, but if you really need to stay at your first approach then from node settings toggle on ‘‘Always Output Data’’ which allows the node to return an item even if it’s empty.

The full workflow is too big to post here. I’m trying to recreate an existing Zapier workflow for my eCommerce site. Here’s what I noticed just now, even though I’m trying to test this IF step with Pinned data, if it’s on a Switch path that’s not green then the IF doesn’t run. I’m still new here so I’m not sure how to build and test all these pathways if the data doesn’t pass through while I’m building it.

Yeah I agree, this was an alternative boolean statement I tried just to see if something else would work - suggested by Claude AI lol.

This fails because you are trying to merge outputs of both IF branches - true and false with append mode.

Append mode makes the merge node to wait for both inputs

and there will never be both inputs after a binary check, as in nothing will be both true and false and the same time (quantum mechanics aside).

So is the issue that I can only build one path at a time where items are true?

This is how your workflow executes for me:

Please make sure not to expose any API Keys (or sensitive information) while sharing your code. Use the preformatted text section to put your code in instead.

if only one path shows, you do not need to merge, you have nothing to merge it to.

Here’s what I mean with the merge: Step 5: Merge User Data

Add a Merge node to combine the user data from both paths (existing user or newly created user):

Configuration:

  • Mode: Choose Merge by Position

  • Input 1: From IF node (True branch - existing user)

  • Input 2: From Create User node (False branch - new user)

This ensures the enrollment step always receives the correct user_id regardless of whether the user was found or created.

If I can only see the fields for one path during the build phase, the only way to build this out is to change the data to trigger the other path, I’m just confused on how anything can get done if I can’t see fields during the build.

Could you point me to what that is you are quoting, please?

That’s from my outline for the workflow I’m trying to create. I wanted to be clear on what I’m trying to accomplish with the merge, and why there would be data sometimes from one input and sometimes from a second.

Actually, I take that back. The Append mode doesn’t wait for all inputs, as the documentation suggests. Sorry about that.

When I execute your workflow I do get the output past the merge node (the only change I had to make is I removed the first node, and changed it to the Manual trigger.

I appreciate the help. Circling back, it appears athat I need to build out my workflow one path at a time, and that my if statement is going to continue to not show output even with pinned data if the upstream switch is selecting a different path. The issue I was trying to uncover is WHY I can’t test an if statement with pinned data that I was trying to use.

I was just hoping to pass the data down both the true and false pathways so I could continue to build the downstream nodes with upstream data as if each path were true.

I see, yes, when you “test” a node, the execution will try to run from scratch and will use pinned data where it is possible. If you need to test the “IF” statement, all you need to do is make it fail by changing pinned data, like so

And just like that you get to test the other branch of the If node.

Hey Jab - just trying to do the same approach - but when I go to edit the output I don’t have the same button on the IF node. Are you using a different version of n8n?

I did it in the HTTP Request node, where you have pinned some data.