How to pass an entire JSON from a node to Execute command [object Object]

Hello,
I would like to pass the JSON response of a node, as an input parameter of a function inside the execute command block.

As in the following screenshots:

image

Clicking on Raw value I understand that it creates an object.
As I show from the screen, in output the preview shows me: [object Object]

  • What kind of object is it?

  • Can I input it as a parameter to a function in an execute command block?
    Such as: python3 main.py -a json_object

  • How should I read it? Do I have to decrypt it?

  • Or the only way to pass all the json as an input parameter to a function, is to pass it a .json file saved on disk? And so using first the “move binary data” → “write binary file”
    Like this:

A thousand thanks

The challenge that you are running into is that the node wants to pass an object while you require a string. If you use values rather than raw values, this should generate a concatenated string of values that can be passed to your EXECUTE node. It may still need to be modified but at least it will send you in the right direction.

1 Like

Thanks for the reply.
Unfortunately I cannot pass the JSON as a parameter because it contains spaces.

I found how to solve it:

  • first I transform raw value into string with JSON.stringify ()
  • then encode the result to eliminate annoying spaces and characters with encodeURI (). I don’t know why the base64 encode was giving problems

Like this: {{encodeURI(JSON.stringify($node[“Typeform Trigger”].json[“form_response”][“answers”]))}}

I was inspired by this post