This one is a bit tricky to understand, but it is most certainly an annoying bug:
On a Set node, when accessing a value from a previous node, if connected to both ends of an IF node (EDIT: at least one of them directly), the Set node can’t display the value of the variable, resulting on an “[ERROR: Can’t get data for expression]” error. This does not affect the actual functionality of the workflow, only the variable preview.
See the following workflow:
After executing the previous workflow and clicking on the “Error on display” node, it shows the following error:
The “No error on display” node, however, doesn’t show the error, even though it is a copy of the “Error on display” node:
One thing to note is that if the “Error on display” node is not connected to one of the ends of the IF node, the bug is not reproducible:
In this case, after executing the workflow, the “Error on display” node shows the variable preview as expected:
EDIT: If the Set node that access the previous value is not directly connected to any of the ends of the IF node, the behavior is not reproducible:
Information on your n8n setup
n8n version: Reproducible on both 0.212.1 and 0.226.0
Hi @miguel-mconf, thanks for reporting this and sorry for the trouble! I’ll make sure to add this to our bug tracker.
As this is mainly a display issue (your workflow is still running after all), it may take a while to get it looked at, but we’ll make sure to post an update in this thread as soon as it’s resolved
Hi folks, I am so sorry for the trouble. I’ve brought this up once again with the engineering team seeing this is affecting multiple users and will get back to you once I get feedback on this.
Also facing the issue, whether it is a Switch or an If node, it’s very messy to get data from the nodes prior to those. Very difficult to build as such.
Using version 0.230.2
Thanks in advance!
Example here, getting Airtable keys from 6 nodes back with a Switch in the middle.
Hi folks, I am so sorry. Until this is fixed, can you try re-running the current node only (via the Execute node button)? This seems to fix the preview for me (thanks to @milorad for pointing this out).
I’ll do an example workflow that I can share.
Just a quick screenshot again, the data exists in the node.
I dragged and dropped it, and it gives the error
The airtable node is a list with a seach by formula. I’ve set it to “always send data”.
The next IF is checking whether or not a data field from that search action in Airtable exists, and the workflow develops accordingly.
In the workflow at the end of this message, I’ve reproduced this by having a code node, which sends a number if it’s event and an empty object if not, to mimic what the Airtable node send when it does not find a record.
Basically, when I run the workflow with the code node, it works well, with either an even or non event number in the trigger node.
But the Airtable node causes the workflow to fail if it does not find a record and sends an empty object.
Hi,
Following up, I managed a work around by using an HTTP request to Airtable’s API rather than using the Airtable node, which seems the one to blame for the issue in the end.
So at a guess you are going over multiple emails but what is likely happening is the paired item is getting lost when you get all labels and run the function node. What I would do is change your expression to $('Split').first().json.id as you will only ever have one item at a time in that node.
To anyone facing this issue. I guess is with new versions. I was using a really old n8n version and it was fine. Then I updated to v1 and got this error. Then I went back to the latest 0.2 version and still got this error. However, searching the web I got a temporary fix.
n8n is not recognizing the expression with .item
You need to switch to .first()
So, if the expression is {{ $(‘NocoDB’).item.json[‘Msg Left’] }} switch to {{ $(‘NocoDB’).first().json[‘Msg Left’] }} and it will work again.
Even tho the node is a duplicate of the node that has green expressions ! i don’t understand this bug and i did everything i could to find a work around !! please explain what to do