I’m building a workflow that takes CSV data, passes it through an LLM, and adds two new fields (score and rationale) back to the output. The workflow runs fine in the app, but the CSV export is combining these fields instead of placing them in separate columns.
This usually happens when the workflow is still treating your structured output as a single JSON object instead of separate mapped fields during the export step.
Even though your LLM is correctly returning:
{
"score": 5,
"rationale": "..."
}
the CSV exporter in many workflow tools (including Dify setups) won’t automatically “flatten” that object unless you explicitly map the fields in the Output node.
What typically fixes it:
In your Output Block, don’t pass the whole structured object
Instead, reference each field individually, e.g.:
rationale → {{llm.rationale}}
score → {{llm.score}}
If you only pass something like {{llm.output}}, it will stay bundled as JSON and end up in a single CSV column.
Also worth checking:
Whether “structured output” is enabled only for parsing, not for export formatting
Whether you need a “flatten / transform variables” step before output
I’ve seen a similar workaround explained on a helpful reference website here:
Once the fields are explicitly mapped in the output layer, the CSV export should generate proper separate columns like you expect.