Data and decisions
Most workflows are more than a chain of AI steps. They receive data — an order, a product record, a price list, the JSON answer of an AI model — and they decide: which field to use, what a total comes to, whether a photo is good enough to spend credits on, which of three languages to deliver, whether the result may leave the building. This section explains how Madoo does both, deterministically and at no cost: none of the nodes on these pages calls an AI model, so none of them consumes credits.
Two ideas run through every page.
Values are typed and never converted behind your back. A number is a number, a boolean is true or false,
and a JSON document stays a JSON document. The text "2" is not the number 2, and "19,90" is not 19.90 unless
you say which language the file is written in. A wrong type stops the workflow with a message that names it,
instead of producing a plausible wrong result — a price that is off by a factor of a hundred is worse than an error.
A decision decides what runs. When a filter rejects a value, the branch that needed it does not run: its nodes are skipped, they cost nothing, and their outputs are reported as absent. That is how a workflow checks a cheap condition before an expensive step, offers an option such as “add subtitles”, or lets a quality gate hold back a result.
Where to go
Section titled “Where to go”| Your task | Read |
|---|---|
| Understand the types, the inputs that carry them, and why nothing is converted | Values and types |
| Read one field of a JSON document — an order, a record, an AI answer in JSON | Reading JSON |
| Turn a text that holds JSON (a model’s answer, a CSV field) into JSON, and check it | Reading JSON — Parse JSON |
| Build a JSON document from values of other steps — a keyframe map, a webhook body — without writing quotes by hand | Building JSON |
| Read an Excel workbook, a CSV or a JSON array and process it row by row | Spreadsheets and datasets |
| Check JSON from an AI step, a supplier or a webhook against a contract; know what Madoo’s JSON ports contain | Schemas and contracts |
| Receive a package of files whose number varies, each with its role — photos, press kits, product images | Asset bundles |
| Compute totals, VAT, discounts, deposits, sums and averages exactly — and dates: an end, a deadline, the days to an event | Calculating |
| Run a step only when a condition holds; combine conditions; do one thing or another | Deciding |
| Decide on content that is not structured — a photo, a message, a document — with a model that answers yes/no, a choice or a score with a probability (a few thousandths of a credit) | Decisions with a model |
| Deliver one of several versions — a language, a category, a format — chosen by a key | Choosing |
| Hold a result back until measured checks pass — resolution, loudness, format — with a report of why | Quality checks |
| Understand why a node was skipped; optional inputs versus branches a decision cut | Branches and absence |
| A workflow is refused, a node fails, an output is absent or a value is wrong | Troubleshooting |
Complete workflows that combine these techniques with AI steps on real jobs are in Examples.
The labs of these pages are small workflows you can install and run with an API key, at no cost; each page shows its lab’s graph and what the reference run returned.