Structured Output Parser don't accept expression

Hi, there is a way to have Structured Output Parser node to receive the json/schema with a expression?

3 Likes

It looks like your topic is missing some important information. Could you provide the following if applicable.

  • n8n version:
  • Database (default: SQLite):
  • n8n EXECUTIONS_PROCESS setting (default: own, main):
  • Running n8n via (Docker, npm, n8n cloud, desktop app):
  • Operating system:

Welcome to the community @Douglas_Rossignolli !

Tip for sharing information

Pasting your n8n workflow


Ensure to copy your n8n workflow and paste it in the code block, that is in between the pairs of triple backticks, which also could be achieved by clicking </> (preformatted text) in the editor and pasting in your workflow.

```
<your workflow>
```

That implies to any JSON output you would like to share with us.

Make sure that you have removed any sensitive information from your workflow and include dummy or pinned data with it!


Could you share the workfloiw you have tried already and provide more details into what you are looking for with some examples perhaps?

This is an possible example

Do you think there is an alternative?

Hello @Douglas_Rossignolli,

I have the same need, did you find a workaround ?

Thank you,
Paul

2 Likes

Hey @Douglas_Rossignolli , thanks for the example. You are right, you cannot use expressions in Output Parser sub-node. The sub-nodes cannot “see” anything outside its parent node. I’m afraid currently there is no alternative.

You could raise a Feature Request.

1 Like

Hey ihortom!!
I’ve just upvoted the feature request made by Paul and have a question here.
On the latest versions it was possible to write expressions on Output Parser and it helped a lot to craft more complex business rules workflows with AI Agents.

The main thing for my case is on the “enum” possibilities that can vary a lot depending on the user request and the alternative is to start replicating hundred of nodes and workflows to comprehend all possible “enum” scenarios.
Would be possible for you to throw a word for more people at n8n and maybe rollback this change?
Tks a lot!!