Code node not behaving as old FunctionItem node

Hello,

I’m creating a new workflow and using the new Code node and this is the first time I’m using after the update.

I’ve ran into some issues that I didn’t have before with the FunctionItem node. Here is an example of code working on FunctionItem but failing to work on Code Node.


I thought that something had changed and I’ve looked through the docs and the courses. And got it to work like this:

Is this an error of the new Code node or how is supposed to be?

Hi @domantis, yes, the code node is a bit stricter than its predecessors and that is by design I think. Unnamed values like you’d get from a return true; don’t really fit in the n8n data structure.

Sorry if this causes any trouble :frowning:. You should still be able to use the existing Function Item nodes in your workflows though.

Hello, thank you for the quick answer…

It doesn’t cause problems for now. I’ll just have to get used to this “new way”.

About the workflows that I have that uses the old Function/FunctionItem node will I have to migrate to the new Code node?

Your existing workflows including the Function and Function Item nodes should continue to work :slight_smile:

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