Python script through `execute command`


Im using execute command to run python script, works well as expected, but i didn’t find way to dyanmically get stdout from execute command node.

I have to wait for the execute command pass to get the stdout.

have you an idea ?


Hey @Jeremy_Bepoix, I am not sure I fully understand the question. What does your Execute Command output look like and what would you like it to be instead?

My execute command looks like :
py -3.9 path/to/ looks like :

<code stuff>
<code stuff>
<code stuff>

output looks good :
exit : 0, stderr:0, stdout:"exemple_print_a, exemple_print_b, exemple_print_c"

BUT, i have to wait the end of execute command process to get all print.
isn’t dynamic

So you’d like the Execute Command node to trigger the workflow execution each time it prints something to stdout? That’s unfortunately not how the node works, it would wait for the respective command to finish.

If you control the script you could consider sending a simple webhook to n8n’s webhook node instead each time it would usually print something. That way, you could trigger a new workflow execution immediately for each webhook.

1 Like

okay, i’ll try another way.