Payroll firm in Madrid, 8 people
The daily batch, from 4 hours to 2 minutes
One person closed 20 to 30 documents a day (payslips, Modelo 190 and RNT) in 3 to 4 hours. The same batch now closes in 2 minutes of human review.
Results at a glance
- Daily batch time
- 3-4 h → 2 min
- Human review
- 100% of the batch
- In production
- 4 weeks, since early 2025
Results from this workflow, not a forecast for every implementation.
What changed
Before
One person digitized, validated and processed the batch by hand. A new payslip layout or a 30 or 40 page Modelo 190 broke the rhythm. 80% of the errors were misaligned rows or missing keys.
After
OCR, a JSON schema, and a NIF match against the firm’s database. The person only reviews the document and the fields. Excel comes out normalized, rows grouped by NIF. No new document type has had to be added.
Context
A payroll firm in Madrid, 8 people. They handle labor regulation for their clients: IRPF, registrations and deregistrations, payslips and the rest of the cycle. Their focus is labor control.
Implementation details
- Complete extraction
- 80% error → 98%
- Volume
- 20-30 docs/day, ~2,500/month
- Pages
- Between 2 and 40 pages
The workflow
They arrive in many formats
Payslips, Modelo 190 and RNT, with irregular layouts and very different lengths.
OCR and extraction
The document is read and the defined fields are extracted into a stable JSON schema.
Match against the database
A webhook compares NIF and worker data with the firm’s database.
Human review
A screen with the document and the extracted fields. The client validates or corrects.
Controlled output
A copy to the client’s OneDrive and an Excel file in the layout they defined.
Defined retention
Deleted from Minervaly at 90 days. Full deletion at 365. OneDrive and Excel stay with the client.
Documents
Payslips
The layout changes by issuer. Documents in the batch run between 2 and 40 pages; each variant does not need retraining.
Modelo 190
Annual withholding summary. Can run to 30 or 40 pages.
RNT
Nominal list of workers. Dense structure, meant to be read by people and by systems.
Fields extracted
The schema covers what these documents already carry. Examples:
- Worker NIF
- Worker name
- Company NIF / CIF
- Legal name
- Address
- Settlement period
- Gross salary
- Net salary
- IRPF and other withholdings
- Hours
- Contribution bases
- Social Security affiliation number
- Income key (190)
- Accumulated income and withholdings (190)
Control, not a black box
Review sits with the client
The firm validates every batch. The screen shows the original document and the extracted fields, side by side.
The client’s Excel
Layout they defined. Normalized rows grouped by NIF.
Their OneDrive tenant
The validated copy goes to the firm’s OneDrive, not a generic Minerva store.
Deletion at 90 and 365 days
On Minervaly, deleted at 90 days. Full deletion at 365. Both windows are user-defined. OneDrive and Excel stay in their tenant.

