Automated Letter Generation for the Belastingdienst

Tech Stack
Status

Turning spreadsheet data into tens of thousands of personalized citizen letters

The Belastingdienst, the Dutch Tax and Customs Administration, needed a reliable way to produce large volumes of personalized letters to citizens. Each letter depended on individual data and a set of complex business rules, making manual production slow, error-prone and impossible to scale.

I developed a web application that automates the entire process. Users upload an Excel file, and the application processes each record through the underlying business logic to determine exactly what every citizen should receive. It then generates a tailored HTML letter for each person and converts it into a print-ready PDF, ready for dispatch.

The backend is built with FastAPI, handling data validation, rule processing and document generation. The frontend uses pure HTML and CSS, keeping the interface lightweight, fast and easy to maintain, and the same HTML templating gives precise control over the layout of the final letters.

The result is a dependable system that has delivered letters to tens of thousands of citizens, replacing a labor-intensive process with one that is fast, consistent and accurate.