The idea is:
Add native support for structured output when using Gemini models in n8n (e.g., enforcing JSON schema or typed responses instead of free-form text).
My use case:
I am building workflows that rely on predictable, machine-readable outputs (e.g., JSON objects with fixed fields). Currently, Gemini responses in n8n are unstructured, which requires additional parsing and error handling. I want to define a schema (e.g., via JSON schema or similar) and have the model reliably return data in that format.
I think it would be beneficial to add this because:
Reduces post-processing and parsing complexity
Improves reliability of downstream nodes
Aligns with existing structured output capabilities in Gemini APIs and libraries
Enables more robust automation workflows in n8n
Any resources to support this?
ChatGoogleGenerativeAI integration - Docs by LangChain Structured outputs | Gemini API | Google AI for Developers
Are you willing to work on this?
I can help test the feature and provide feedback, but I am not currently able to implement it myself.