i want to make my ia agent generate a json code so how ? i try too much
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:
You have to toggle the Require Specific Output Format switch in the node settings
Then connect a Structured Output Parser and give it an example JSON like this:
Keep in mind the AI can generate characters that break the json like ```
To fight this you might want to:
- Give it a strict prompt not to use special characters that might break the JSON
- Enable retries
- Enable error output and implement some kind of error handling process or at least send yourself a notification
This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.