See llms.txt for all machine-readable content.

Back to Templates

Reconcile camt.053 bank statements with XRechnung invoices and email reports

Quick overview

This workflow imports German camt.053 bank statement files (XML or ZIP), records each booking in n8n Data Tables, matches incoming payments and returns to XRechnung invoices, and emails a reconciliation report via SMTP.

How it works

  1. Starts when you upload camt.053 files through an n8n form, when another workflow sends a statement payload, or when you run a built-in manual test sample.
  2. Creates/reads the required n8n Data Tables (xr_invoices, xr_customers, xr_payments) and loads your reconciliation settings like account IBAN and payment terms.
  3. Normalizes incoming files, unzips EBICS downloads when needed, parses camt.053 statements, and rejects statements that are not EUR, not for the configured account, or fail balance checks.
  4. Extracts booked transactions into one row per bank entry (including payments, batches, and reversals), detects invoice numbers in remittance texts, and inserts new entries into xr_payments while marking reruns as duplicates.
  5. Replays the full xr_payments ledger to allocate payments to xr_invoices (paid, paid with Skonto, part-paid, overpaid, unmatched, or check) and links returns/reversals to the original payments.
  6. Updates xr_payments with the latest status, allocation details, and reasons, then sends a plain-text email report and returns one result item per payment to any calling workflow.

Setup

  1. Ensure your n8n instance supports Data Tables and add an SMTP credential for the Email node used to send the report.
  2. Update “Payment settings”: accountIban (your account, several with commas), senderEmail and reportToEmail, replacing the example values; real statements are refused until then. Set paymentDays, skontoDays and skontoPercent as in the XRechnung template's Invoice settings. Then pick Execute workflow (test) next to Execute for a sample run marked as a test.
  3. Populate the xr_invoices (and optionally xr_customers) Data Tables with your invoice data, for example by using the referenced XRechnung workflow template or by inserting your own rows with readable gross and issueDate values.
  4. Publish the workflow, open the form's production URL (only signed-in users of this n8n can open it) and upload the camt.053 from your online banking or EBICS.

Requirements

  • n8n with Data tables (tested on n8n 2.47.7) and an SMTP account; invoices from the XRechnung template (n8n.io/workflows/22838) or your own xr_invoices rows.

Customization

  • In invoiceRefs of xr_payments: “RE-2026-00012: 100.00; RE-2026-00013: 50.00” splits a payment, “RE-2026-00012: 1166.20 close” closes the rest (late Skonto, a fee), “ignore” sets a payment or return aside, “separate; RE-…” counts a look-alike of an earlier payment; a return gets the invoice whose payment it takes back. Fixed terms per invoice: add the columns paymentDays, skontoDays and skontoPercent to xr_invoices.

Additional info

Tested in November 2026 on n8n 2.47.7 with a real mail server and invoices from the XRechnung template, and on the official DK example statement plus 37 statements valid against the ISO 20022 schema. Limits: EUR accounts and incoming payments only; batches without the amounts of their transactions, returns of less than the payment and payments that do not cover several invoices exactly go to “check”; Skonto and closed rests are gross, correct the VAT. Keep the original camt.053 files 8 years (§ 147 AO); the template keeps no copy. The sample statement uses published example IBANs and example.com addresses, no real data. Not tax advice.