E-Invoice icon

E-Invoice

Handle E-Invoices (ZUGFeRD / XRechnung / Factur-X / EN-16931)

Overview

This node, named "E-Invoice," is designed to extract invoice data from electronic invoices in either PDF or XML format. It supports common e-invoice standards such as ZUGFeRD, XRechnung, Factur-X, and EN-16931. The primary use case is to automate the extraction of structured invoice information embedded within these files, which can then be used for further processing, accounting automation, or integration with ERP systems.

Typical scenarios include:

  • Extracting invoice details from PDFs that contain embedded XML invoice data.
  • Parsing raw XML e-invoices to retrieve structured invoice fields.
  • Handling encrypted PDF invoices by providing a password.
  • Returning extracted data in JSON format or optionally returning the raw XML content.

Properties

Name Meaning
Input Binary Field The name of the input binary field containing the file with embedded invoice XML information to be extracted (e.g., "data"). This is required to specify where the node should look for the invoice file data.
Options A collection of additional options:
- Keep Source Determines what source data to keep in the output:
• JSON — Include JSON data of the input item
• Binary — Include binary data of the input item
• Both — Include both JSON and binary data of the input item
- Password Password to unlock the PDF if it is encrypted. Leave empty if not applicable.
- Return Raw as JSON Whether to return the raw XML data of the e-invoice parsed as a JSON object instead of the extracted invoice fields.
- Return Raw as XML Whether to return the raw XML data of the e-invoice as an XML string. Mutually exclusive with "Return Raw as JSON".

Output

The node outputs an array of items where each item's json property contains the extracted invoice data. This data includes structured fields parsed from the embedded XML within the PDF or directly from the XML file.

If configured to do so, the node can also return the raw XML data either as a JSON object or as an XML string, depending on the selected option.

Binary data from the input item can be preserved in the output based on the "Keep Source" setting, allowing downstream nodes to access the original file if needed.

Dependencies

  • The node requires input files in PDF or XML format containing e-invoice data.
  • If the PDF is encrypted, a password must be provided.
  • No external API keys or services are explicitly required; the extraction logic is bundled internally.
  • Proper configuration of the input binary field is necessary to provide the invoice file to the node.

Troubleshooting

  • Common issues:
    • Incorrect binary field name: Ensure the "Input Binary Field" matches the actual binary property name containing the invoice file.
    • Encrypted PDFs without password: Provide the correct password to decrypt the PDF; otherwise, extraction will fail.
    • Unsupported file formats or corrupted files may cause extraction errors.
  • Error messages:
    • Errors related to missing or invalid binary data typically indicate misconfiguration of the input field.
    • Decryption failures suggest incorrect or missing passwords.
    • Parsing errors may occur if the embedded XML is malformed or does not conform to supported e-invoice standards.

Links and References

Discussion