Hi,
There is a bug in the structured output parser. Even a basic example will outline this.
I simply connected the structured output (with the default JSON schema) to a AI Agent block and ran the text ‘What is the best place to buy properties?’ and it dies in error.
Upon closer investigation it seems Open AI has passed the correct response back and in the correct format. But n8n doesn’t recognise it and it sends it back to OpenAI to redo.
The AI is actually so smart that it simply removes the structured output format and goes back to the original JSON of action / action_input.
What is the error message (if any)?
ERROR: Failed to parse. Text: “The best place to buy properties can vary widely depending on various factors. However, an example of a potentially good place to buy could be California, more specifically cities like Los Angeles, San Francisco, and San Diego.”. Error: Error: Failed to parse. Text: “The best place to buy properties can vary widely depending on various factors. However, an example of a potentially good place to buy could be California, more specifically cities like Los Angeles, San Francisco, and San Diego.”. Error: SyntaxError: Unexpected token T in JSON at position 0
Please share your workflow
Share the output returned by the last node
Information on your n8n setup
- n8n version: n8n@1.32.2
- Database (default: SQLite): cloud
- n8n EXECUTIONS_PROCESS setting (default: own, main): cloud
- Running n8n via (Docker, npm, n8n cloud, desktop app): cloud
- Operating system: cloud

