AI Automation

E-Invoicing 2025: Obligation or Opportunity for Automation?

The mandatory e-invoicing requirement as a catalyst for automation: deadlines, formats, GoBD requirements, and a practical 8-step workflow for automated invoice processing.

Since January 1, 2025, all B2B companies in Germany must be able to receive e-invoices. From 2027, sending also becomes mandatory—for businesses with revenue exceeding 800,000 euros. From 2028 for everyone. A PDF by email no longer suffices. The tax authorities require structured data in ZUGFeRD or XRechnung format.

Most freelancers and trade businesses see this as a tedious obligation. Understandably so. Yet the e-invoice is simultaneously the best opportunity in years to properly set up the entire invoicing process from scratch. If you have to change something anyway, you might as well do it right—and automate the process.

The Deadlines: What Applies When

The FAQ from the German Federal Ministry of Finance on e-invoicing defines clear milestones:

From January 1, 2025: All B2B companies in Germany must be able to receive e-invoices. This applies immediately, to everyone—including sole proprietors with few clients.

From January 1, 2027: Sending obligation for companies with annual revenue exceeding 800,000 euros.

From January 1, 2028: Sending obligation for everyone. Including solopreneurs and micro-businesses.

The deadlines apply nationwide. Regional chambers of commerce offer consultation, but the rules are identical everywhere.

For tradespeople specifically: even those who as plumbers, carpenters, or roofers remain under 800,000 euros in revenue must already be able to receive. Sending comes by 2028 at the latest. Those who start now have time to learn. Those who wait must handle it under time pressure.

ZUGFeRD vs. XRechnung: What You Really Need to Know

ZUGFeRD is a hybrid format. You see a perfectly normal PDF invoice—but embedded within it is an XML file with all data in machine-readable form. Visually readable and automatically processable. DATEV recommends ZUGFeRD for businesses with a DATEV connection. This is the recommended path for the vast majority of cases.

XRechnung is pure XML. No PDF, no visual view. This format is primarily needed when invoicing government agencies or public-sector clients.

Recommendation: Start with ZUGFeRD. It covers nearly all use cases. XRechnung comes later when it becomes necessary.

GoBD Archiving: The 10 Points That Matter

The e-invoicing requirement tightens the demands on document archiving. The GoBD (Principles for Proper Management and Retention of Books) set the standard. These ten points will be relevant at the next tax audit:

  • Immutability—Original XML must not be edited
  • Timely recording—Booking within 10 days
  • Order—Clear assignment to business transactions
  • Completeness—All mandatory fields of the e-invoice captured
  • Accuracy—Automatic validation against schema
  • Traceability—Complete audit trail
  • Machine readability—Export in standard formats
  • Retention period—10 years audit-proof
  • Access protection—Role-based permissions
  • Process documentation—Written documentation of the process

The good news: anyone who properly automates incoming invoice processing handles eight of ten points automatically in the background. It just needs to be set up correctly once.

Important to know: a folder on the desktop is not GoBD-compliant archiving. With the right automation, however, this concern disappears completely.

Practical Example: DATEV Automation in a Trade Business

A typical trade business faces the following situation: invoices come by email, by post, and as phone photos. Previously, everything was captured manually, manually handed over to the tax advisor, and manually sorted into DATEV. This consumes hours every week.

A proven automation plan looks like this:

Step 1: Incoming folder. Everything lands in one place—whether email attachment, scanned receipt, or phone photo. One folder, one source.

Step 2: AI-OCR. An n8n workflow monitors the folder. When something new comes in, it sends the receipt through AI-based text recognition. The AI reads: supplier, amount, VAT rate, invoice number, date. Automatically. Even with poor scans, this works remarkably reliably.

Step 3: Automatic cost center assignment. The AI assigns the receipt to the correct cost center. Materials? Subcontractors? Office supplies? The system learns the structure and becomes more precise over time.

Step 4: Approval list with traffic light logic. The processed receipts land in an overview. Green means: everything fine, automatically approved. Yellow means: please review briefly. Red means: something is off. The business owner only needs to handle the yellow and red cases.

Step 5: DATEV handover. After approval, the structured data is transferred cleanly to DATEV Unternehmen online. The tax advisor gets clean data and the business owner has a clear head for their core business.

Document Recognition for the Entire Document Flow

The same technology that processes invoices can be applied to the entire document flow. Through database connections, for example, order data from the ERP system can be mirrored into a central database. A web dashboard gives field staff real-time access. And when a damage report arrives as a photo, the AI identifies the damage type and directly suggests measures.

The pattern is always the same: OCR recognition, automation hub, central database. Once you understand it, you can apply it to virtually any process.

The Workflow in Detail: 8 Steps to Automated Invoice Processing

1. Email trigger. n8n monitors the invoice mailbox. Every 5 minutes, the IMAP trigger checks for new emails with invoice attachments (.xml, .pdf).

2. Extract attachments. XML and PDF files are automatically separated. For ZUGFeRD invoices, the embedded XML is extracted from the PDF.

3. Validate format. The XML is checked against the official ZUGFeRD/XRechnung standard. Faulty invoices are flagged, and you receive a notification.

4. Read data. Invoice number, date, net, VAT, gross, IBAN—everything automatically extracted from the XML. No more typing.

5. Detect duplicates. Invoice number, supplier, and amount are cross-referenced. Double bookings become a thing of the past.

6. Archive GoBD-compliantly. Timestamp, hash value, unique filename. Stored audit-proof in cloud storage. Automatically.

7. Hand over to DATEV or Lexoffice. Booking data goes directly to the accounting software—via DATEV ASCII export, Unternehmen Online API, or Lexoffice API.

8. Notification. You receive a summary: what was booked, where the invoice is stored, what needs approval.

This workflow alone saves approximately 6 hours with 50 incoming invoices per month. With 200 or more invoices, it is over 23 hours monthly—almost three full working days.

The Tech Stack: What You Need

n8n as the automation hub. Open source, self-hostable, over 700 integrations. Workflows can be assembled visually.

Supabase as the central database. PostgreSQL under the hood, but with an interface that non-developers can operate. This is where all processed invoice data lands.

AI-based OCR for document recognition. Turns photos or PDFs into real, structured data. Works reliably even with poor scans.

DATEV Unternehmen online or Lexoffice as the accounting target. Lexoffice comes with an open REST API, which simplifies integration. DATEV works via export formats or the Unternehmen Online API.

Cloud storage for the GoBD archive. Georedundant and audit-proof.

Typical Mistakes (and How to Avoid Them)

PDF is not an e-invoice. The most common misconception. A PDF by email does not meet the legal requirements. Only structured formats—ZUGFeRD or XRechnung—count.

No process documentation. The workflow runs, but nobody has written down how. At the next tax audit, that gets expensive. Solution: every workflow gets documentation with purpose, data flow, and contingency plan.

Archiving on the local computer. Hard drives die. A folder on the PC is not an archive. GoBD requires audit-proof, georedundant storage.

Manually correcting without a record. Every change to booking data must be documented. Anyone who manually corrects in DATEV needs a defined process for it.

Realistic Timeline for the Transition

Week 1 to 2: Assessment. How many invoices come in? What software is in use? Where do receipts currently land?

Week 3 to 6: Setup and first workflow. Set up n8n, build the basic workflow, run through with test invoices. The first week is onboarding. From week 3, the first successes appear.

Week 7 to 10: Integration and parallel operation. Connect DATEV or Lexoffice. Check automatically and manually—until trust in the system is established. Fine-tune error handling.

Week 11 to 12: Go-live. Switch over completely. Finalize process documentation. If employees are involved: brief introduction.

12 weeks. Not 12 months. And from week 6, time is already being actively saved because parallel operation reduces manual work.

Frequently Asked Questions

What is the e-invoicing requirement?

From 2025, all B2B companies in Germany must be able to receive e-invoices. From 2027/2028, sending also becomes mandatory. E-invoices are structured electronic documents in ZUGFeRD or XRechnung format—a simple PDF by email is not sufficient.

Am I affected as a freelancer?

Yes. The requirement applies to everyone in the B2B sector—from freelancers to trade businesses to corporations. Receiving has been mandatory since January 2025. Those with revenue under 800,000 euros have a transition period until 2028 for sending.

What is ZUGFeRD?

ZUGFeRD is a hybrid e-invoicing format: a PDF file with embedded XML data. You see the invoice normally as a PDF, while the software can simultaneously read the data in machine-readable form. DATEV recommends ZUGFeRD for businesses with a DATEV connection.

Can I automate my bookkeeping with AI?

Yes. AI-powered automation independently recognizes invoice formats, assigns receipts to the correct cost centers, and learns the accounting logic. In combination with n8n and DATEV, this creates a system that handles the bulk of bookkeeping work independently. Experience shows that 50 to 70 percent of processing time per receipt is saved.

What does the transition cost?

The transition to e-invoice receiving itself costs nothing—every common software can handle it. Automating the processing requires a one-time setup effort that pays for itself through time savings within a few months. The ongoing costs for n8n and cloud storage are minimal.

Tags

  • SMEs
  • Automation
  • n8n
  • Process Automation
  • Freelancers

Back to the overview

Business Data Strategy for your company

From the target state to Delivery Supervision. We advise you and enable your organization.