Automation library · AI assistants

Generate dynamic JSON output formats for AI agents

Started by an event in a connected app. It calls services over plain HTTP rather than through connectors. It hands the judgement calls to Mistral. 19 steps, 2 branches, 1 loop or waits: a working afternoon to understand properly.

MediumCalls a model: Mistral

19 stepsMedium: a working afternoon
2Branches: places the flow splits
1Loop or waits
0Services by connector: it calls them over plain HTTP

The flow

Starts it 1Model 7Logic 10Service 1

The steps in the order they run, from what starts it.

  1. 1Mistral Cloud Chat ModelLm Chat Mistral CloudModel
  2. 2JSON Output ParserOutput Parser StructuredModel
  3. 3JSON Output Parser 2Output Parser StructuredModel
  4. 4When clicking ‘Execute workflow’Manual triggerStarts it
  5. 5Mistral Cloud Chat Model 2Lm Chat Mistral CloudModel
  6. 6Advanced JSON Output ParserAdvanced Output ParserService
  7. 7JSON GeneratorAgentModel
  8. 8JSON ValidatorAgentModel
  9. 9Prepare InputSetLogic
  10. 10JSON ReviewerAgentModel
  11. 11If Valid JSONIfLogic
  12. 12Guarantee InputSetLogic
  13. 13JSON Format Works!No OpLogic
  14. 14Update Input 2SetLogic
  15. 15Update InputSetLogic
  16. 16If No More RoundsIfLogic
  17. 17Prepare OutputSetLogic
  18. 18Round Limit ReachedStop And ErrorLogic
  19. 19Loop Until it WorksSplit In BatchesLogic

How it's built

Starts on
An event in a connected app
Steps
19, with 2 branches, 1 loop or waits
Size
Medium: a working afternoon
Connects to
Nothing by connector; it calls services over plain HTTP
Model
Mistral

Questions

What does it need to run?

An n8n account, and a key for Mistral. You connect your own accounts after importing it; none are included.

What starts it?

It starts on an event in a connected app.

Does it use AI?

Yes. It calls Mistral. Model calls are billed by the provider, not by n8n.

How long does it take to set up?

Plan an afternoon. 19 steps is enough that you should read each one before running it.

How do I import it?

Copy the workflow, open a new workflow in n8n and paste. The steps appear on the canvas, ready for your own accounts.

Before you run it

Nothing here has been tested by us. It is somebody's working automation, read and described from its own steps. Treat the connections it wants as a list of accounts it will touch, and read the 19 steps before you point it at anything that matters.