I am using the n8n cloud version.
My workflow is pretty long, now i have a weird issue.
[Can’t determine which item to use] pops up in the middle of the workflow and does not allow me to take data from a node at the beginning any more. It only allows me to take data from the previous node
as it specificly asks for something from Code4 Node in the error message allthough the content of the code4 node is not even used at this stage i add the code here:
const ratings = $input.all().map((item) => item.json.Rating);
const result = [];
for (let i = 0; i < ratings.length; i += 2) {
const sum = ratings[i] + (ratings[i + 1] || 0);
result.push(sum);
}
return { result };
That’s the “issue”. Your code node configured in the “run once for all items” which breaks the item pairing. You can use the first().json property in the LLM node instead of the item.json to resolve the issue.