Return in Execute command

with the execute comand node
i run a python program which returns a json with a return

however in the output of the node I find only:

is there any way to output the json returned by the python function?

Thank you

Hey @marco.fucito,

How is your Python script outputting the json? There are a couple of options I can think of like writing to a file or using stdout.

If your script is just returning it won’t work as there is no output as such for n8n to use, what happens is n8n runs the script like the OS would so you would have to treat anything as a console based application.

Hopefully this helps.

I would like to build some API
with processing done by a python program

the output of the python program is an array containing various urls
which I would like to be the result of the GET call

How would you recommend to proceed?

thank you

Hey @marco.fucito,

How are you outputting the data in your script? Have you tried using a print() at the end?