Hey n8n Community,
I am building a lot of flows at the moment that make LLM calls somewhere in the middle, and the thing that keeps getting in my way is the output. You ask for JSON, and what comes back is usually close to JSON but not quite. After talking to a lot of other builders in the community, I realized this is something pretty much everyone runs into.
One run arrives wrapped in triple backticks. Another starts with “I’ll help you with that” before the object, so the parse dies on the first character. Sometimes the output key sits nested inside another output key. Sometimes the field is called output, sometimes text, sometimes response. A missing value shows up as an empty string, or null, or the literal text “null”.
And the usual safeguards do not fully solve it. We run the structured output parser with auto fixing and retry on fail and still hit intermittent format failures, and n8n’s own docs admit parsing is often unreliable with agents, suggesting you pipe the output into a second LLM chain just to clean up the first one.
So the chain grows. Strip the fences, parse, normalize types, check the fields that have to be there, retry when the shape is wrong. What helps me most is telling the model to return null when a value is absent and having one isMissing helper that catches real null, undefined, empty string, whitespace and the string “null”, but it is still four nodes of plumbing around one actual operation.
That is what my friends and I have been working on: you set up the AI task and its schema once on a platform outside n8n, then call it from a single node, and the output comes back in that shape every time with nothing to parse behind it.
Mostly I wanted to hear from the community whether something like this actually makes sense, and whether it would solve a real problem for other builders or if I am overthinking a problem that most of you have already worked around. If you would want to help shape it, feel free to reach out and I am happy to talk.
How much of your AI setup is actual work versus cleanup after the model?
Best,
Felix