Generate dynamic JSON output formats for AI agents with Mistral
Needs changesWhat this workflow does
This AI workflow has 19 nodes and runs manually, when you click “Execute workflow”. Along the way it connects Mistral Cloud Chat Model and Advanced Output Parser (community).
How it runs
Trigger: Manually, when you click “Execute workflow”.
- Prepare Input (Edit Fields (Set)): sets 5 fields: input, correction_required, last_json_format_attempt…
- Guarantee Input (Edit Fields (Set)): sets 4 fields: input, correction_required, last_json_format_attempt…
- If: checks a condition and branches into true / false
- Round Limit Reached (Stop and Error): stops the run with an error
- Loop Until it Works (Loop Over Items (Split in Batches)): loops over the items in batches
- JSON Generator (AI Agent): runs an AI agent, with model: Mistral Cloud Chat Model; output parser: JSON Output Parser
- JSON Validator (AI Agent): runs an AI agent, with model: Mistral Cloud Chat Model; output parser: JSON Output Parser
- If: checks a condition and branches into true / false
- JSON Reviewer (AI Agent): runs an AI agent, with model: Mistral Cloud Chat Model; output parser: Advanced JSON Output Parser
- Update Input (Edit Fields (Set)): sets 4 fields: input, correction_required, last_json_format_attempt…
…plus 2 more steps. See the full node list below.
Services it uses
Before you upgrade to n8n 3.0
1 thing in this workflow is removed in n8n 3.0. Fix it before you upgrade:
- AI Agent v1 (old agent modes) in JSON Generator (v1.6), JSON Validator (v1.6), JSON Reviewer (v1.6): replace with Latest AI Agent node (Tools Agent). For SQL Agent, use a Postgres or MySQL tool with a recent AI Agent.
Rather not rewrite it? Many of these flows can be rebuilt in Make (free plan).
| Removed in 3.0 | Replace with |
|---|---|
| AI Agent v1 (old agent modes) JSON Generator (v1.6), JSON Validator (v1.6), JSON Reviewer (v1.6) | Latest AI Agent node (Tools Agent). For SQL Agent, use a Postgres or MySQL tool with a recent AI Agent. |
Nodes used (10)
- Mistral Cloud Chat Model
@n8n/n8n-nodes-langchain.lmChatMistralCloud - Structured Output Parser
@n8n/n8n-nodes-langchain.outputParserStructured - AI Agent
@n8n/n8n-nodes-langchain.agent - Manual Trigger
n8n-nodes-base.manualTrigger - Edit Fields (Set)
n8n-nodes-base.set - Loop Over Items (Split in Batches)
n8n-nodes-base.splitInBatches - If
n8n-nodes-base.if - Advanced Output Parser
n8n-nodes-advanced-output-parser.advancedOutputParser - No Operation, do nothing
n8n-nodes-base.noOp - Stop and Error
n8n-nodes-base.stopAndError
From the author
This workflow contains community nodes that are only compatible with the self-hosted version of n8n. JSON Architect - Dynamically Generate JSON Output Formats for Any AI Agent Overview Version: 1.0 The JSON Architect Workflow is designed to instruct AI agents…