Simple Code Node should return value right?

I have a simple code node:

return { 'test' : 123 };

the previous node is the start node.

when i execute this node shouldn’t the output show the json?

Welcome to the community @autoMan !

Can you please always fill template instead of simply deleting it. We added it for a reason as the information in it is important to answer almost every question, and it so makes sure that we do no have to request that information evertime manually. Thanks!

To answer your question. We had at some older versions a bug that information did not get displayed (that is why the information in the template would now have been helpful). I tested with the latest version and for me it works fine. At least if set to Run Once for All Items. If set to "Run Once for Each Item` is set you can use:

return { 'json' : { test: 123 } };

But if also that does not work, are you sure that you executed the node?

sure thing…sorry for that…but the workflow is so simple I thought it was unnecessary.
I am not sure why but when I added a node from scratch and made the same code it worked.
Something so simple i thought it should work so at least i am on the right track…

Yes, that is the thing. It is hard for users to know when that information is important and when not. Sometimes even hard to us to know and often it turns out at a later point in the conversation that it is important. For that reason is it best to always have it available so that we have it when we needed it. Also makes sure that our users get help with their problems fast (we are able to ask more specific questions and get so to a solution faster, we do not waste time on asking for that information, and can rather spend it on things that matter and so answer more questions and help more people faster, …)

Great to hear that it seems to work now. Simply report back if the problem reappears and you can share a reproducible case so that we can debug.

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