Every day, companies generate invoices, contracts, delivery notes, emails, certificates and files that someone has to review, name and place in the right folder. In many SMEs that «someone» is a person who spends hours on a mechanical, error-prone task. Classifying documents with artificial intelligence transfers that burden to a system that reads, interprets and archives with sustained precision that manual work can rarely match. This article explains how the technology works, what variants exist, when it is worth implementing it and how to do so without significant risk.
Why manual document management no longer scales
The problem is not new, but it has worsened. According to data from the European document management sector, the volume of digital documents in organisations has grown by more than 60 % over the last five years, driven by process digitalisation, electronic invoicing and hybrid working. At the same time, retention and traceability obligations have tightened: the Anti-Fraud Law (Law 11/2021) and the Verifactu regulation require every issued invoice to be recorded and unaltered, while the GDPR obliges organisations to locate any document containing personal data within very short deadlines in response to an access or erasure request.
The practical result is that the administrative department loses time searching for documents in poorly organised folders, projects are delayed when a contract cannot be found, and quality or compliance departments struggle to prove which version of a procedure was in force on a given date. Manual classification fails not for lack of effort, but because the scale exceeds human capacity.
What an AI document classification system actually does
An AI document classification system performs, autonomously, four operations that were previously manual:
- Ingestion and conversion. The document arrives in any format (scanned PDF, Word, image, email) and the system converts it to text via OCR (optical character recognition) or extracts the digital text directly if it already has it.
- Content understanding. A language model or trained classifier reads the text and determines what type of document it is: invoice, contract, delivery note, payslip, certificate, quotation, administrative file, etc.
- Metadata extraction. The system identifies key fields: date, document number, supplier or customer, amount, project reference, accounting category. Those metadata are used to name the file and place it in the correct location.
- Filing and notification. The document is stored in the defined folder or repository, indexed for search and, where appropriate, the responsible person is notified or the next step in the workflow is triggered.
This entire process can be completed in seconds per document and executed continuously, without working hours or interruptions. At Summum IA we support companies in implementing this type of solution through our AI document classification service, adapting the architecture to the volume and type of documents in each organisation.
The technology behind automatic classification
Classic OCR versus AI-powered OCR
Traditional OCR converts images into text character by character, but struggles with poorly scanned documents, handwritten text or complex tables. Modern solutions use neural-network-based OCR (such as Microsoft Azure AI Document Intelligence or Google Document AI) that understands the visual structure of the document — not just the characters — and extracts tables, signatures and form fields with high precision even from low-quality documents.
Classification models and NLP
Once converted to text, the document is analysed with natural language processing (NLP) models. There are two main approaches:
- Custom-trained classifiers: a model is trained on examples of the company's own documents (invoices from regular suppliers, employment contracts, etc.). High precision within the specific domain, but requires labelled training data.
- Large language models (LLMs) with instructions: the model is told what categories exist and what criteria to apply. Works well without prior training data and adapts quickly to new categories. This is the most common approach in recent implementations because it requires no initial labelled corpus.
Entity and metadata extraction
To extract specific fields (date, amount, supplier VAT number), Named Entity Recognition (NER) techniques or structured prompts on LLMs are used. The result is a JSON object with the document's metadata that feeds directly into the company's document management system, ERP or CRM.
Types of documents that companies classify with AI
| Document type | Typical volume in SMEs | Preferred technology | Main benefit |
|---|---|---|---|
| Supplier invoices | High (daily) | AI OCR + NER extraction | Automatic bookkeeping and Verifactu compliance |
| Contracts and annexes | Medium (weekly) | LLM with categorisation | Fast retrieval, expiry alerts |
| Delivery notes and purchase orders | High (daily) | OCR + NER | Automatic matching with ERP orders |
| HR documentation (payslips, employment contracts) | Medium (monthly) | LLM + classifier | Secure filing with GDPR access control |
| Quality records and ISO reports | Low (occasional) | Trained classifier | Document traceability for audits |
| Emails with attachments | Very high (continuous) | LLM with intent detection | Reduction of disorganised inbox clutter |
How it integrates with existing systems
A common concern is whether implementing a document classification system requires replacing the ERP, file system or email platform. The short answer is no: modern systems are designed to connect to what already exists via APIs and standard integrations.
The most common connectors are:
- SharePoint and OneDrive (Microsoft 365): the document arrives in an input folder and the system processes and relocates it automatically to the correct folder structure.
- Google Drive: an equivalent flow via Google Cloud Functions or automation connectors such as n8n or Make.
- ERP (Odoo, Sage, SAP, Business Central): the extracted metadata are sent directly to the accounting or purchasing module to pre-fill the journal entry or purchase order.
- Email: the system monitors specific mailboxes, extracts attachments, classifies them and files them without human intervention.
- Network scanner: paper documents scanned over the network are processed as soon as they land in the input folder.
This ability to integrate with the existing ecosystem without major disruption is one of the strongest arguments for an SME to start automating document filing without having to replace its current tools.
The legal framework: GDPR, Verifactu and document retention
Document classification is not just an efficiency issue; it is also a compliance issue. Three legal frameworks directly affect how filing must be managed in a Spanish company:
GDPR and locating personal data
The General Data Protection Regulation (GDPR, EU Regulation 2016/679) requires organisations to respond to access, rectification or erasure requests within one month (extendable). This means being able to locate all documents containing a specific individual's data. With disorganised manual archives, this exercise can take days. With an AI classification system that indexes and tags every document upon arrival, the search takes seconds. The Spanish Data Protection Agency (AEPD) has published specific guides on managing documents with personal data that should be consulted when defining classification categories and access levels.
Verifactu and invoice integrity
The Verifactu system, regulated by Royal Decree 1007/2023 and its implementing rules, requires invoicing systems to record every invoice in an unaltered form with cryptographic chaining. Although Verifactu applies to invoicing software, the subsequent filing of those invoices must preserve their integrity. A well-implemented document classification system preserves the original document unmodified and logs every access and movement, facilitating tax audits.
Legal retention periods
Spanish commercial and tax legislation establishes retention periods ranging from four years (tax obligations, under the General Tax Law) to six years for accounting books (Commercial Code, art. 30) or even longer for employment and health-and-safety matters. An AI classification system can automatically assign the correct retention policy to each document based on its type, and alert when a document is approaching its authorised destruction date or, conversely, is being kept longer than necessary (which can itself be a GDPR infringement).
Steps to implement AI document classification in an SME
The process is not complex, but it does require structure. These are the steps we typically follow at Summum IA when supporting a company through this project:
- Document inventory. Identify what types of documents the company generates and receives, in what volume and from which channels (email, scanner, supplier portal, ERP). This map defines the project scope.
- Taxonomy definition. Establish classification categories (document types, departments, projects, suppliers) and the target folder structure or metadata schema. This is the most important decision in the project: a poor taxonomy costs dearly later.
- Technology selection. Evaluate whether to use a market solution (Microsoft Azure AI Document Intelligence, Google Document AI, AWS Textract) or a more customised solution built on open-source models. For most SMEs, market solutions offer the best balance of cost, precision and time to implementation.
- Pilot with real documents. Before automating the entire flow, process a representative batch of real documents to measure the correct classification rate and identify cases where human review is needed. A 90–95 % accuracy rate in the pilot is a reasonable starting point before scaling.
- Integration with existing systems. Connect the classification system to SharePoint, the ERP or the current document manager. This is where process automation comes in: tools such as n8n allow the entire flow to be orchestrated without custom development.
- Residual human review. Define a queue of low-confidence documents that a human reviewer validates periodically. That feedback is used to improve the model over time.
- Training and adoption. The greatest risk is not technological but human: users continuing to save documents as they did before. Training and process change are as important as the technology.
If you would like to explore how to apply this process to your organisation, our AI document classification team can carry out an initial assessment with no commitment.
How much time and effort is actually saved
Figures vary widely depending on each company's starting point, but common patterns are observed across sector implementations. Companies with a medium-to-high volume of invoices and contracts (between 200 and 2,000 documents per month) typically recover between two and four hours of administrative work per day once the system is running smoothly. In companies with higher volumes or more dispersed documentation, the saving is proportionally greater.
The saving is not only in time. There is also a risk-avoidance component: invoices filed in the wrong folder that cannot be found when an audit arrives, expired contracts that nobody detected, personal data stored longer than permitted. That risk carries a potential cost that automation reduces significantly.
Frequently asked questions
Can an AI system classify paper documents?
Yes, as long as the paper documents are digitised via a scanner (network scanner, multifunction device or even a mobile phone camera at good resolution). The AI system receives the image, applies OCR to extract the text and then classifies the document in exactly the same way as a born-digital file. Scanner quality affects OCR precision: documents scanned at 300 dpi or above produce far better results than low-resolution photographs.
What happens when the system makes a classification error?
Every system has a margin of error, especially at the start. That is why a human review queue is always built in for documents whose classification has low confidence. The system shows the reviewer its decision and the reasoning behind it; the reviewer confirms or corrects it. That correction feeds back into the model, which improves progressively. Over time, the percentage of documents reaching manual review decreases and the system gains autonomy.
Is it GDPR-compliant to process documents containing personal data with AI?
Yes, with the right safeguards. Processing personal data with AI must be backed by a legitimate legal basis (typically legitimate interest of the controller or performance of a contract), recorded in the register of processing activities, and must comply with the principles of data minimisation and storage limitation. If processing is carried out in the cloud of a third-party provider, that provider acts as a data processor and a data processing agreement (DPA) must be signed. The AEPD has published specific guidance on the use of AI in data processing that should be reviewed before implementing the solution.
How long does it take to deploy an AI document classification system?
For an SME with a medium document volume and a relatively simple taxonomy (10–20 document types), a well-planned project can go live in four to eight weeks. The main bottleneck is usually the taxonomy definition and integration with existing systems, not the AI component itself. More complex solutions with multiple document sources, ERP integration and version management may require two to three months of implementation.
Does it work with documents in multiple languages?
Yes. Current OCR and language models support dozens of languages with high precision, including Spanish, English, French, Portuguese and German, among others. For companies operating in international markets and receiving documents in several languages, automatic classification is especially valuable because it does not require the human reviewer to know the document's language in order to assign it to the correct category.