bettersorted Logo
Email inbox on the laptop – symbolic image for invoice receipt by email
AI Automation

Automatically capture and file invoices by email

AuthorMuhamed Alahmed
Published on
Reading time4 min
In short

Invoices received by email can be captured fully automatically: a dedicated invoice mailbox is checked regularly, attachments are detected, read, named, filed, and reported to accounting. With open-source tools such as Paperless-ngx and n8n, this can be done on your own servers in Germany.

The essentials at a glance

  • The basis is a central invoice mailbox.
  • Paperless-ngx or n8n retrieve, recognize, extract, rename, file away.
  • E-invoices retain in the structured original format (8 years).
  • Plan validation rules against forged invoices.

Invoices that arrive by email can be captured fully automatically: a dedicated invoice mailbox is checked regularly, attachments are recognized, read, sensibly named, and filed and reported to accounting. With open-source tools like Paperless-ngx and n8n this can be done on your own servers in Germany – without anyone having to save attachments manually.

This article focuses on the Email channel. The entire process from capture to posting is described Automate invoice receipt.

Step 1: A central invoice mailbox

The basis is a dedicated address such as rechnung@ihre-firma.de, which you share with all suppliers. Invoices no longer end up in personal inboxes, but in one place. Anyone who still receives invoices personally forwards them there.

Accounting with laptop and invoice

Step 2: Automatically retrieve and recognize

Paperless-ngx or a workflow in n8n checks the mailbox at regular intervals. Rules determine what happens: for example, only import PDF and XML attachments, ignore advertising and signature images, and move the email to a “done” folder after processing.

Step 3: Extract and assign

  • E-invoices (XRechnung, ZUGFeRD) contain structured data that can be transferred directly.
  • PDF invoices are read using OCR and, optionally, AI: supplier, invoice number, date, amount, due date.
  • Assignment: sender, document type “invoice”, keywords such as cost center or project – see Paperless-ngx + AI.

Step 4: Naming and filing

Instead of “invoice.pdf”, a descriptive name such as “2026-10-01_Supplier_RE-12345.pdf” is created. The document is stored in a fixed location and can be found via full-text search.

Step 5: Forwarding

  • Notification to the responsible person for approval.
  • Transfer of the invoice data to the accounting software or to the tax advisor.
  • Reminder when due date or cash discount period is approaching.

What you need to consider from a legal perspective

  • E-invoice: Since 2025, companies in Germany must be able to receive B2B e-invoices. The structured original, not just a PDF view, must be archived.
  • Retention: Invoices are accounting records; since 2025, the retention period has been eight years.
  • Compliance: Recording and filing must be traceable and unalterable – see Digital filing in accordance with GoBD using open-source tools.
  • Data protection:Invoices contain personal data; hosting in Germany, rights management, and a deletion concept are part of this.

Typical pitfalls

  • Invoices as a link instead of an attachment:Some providers send only a download link – this requires separate rules or manual retrieval.
  • Multiple invoices in one email or invoice plus terms and conditions: rules must take this into account.
  • Suppliers change their format: extraction rules need occasional maintenance.
  • Spam and phishing: fake invoices with changed bank details – validation rules and approvals are mandatory.

For technology enthusiasts

  • Paperless-ngx retrieves attachments via IMAP email rules and can then mark or move emails.
  • E-invoices in ZUGFeRD format contain the XML data embedded in the PDF.
  • For transfer to accounting systems, an n8n workflow using their interface is a good option.

bettersorted relies on open, transparent building blocks – operated on servers in Germany and bundled in the automaisa Hub. We provide vendor-neutral advice, are a BAFA-registered consultant and authorized INQA coach. The consulting and guided implementation can be covered through the INQA-Coaching with 80% funding; the suitable path is shown by the Funding Check. For a non-binding initial consultation: Contact.

Example: Workflow on a normal Monday

An illustrative scenario: Over the weekend, 14 invoices arrived in the invoice mailbox. By Monday morning, the system had collected them, read them, named them, and filed them; two e-invoices were transferred directly from the XML data. One invoice with changed bank details was flagged and not forwarded. Accounting finds a list of twelve invoices ready for approval and two follow-up questions.

Checklist for getting started

  1. Set up a dedicated invoice address and inform suppliers.
  2. Define rules for attachments, forwards, and exceptions.
  3. Determine the naming scheme and storage location.
  4. Set up validation rules for duplicates and bank details.
  5. Coordinate handover to accounting or tax advisory.
  6. Add procedural documentation.

Costs and funding

For automated invoice receipt, open-source tools do not incur any license costs. Costs arise for Setup (planning, installation, integration, testing), operation (server or hosting in Germany, updates, monitoring, data backup) and support (training, rules, contact persons). We do not quote fixed prices because scope and initial situation vary greatly.

Eligible for funding is the Consulting and guided implementation: The INQA-Coaching covers 80% of coaching costs nationwide (up to €11,520, vouchers until 30.06.2028); a preliminary analysis is subsidized by the BAFA consulting grant with 80% in the new federal states, Lüneburg and Trier, otherwise 50% – for applications submitted by 31.12.2026.

Frequently Asked Questions

How can I automatically save invoices from emails?

With a central invoice mailbox that is regularly checked by a document management system such as Paperless-ngx or an automation tool such as n8n. Attachments are detected, read, named, and stored.

Do I have to retain e-invoices as XML?

For e-invoices within the meaning of the German VAT Act, the structured format is the original and must be retained. A PDF view alone is not sufficient. Clarify the details with your tax advisor.

Does this also work without the cloud?

Yes. Paperless-ngx, n8n and a local language model can be operated entirely on your own servers or with a hosting provider in Germany.

What happens to invoices that arrive only as a link?

They require their own rules or a manual step, because there is no attachment. If possible, ask suppliers to send invoices as attachments.

As of October 2026.

Portrait of Muhamed Alahmed, founder of bettersorted
About the author

Muhamed Alahmed

With over 10 years’ experience in IT, I develop solutions that not only work from a technical perspective, but also create real added value and open up new possibilities.

More about bettersorted →

More articles

Newsletter

Stay up to date on AI topics

Short updates on AI automation, funding programs and new posts — no spam, unsubscribe anytime.

We use Brevo as our marketing platform. By submitting, you agree that your data will be transferred according to Brevo's privacy policy .

CallEmailContact form