When you work with invoices in Poland, KSeF quickly becomes one of those systems that you have to check regularly — even if you would rather keep your invoice data in a place that is easier to search, organize, and connect with other tools.
This free automation was created for Polish businesses, accountants, and developers who want to automatically download issued and received KSeF invoices into NocoDB and get a readable email notification whenever a new invoice appears.
It is also an improved version of the original workflow by Greg Brzezinka, extended with a more structured NocoDB setup, duplicate prevention, invoice rendering, and support for both sales and cost invoices in one process.
Solution: KSeF Invoices + NocoDB
In practice, this workflow turns KSeF invoice handling into a simple, structured invoice database. Instead of manually logging into the KSeF portal and checking whether new documents have appeared, the automation downloads invoice data, saves it in NocoDB, and sends an email notification with a readable HTML version of each new invoice.
This is especially useful if you want to keep both issued and received invoices in one place, build internal reporting on top of invoice data, or connect KSeF with your broader finance, CRM, or operations workflow.
How automation works
The workflow has two main parts: a one-time setup flow and a recurring invoice sync flow.
Setup flow: NocoDB table creation
Before using the main workflow, you run a setup step that creates the required NocoDB table automatically. This means you do not have to manually prepare all columns or configure the database structure from scratch.
The table is designed to store key invoice information such as KSeF number, invoice number, dates, seller and buyer data, amounts, currency, invoice type, and HTML content. It also distinguishes between issued invoices and received/cost invoices, so everything can be managed in one view.
Main flow: KSeF invoice sync
The recurring flow connects to KSeF, authenticates the session, checks for issued and received invoices, and compares them with the records already stored in NocoDB.
Only new invoices are processed. This prevents duplicates and makes the workflow safe to run regularly.
For every new invoice, the automation retrieves the full invoice data, converts it into a clear HTML document, saves the structured information in NocoDB, and sends the readable version by email. After processing is finished, the KSeF session is closed properly.
Implementation: setup, sync, and notifications
To use the workflow, you need an active n8n instance, a NocoDB database, access to the KSeF API, and email credentials configured in n8n.
The setup is divided into a few practical steps:
First, you configure the NocoDB connection and run the setup flow once to create the invoice table.
Then, you configure the main workflow with your NIP, KSeF authorization token, invoice date range, and email addresses for notifications.
Finally, you connect the NocoDB and email nodes using your credentials. Once configured, the workflow can run cyclically and keep your invoice database up to date.
Extensions Worth Adding
This workflow gives you a strong starting point for automating invoice handling, but it can also be extended further.
You can add Slack notifications for finance teams, create additional views in NocoDB for unpaid or cost invoices, connect the data with accounting tools, or build approval processes for received invoices. You can also use the stored invoice data as a base for reporting, cash flow monitoring, or internal dashboards.
The biggest advantage is that KSeF no longer has to be a separate place you manually check. It becomes part of your own operational system.
If you want to download the free n8n workflow and test it in your own setup, visit: https://n8n.partnerlinks.io/download-ksef-invoices



