Service
KSeF invoice automation: invoices from email and KSeF into a spreadsheet
KSeF (Krajowy System e-Faktur) is Poland's national e-invoicing system. With KSeF invoice automation, your team no longer retypes invoice data into a spreadsheet or accounting software. You order the build as a one-off project: I fetch invoices from KSeF and from a mailbox, check them with rules and save the result where your bookkeeping happens. I work from Wrocław, for companies across Poland.
Automation of invoices from email to Excel runs in the same process: it handles invoices from KSeF and those that still arrive as PDFs or photos.
The problem: invoices from two sources and manual retyping
KSeF covers only part of the invoice work. Structured invoices reach the system, but a company still has to fetch them, post them, describe them and pay them. Some documents, for example from foreign suppliers, still arrive by email as PDFs.
- someone retypes the number, the tax ID (NIP), the amounts and the payment due date into a spreadsheet,
- a mistake in one digit comes out only at settlement,
- the same invoice is posted twice,
- corrections are not linked to the invoices they relate to.
With a few dozen invoices a month this is a nuisance. With a few hundred it is a full-time job. Errors show up late, usually when the accountant closes the month and there is no time left to sort it out with the supplier. Automation does not replace the accountant. It prepares the data for them: checked, described and in one place, with a list of the items that need a decision.
What is happening with KSeF and when it affects you
As of November 2026, according to announcements from the Ministry of Finance and the KSeF portal:
- since 1 February 2026, KSeF 2.0 has been the only version of the system: large companies must issue invoices in it and every business receives invoices through it,
- since 1 April 2026, the obligation to issue invoices in KSeF covers the remaining businesses, except the smallest ones, whose monthly sales documented by invoices do not exceed 10 thousand zloty,
- from 1 January 2027, the obligation covers everyone, including the smallest.
Penalties for mistakes in using KSeF are postponed. On 6 November 2026 the Sejm (the lower house of the Polish parliament) passed a law that moves them to the end of 2027; the law is awaiting the Senate and the President's signature, so it is not yet binding law. The Ministry stresses that postponing penalties does not mean giving up the obligation. Check the details with your accountant or on the KSeF portal. I do not give tax advice: I build the tool, and interpreting the rules is for your accounting team.
I describe how fetching invoices from KSeF works technically, step by step, in the guide KSeF: jak automatycznie pobierać faktury (in Polish).
What I build
I tailor the process to your company, but it is built from the same parts:
- fetching invoices from KSeF through the official API and from a chosen mailbox,
- reading data from PDFs and photos with an AI model, and from the XML files from KSeF directly, without guessing,
- rules that check the NIP (checksum), net, VAT and gross totals, duplicates, payment due dates and the linking of corrections,
- saving to Excel, Google Sheets or accounting software, with a queue of documents to review,
- an alert describing the error when a run stops.
I usually set the whole thing up in n8n (a workflow automation tool) on a server in the EU, as part of broader process automation in your company. If your invoices need logic a workflow cannot hold, such as non-standard checks or a custom approval screen, see software built for one process.
How it works, step by step
- Fetching. The process picks up new invoices from KSeF and from the mailbox at set times.
- Reading. Data from XML passes on unchanged. From PDFs and photos it is read by an AI model.
- Checking. Rules outside the model check the NIP, totals, VAT rates and duplicates. The AI model does not have the last word.
- Saving. Correct invoices land in a spreadsheet or accounting software.
- Queue. Uncertain documents wait for a person, for example a blurred photo or an invoice without a number.
- Report. After each run you get a summary: how many invoices, how many to review, how many rejected.
An example on sample data
The example uses demonstration data, not client documents. The mailbox holds three messages: a PDF invoice, a correction to it and a photo of an invoice taken with a phone. The process reads all three, links the correction to the invoice and saves rows in the spreadsheet. The photo has a wrong NIP that fails the checksum, so the document skips posting and goes to the queue with a description of the problem.
See the video of this demo or the description on the home page.
Security and GDPR
The code and accounts stay with you: the server, the mailbox and the spreadsheet are yours, and after launch you do not depend on me. I process data on a server in the EU and sign a data processing agreement under the GDPR (RODO in Poland). The process gets access to KSeF and the mail with minimal permissions that you can withdraw at any moment. A person always decides what happens to uncertain documents. I describe similar rules for an AI assistant for business.
Invoice data does not go to any service you have not accepted, and the list of all the systems the process connects to is part of the documentation you receive at the end. Before go-live I test the process on a few dozen of your invoices and show what the system saved and what it flagged for review.
Start with a short conversation
Write where your invoices come from today and where you record them. I will reply within one business day with questions or a proposal for the first step.
Frequently asked questions
Does invoice automation work with KSeF?
Yes. The process fetches invoices from KSeF through the official API, checks them with rules and saves them in a spreadsheet or accounting software. The same checks cover invoices from email, so both sources end up in one queue.
Can invoices be moved from email to Excel automatically?
Yes. The process reads PDF attachments and photos of invoices, extracts the number, the tax ID, the amounts and the payment due date, and adds a row to Excel or Google Sheets. Uncertain documents go to a separate queue.
Since when is KSeF mandatory?
According to the Ministry of Finance, the obligation to issue invoices in KSeF covers most companies from 1 April 2026, and the smallest ones, whose monthly invoiced sales do not exceed 10 thousand zloty, from 1 January 2027. Confirm your specific case with your accountant.
Are there penalties for KSeF mistakes in 2026?
The Ministry of Finance says there will be no penalties for mistakes in using KSeF for 2026. On 6 November 2026 the Sejm passed a law moving penalties to the end of 2027. It is awaiting the Senate and the President's signature, so it is not yet binding law, and the obligation to use KSeF remains.
What if the AI model reads an invoice wrongly?
The model's result goes through checks outside the model: totals, NIP, VAT rates and duplicates. A wrong reading usually fails these rules, and the document goes to the review queue instead of posting.
Does my data leave the EU?
The process itself runs on a server in the EU. Whether the AI model processes data outside the EU depends on the chosen provider, and we settle that, together with the processing terms, before the start. I sign a data processing agreement.
Does it support my accounting software?
It depends on the software. If it has an API or file import, the process can write to it. If not, the process saves the data to a spreadsheet that the accountant imports or checks by hand.
Let's talk about your process
Describe in 2–3 sentences what you want to improve. I reply within one business day. The call is free and does not commit you to anything.
Book a free callEmail: kontakt@smartpath.pl