TotalApp Docs

ETL / Parser Agent

The backend agent that turns unstructured input — inbound emails, free text, complex PDFs — into the exact JSON or Pydantic schema your systems expect, validated before anything is saved.

What Is the ETL / Parser Agent?

The ETL / Parser Agent is one of TotalApp's Core Agents. Its job is turning unstructured or semi-structured input — an inbound email, a copy-pasted block of free text, a scanned or complex PDF — into exactly the structured record your systems expect, whether that's defined as a JSON Schema or a Pydantic model.

Real-world input almost never arrives pre-shaped for a database. Rather than writing a bespoke parser for every inbound format (email body, PDF attachment, webhook payload), every screen and workflow node that needs this reuses the same agent: hand it raw text and a target schema, and it returns a validated, schema-conformant record — or a clear flag explaining what it couldn't confidently fill in.

In one sentence

Give the ETL / Parser Agent raw input and a target schema — it returns a validated record matching that schema exactly, or flags for review whatever it couldn't confidently extract.

How It Works — Extract, Then Validate

1. Extraction 2. Pre-Write Validation 3. Accept or Flag
PhaseWhat happens
1. ExtractionThe raw input — an email body, a scanned PDF, free-form text — is read against the target schema's field list. Every field the schema requires is searched for in the source content.
2. Pre-Write ValidationThe extracted record is checked against the schema's types, required fields, and constraints before it is ever handed to the next step in a pipeline. Nothing malformed reaches a table.
3. Accept or FlagA record that validates cleanly is passed on immediately. A record with a missing or ambiguous required field is routed to a review queue instead of being force-fit with a best guess.

Flags, never guesses

The agent is explicitly designed to never silently invent a value for a field it isn't confident about. An ambiguous or missing field is always surfaced for human review rather than filled in — this is what keeps downstream data trustworthy.

What It Handles

Any Input Format

Inbound emails, PDFs (including scanned documents), and free-form pasted text are all parsed against the same target schema — the agent doesn't care which format the input arrived in.

Pre-Write Validation

Type, required-field, and constraint checks run before any write. A record that doesn't validate is routed for human review instead of silently corrupting downstream data.

Flags, Never Guesses

Ambiguous or missing fields are surfaced for review instead of being filled with a best guess — the agent is deliberately conservative rather than generous.

Drop Into Any Workflow

Deploys as a node in the Workflow Editor — wire it after any inbound trigger (email, webhook, or file upload) to normalize input before it flows further.

Input & Output Contract

FieldMeaning
Raw ContentThe unstructured input to parse — an email body, PDF text, or free-form text block.
Target SchemaA JSON Schema or Pydantic model definition describing exactly the fields, types, and constraints the output record must satisfy.
extracted_recordThe structured record produced from the input, matching the target schema.
validation_statusWhether the record passed schema validation cleanly, or was routed to review.
flagged_fieldsWhich specific fields could not be confidently extracted and why (missing, ambiguous, or failed a constraint).

Where It Fits

The ETL / Parser Agent is typically the first step in any pipeline that ingests external, unstructured data — an inbound purchase order email, a scanned invoice, a lead capture form pasted from another system. It pairs naturally with the Reconciliation Agent for two-sided data matching once records are in a clean, schema-conformant shape, and can be wired into the Workflow Editor immediately after any inbound trigger node.

Frequently Asked Questions

What target schema formats are supported?
Both JSON Schema and Pydantic model definitions are supported — whichever your system already defines its data contracts in, the agent extracts against that same definition without requiring a separate mapping layer.
What happens to a record that fails validation?
It is never force-fit or discarded silently. It is routed to a review queue with the specific fields that were missing or ambiguous, so a human can complete or correct it before it re-enters the pipeline.
Can it read scanned PDFs, not just text-based ones?
Yes — scanned documents are handled alongside text-based PDFs, emails, and free-form text as equally valid input formats, all parsed against the same target schema.
How is this different from the Reconciliation Agent?
The ETL / Parser Agent's job ends once it has produced one validated, schema-conformant record from unstructured input. The Reconciliation Agent takes over from there when the task is comparing two already-structured data sets against each other for mismatches.