Extract
The AI Agent's extract task: declare fields inline and pull them out of upstream text or an uploaded document with AI vision — results auto-saved with confidences.
Declare the fields you want — name, type, required — and the AI pulls them out of upstream text or an uploaded document (PDF or image, read with AI vision). No prompt writing: the fields are the contract.
Config
A fields table is the whole schema — one row per value to pull out.
- Extract from —
documentreads an uploaded file with AI vision (pair with a file upload trigger);textextracts from upstream text. - Fields to extract — one row per field: a name
(
borrower_name), a type (string/number/date/currency/boolean), and whether it's required. - Document type — optional label ("Invoice") stored on the saved extraction result.
Output
Slug-keyed fields, each with its value and provenance:
{ "fields": {
"invoice_number": { "value": "INV-2041", "confidence": 0.98, "page_number": 1 },
"total": { "value": 1250.00, "raw_value": "$1,250.00", "confidence": 0.95, "page_number": 2 }
},
"missing_required": [],
"document": { "filename": "invoice.pdf", "…": "…" } }
Downstream, reference {{ payload.fields.total.value }}. Any
required field the document doesn't contain lands in
missing_required — branch on it to route incomplete documents to
a human.
Document extractions auto-save their result — fields, confidences, source document, and run are persisted together, no separate save step needed.
Patterns
- Invoice intake — file upload → extract (number, total, due
date) → branch on
missing_required→ save to store. - Email parsing — email trigger → extract from text (order id, customer, issue) → look up the order.
Gotchas
- Types are enforced on the way out —
currencyreturns a number (raw_valuekeeps the original string),datenormalizes. - Extraction confidence is per-field: gate high-stakes automation
on it (
{{ payload.fields.total.confidence }}) rather than trusting every read.