Can't get data from a previous node, because another node is empty

Hi,
I’m experiencing a very strange issue: Screenshot by Lightshot
I have the Set node which is marked #1 in the image above. The Set node include a message I want to process.
I first process the message in the Airtable node (Marked as #2), searching for a match in airtable. If a match is found, the workflow is working correctly all the way to the end.

If a match isn’t found, the workflow should move to OpenAI and execute that module. However, OpenAI is failing with the following error:


For some reason, it’s not finding the processedMessage value- even though it exists on the Set Module.

Any help would be appreciated.

Hi @Tamir_Bashkin, I am very sorry you’re having trouble.

The “Missing pairedItem data” suggests one of the nodes between your Set node and the OpenAI node does not support the paired/linked item functionality allowing you to use expressions with .item. From looking at your screenshot this is most likely caused by the Code node (you can see on Built in methods and variables reference | n8n Docs that it doesn’t support .item).

Seeing you are only processing a single item in your workflow, perhaps you want to use {{ $('Set').first().json.processedMessage }} instead? This expression would not require support for paired/linked items.

1 Like

Hi,
I’ve made the change- it doesn’t fail now, but it also doesn’t process the message:

Not sure why this has been marked as spam by the forum.

Hm, perhaps you can share an example workflow using which your problem can be reproduced? I am not quite sure I fully understand it, so an example might help a lot here. Please reduce it as much as possible and only include the nodes absolutely necessary to reproduce your problem.

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