30.16 E-invoice filter

30.16.1 Overview

The e-invoice filter detects electronic invoices in the attachments of a message. The two formats commonly used in Germany and Europe are supported: ZUGFeRD (PDF with embedded XML data) and XRechnung (plain XML file).

Background: Since 2025, companies in Germany must be able to receive structured e-invoices. The filter automatically recognizes whether an attachment conforms to the standards - regardless of file name or sender.


30.16.2 Values and operators

Value Matches
ZUGFeRD invoice PDF attachment with embedded ZUGFeRD XML
XRechnung XML attachment in XRechnung format
ZUGFeRD or XRechnung Both formats
Operator Description
contains At least one attachment is an e-invoice of the selected type
does not contain None of the attachments is an e-invoice of the selected type

30.16.3 Detection

Detection runs in two stages:

Stage Check
1. File extension ZUGFeRD: .pdf, XRechnung: .xml, both for “ZUGFeRD or XRechnung”
2. Content The program attempts to read the attachment as an e-invoice. If the read operation succeeds, the attachment is considered valid

Note: The check is not strict - it relies on the embedded e-invoice library. Severely damaged or deliberately tampered files may in individual cases be rejected even though they are formally valid, or conversely accepted without all mandatory fields being present. A downstream accounting system is responsible for the complete professional verification of the invoice.


30.16.4 Use case

Import e-invoices automatically into DMS

E-invoice type contains ZUGFeRD or XRechnung

Combined with the task Save to database, structured invoice data can be read directly from the XML.


30.16.5 Interaction with attachment handling

In the tasks Save attachments and Print attachments, the e-invoice type can also be used as a filter per attachment (see chapter 9.3.4). This allows a profile to process all mails with attachments in general but only save or print the e-invoices.

The task Replace attachments (see chapter 24) extracts the ZUGFeRD XML from the PDF into a separate file.


30.16.6 Tip

  • The filter inspects the content of the attachments - not only their existence or file name