Validate EN 16931 e-invoices from Gmail and create draft bills in Xero

Quick overview German businesses must accept e-invoices (XRechnung or ZUGFeRD), but Xero cannot read them. This reads them straight from your Gmail, checks they are correct, and turns the good ones into Xero draft bills for you to approve.

How it works It watches your Gmail inbox for new emails with an XML or PDF attachment. It reads the invoice data, either from the XML file or from the data hidden inside a ZUGFeRD PDF. It checks the invoice against the main EU e-invoice rules: invoice number, dates, supplier details, VAT on every line, and that all the amounts add up. If something is wrong, it replies to the supplier and says exactly what to fix. Anything unusual goes to a person: plain PDFs, credit notes, other currencies, or a VAT rate your Xero does not have. Good invoices are booked one at a time. The supplier is found in Xero by VAT number or added, and the same bill is never booked twice. It creates a draft bill with the right VAT rate on each line and attaches the invoice data to it. It compares Xero's totals with the invoice. If they differ, your bookkeeper gets an email. The email is then marked as read so it is handled only once.

Setup Connect your Gmail account, and connect Xero through a Xero developer app, using the redirect address shown in the n8n Xero credential. In Xero, make sure purchase tax rates exist for the VAT rates you receive, for example 19% and 7% in Germany. Open 'E-Invoice Policy' and enter your bookkeeper's email and the Xero expense account code to book to. If you use several Xero organisations, enter the right one's name.

Requirements A Gmail account and a Xero organisation. No other services or paid tools.

Customization In 'E-Invoice Policy' you can turn supplier replies off, change the date until which plain PDFs are still accepted, the rounding tolerance, or your base currency.

Additional info Bills are only created as drafts; nothing is approved or paid. Xero cannot store XML files, so the invoice is attached as an unchanged text copy, and the original stays in Gmail.

0
Downloads
0
Views
8.43
Quality Score
beginner
Complexity
Author:Melbin Francis(View Original →)
Created:10/14/2026
Updated:10/14/2026

🔒 Please log in to import templates to n8n and favorite templates

Workflow Visualization

Loading...

Preparing workflow renderer

Comments (0)

Login to post comments