Switch and If node seem not properly working

Describe the problem/error/question

I am using the Switch node (before I’ve also used the If node, and same problem), basically I have made a function inside the Value1 as expression, following this post I made some month ago (Using Expression route in Switch node - #2 by Gabriele_Bracciali)
I am checking 2 number, x < y ? continue : exit
when the condition needs to exit it basically doesn t return any output and the workflow stop it

What is the error message (if any)?

Please share your workflow

Share the output returned by the last node

Information on your n8n setup

  • n8n version: 0.231.3
  • Running n8n via self-hosted:

Hey @Gabriele_Bracciali,

Can you share the JSON output of Set offset and get list2 so we can do some testing?

Hi @Jon , thank you for replying me.
So the first run the output of the nodes wil be:
Set offset: empty item
get list2:
“count”: 235

This workflow work like:
Obtain a list from A, obtain a FULL list from B, need to match list A with FULL list in B

But maybe I’ve found a solution doing like this:

{{ $(‘Set offset’).first().json[“offset”] || 0 < $(‘get list2’).first().json[“count”] ? “continue”: “exit” }}

Cause the problem was the first run, when the “Set offset” output was undefined


This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.