Structured Output Parser node doesn’t allow expression. It has to be fixed value which is surprising as everything else can be variables.
My use case:
I am working on a n8n workflow that takes as input a system and user prompt and outputs the results from llm completion. I wanted to add structured responses available. For that I wanted my users to pass their JSON schema as input for me to use it in the node.
I think it would be beneficial to add this because:
It is beneficial for everyone who doesn’t want to duplicate workflows just because we define a different JSON Schema in output Parser.
Any resources to support this?
Are you willing to work on this?
I am not sure to have the knowledge to do so. I am only working with Python.
It’s baffling that this particular node doesn’t allow expressions. Everything in my workflows is parameterized and even driven by content. This one particular node breaks this powerful pattern.
I’m also willing to help out making this happen, e.g. by reviewing or contributing code changes as far as my nodeJS/javascript knowledge allows.
+1
New to n8n, very impressed with the platform - this missing ability very quickly surfaced as way out of order for the platform, and potentially critically important - as others have correctly noted.
Wonder if there is a deeper tech reason behind or they just forgot to flip the switch on the fields
I’m having the same problem. Having the ability to write an expression in the JSON schema of the Output Parse would solve a lot of headaches. It seems an easy implementation, too.
i just built a custom node that handles this. GitHub - volkovmqx/n8n-nodes-advanced-output-parser please test it out and create issues in github if there is problems. Note: this is not production ready, use at your own risk.