Skip to content

Invoice automation11 May 2026

Automating invoices with AI: what it does and what it doesn't

Xora Intelligence7 min read
A driver photographs a petrol station receipt with their phone inside the car

It's ten at night. The month's pile of invoices is on the kitchen table, with the Excel file open next to it. Nobody bills for those hours. But they get paid all the same.

Compulsory electronic invoicing in Spain is no longer optional. The Crea y Crece Law sets compulsory e-invoicing between companies and self-employed people operating in Spain, and in 2026 the regulation that develops it is already published in the official gazette (BOE). If you still handle your invoices manually (printing them, scanning them or typing them by hand into an Excel file), this article will interest you.

Invoice automation with artificial intelligence isn't only a way of complying with the rules: it is the way to get rid of administrative work that adds nothing and that you do yourself today. We explain how it works inside, what depends on what and where a person is still needed.

The problem: the time you lose handling invoices by hand

The invoice arrives by email. You download it. You check the VAT is right. You record it. You classify it. You send it to your accountant. You file it. A few minutes for each one. Multiply that by the ones that come in each month.

What matters isn't anyone's average: it's yours. Take last month's invoices, time yourself on five real ones (from start to finish, including finding the email where it was) and multiply by the total. That's the time it is costing you. It usually comes as a surprise.

And in most Spanish companies that work isn't done by an admin department, because there isn't one. According to the INE Central Business Register, on 1 January 2025, 54.4% of Spanish companies had no employees and 27.2% had one or two: together, 81.6% don't go beyond two employees. In more than half the companies in this country there is nobody to hand the paperwork to.

On top of that, manual errors carry an extra cost: VAT entered wrongly, an incorrect withholding or an unclassified expense can create accounting differences that the accountant has to correct, billing extra hours.

How invoice automation with AI and OCR works

1. Multichannel reception

The system accepts invoices in any format: PDF attached to an email, a photo from your phone, a scanned document, an e-invoice XML or a file received by EDI. It doesn't matter how the invoice arrives: the system processes it.

2. Intelligent data extraction (OCR + AI)

Intelligent OCR (Optical Character Recognition enhanced with AI) goes far beyond reading text. It identifies and extracts, in context:

  • Tax ID (NIF) of the issuer and the recipient
  • Invoice number and date
  • Taxable amount, VAT rates and withholdings (IRPF)
  • Items and detail lines
  • Due dates and payment terms

3. Automatic classification and validation

The AI classifies each invoice by configurable criteria: by supplier, by cost centre, by type of expense (utilities, professional services, office supplies, etc.) and by tax deductibility. If it detects an anomaly (an unusual amount, an unfamiliar supplier, a date out of range), it flags it for human review.

That last part is what makes the system reliable: it doesn't try to be right every time, it tries to know when it isn't sure and tell you. A strange invoice that jumps to review costs a minute. A strange invoice that slips through, you pay twice.

4. Integration with your accountant

The system automatically bundles the period's invoices, exports them in the format your accountant needs (A3, Contaplus, Holded, SII format for the tax agency AEAT) and sends them directly. Your accountant receives a tidy, classified, error-free package and spends their hours on what they know how to do instead of keying in data. If that is exactly the step that interests you (stopping typing up the invoices you send your accountant every month), we cover it in how to stop typing invoices for your accountant.

Compulsory e-invoicing in Spain 2026: what you need to know

The Law 18/2022 (Ley Crea y Crece) sets compulsory electronic invoicing between Spanish companies and self-employed people. The regulation that develops it now exists: Royal Decree 238/2026 of 25 March, published in the BOE of 31 March 2026.

Two things in that royal decree are worth reading calmly:

  • The countdown hasn't started yet. The regulation comes into force twenty days after its publication, but its actual application is deferred until the ministerial order regulating the public invoicing solution is issued.
  • The adaptation deadlines are staggered: twelve months for the companies with the highest turnover (the exact threshold is set by the royal decree itself, in its text) and twenty-four months for all other companies and the self-employed. That is: if you are self-employed or an SME, it isn't for tomorrow, but it isn't a rumour either.

An e-invoice is not just a PDF. It requires a structured format (Facturae XML or UBL) with a valid electronic signature. Xora Intelligence's automation systems are compatible with the formats required by the AEAT and with the VERI*FACTU integrity verification system. Note that Verifactu is a separate obligation, with its own timetable, that regulates the program you issue invoices with. We explain it in Verifactu, the obligation from 2027.

Invoice automation tools for SMEs in Spain

The market has options for every size. The most used in 2026:

  • Holded: a complete Spanish ERP (invoicing, accounting, CRM). A good option for SMEs starting from zero and not dragging along any previous system.
  • Billin: includes expense OCR and stock control. Very popular among Spanish self-employed people.
  • Made-to-measure solutions (like Xora Intelligence's): if you already have an ERP or an accounting system and want to automate the incoming-invoice flow without changing tools, we integrate the extraction AI directly with your current system.

What makes this expensive or cheap? Four things, and none of them is the brand you choose:

  • How many different formats come in. If all your invoices arrive as PDFs by email from twenty regular suppliers, it's a small problem. If they arrive on paper, as photos, via the web and via EDI, each channel is separate work.
  • How many systems have to be touched. A standalone tool that already includes everything is one thing. Connecting it with your ERP, your CRM and your accountant's software is another.
  • How much logic of your own you have. Classifying by type of expense is standard. Classifying by your cost centres, your jobs or your projects has to be built.
  • How much volume you have. The same system pays for itself sooner the more it's used. With few invoices a month, doing it by hand can still be the sensible option.

When is a made-to-measure solution worth it? When handling invoices already takes you recognisable hours each month, when your invoices arrive in very mixed formats (paper, PDF, email, web), when you need custom classifications or when you want the process integrated with your current CRM or ERP.

Automatic classification of deductible expenses

One of the features self-employed people value most is the automatic classification of deductible expenses. The AI identifies which expenses are deductible for personal income tax (IRPF) and VAT according to the self-employed person's activity code, and separates them from non-deductible expenses. The result: you stop losing deductions because you hadn't classified them properly.

Some examples of what the system identifies automatically:

  • Deductible fuel (if the vehicle is assigned to the activity) vs. non-deductible fuel
  • Business meals (deductible with requirements and limits) vs. personal meals
  • Office supplies, software subscriptions, professional services
  • Invoices from regular suppliers vs. new suppliers (verification alert)

The last word is still your accountant's. What changes is that they review it instead of building it.

And the invoices you issue: getting paid

Automating incoming invoices solves the paperwork. Automating outgoing ones solves something that hurts more: getting paid.

In Spain people pay late, and it's not an impression. According to the CEPYME Late Payment Observatory for the second half of 2025, the average payment period stood at 80.5 days on average in 2025, 34% above the legal maximum of 60 days set by Law 3/2004 on combating late payment. And at the end of 2025 only 30.4% of the amount invoiced was paid on time.

Against that, no AI is any use if nobody chases. What a system can do is chase without you having to remember: issue the invoice, send it, watch the due date, warn the customer when it passes and record the payment when the transfer arrives. The awkward reminder is sent by a machine, on time, every time.


Frequently asked questions about invoice automation with AI

Can I use invoice automation if I already have an accountant?

Yes, and in fact it's the most common combination. Automation doesn't replace your accountant: it makes their job easier by sending them a package of invoices already classified and organised. Their hours go on reviewing and advising, not on typing.

What about paper invoices?

Paper invoices are digitised with your phone camera or a scanner. The OCR system extracts the data just as it does from a PDF, although a blurred photo, a crumpled receipt or paper with faded ink takes more work and jumps to review more often. As the e-invoicing timetable advances, you will receive less and less paper.

Is it legal to use AI to process invoices? What about GDPR?

Completely legal. Invoice data (tax IDs, amounts, items) is business data, not sensitive personal data. In any case, at Xora Intelligence we process all data on servers located in the European Union, in full compliance with the GDPR.

Can I automate the invoices I issue to my customers, as well as the ones I receive?

Yes. The system can generate, send and follow up your sales invoices automatically: generation from the CRM, sending by email, a non-payment reminder at the interval you set and automatic recording of the payment when the transfer arrives.

Found it useful? Share it with someone who needs it

Xora IntelligenceAI consultancy and custom software in Los Barrios (Cádiz). We write about what we build for businesses in the province. If you have a question about your case, write to us.

Keep readingRelated articles

The whole blog

Bay of Gibraltar · photo by Cabeza2000 (CC BY-SA 4.0)

Shall we talkabout your business?

Tell us which tasks take up most of your time. We will tell you whether they can be automated and how we would do it. If we can't help, we will tell you that too.