Robinson 8a

// Case study 04

A tool my sister could trust with her clients' data

My sister spent days checking each client's ID against the tax authority by hand, and couldn't trust strangers' scripts with private data, so I built her a tool she could: upload the list, get it back with every mismatch flagged, in 30–40 minutes instead of 3–4 days.

  • Python
  • pandas
  • Beautiful Soup
  • Playwright
  • Flask
Project
DIAN client data validation tool
Context
Personal project
My role
Did the job by hand, then designed, built and ran the tool
Who uses it
My sister: I ran every list for her and checked each result
Timeframe
2022
Status
Retired

// Outcome

3–4 full days → 30–40 min per run

Client validation time. For one full client list, from start to finished file.

Self-reportedRun time includes deliberate pauses so DIAN's site was never overloaded

// The problem

Faster wasn't enough.

In May 2022 my sister, an accountant, asked me to help clean her client data. Every client's name had to match the official records of Colombia's tax authority (DIAN), and the only way to check was one ID at a time on DIAN's website: three to four full days per list.

There were spreadsheet automations for this online. But they were strangers' code, and the data was her clients' tax information. She needed something she could trust, not just something faster.

// THE CONSTRAINT

Code I could explain, line by line

Her clients' private data would only pass through code I wrote and could stand behind.

// The approach

Understand, design, build.

The same three steps, on my first tool with a real user.

  1. 01 · UNDERSTAND

    Do the job by hand first

    I did the whole check manually first, the slow way. It kept her data out of any experiment, and it showed me exactly what each check involved: find the ID, read the official record, compare it with hers, note the difference. Only then did I automate it.

  2. 02 · DESIGN

    Her spreadsheet in, her spreadsheet back

    Three decisions, all about the person reading the result:

    • Her file, mirrored. I kept her four original columns and placed a copy of the same four, in the same order, right beside them, filled with DIAN's official data. Nothing moves, so nothing confuses.
    • Color does the reading. Green where a field matches, red where it doesn't, so what needs fixing shows at a glance.
    • I own every run. Tech isn't her world, so she never had to touch the tool: I ran every list, checked the result, and handled any problem before it reached her.
  3. 03 · BUILD

    Automation that stays polite

    Python with Playwright fills DIAN's lookup form for each ID, and pandas writes the official data into the mirrored columns. A conditional-format pass in Excel then colors every field. A pause between lookups keeps the load on DIAN's site low, which is part of why a run takes 30–40 minutes and not five.

A spreadsheet titled clientes_validados.xlsx, marked as sample data with invented names and tax IDs. Columns A to D hold the original list: NIT, DV, Nombre o razón social and Estado RUT. Columns E to H repeat the same four headers with the official DIAN data. Most mirrored cells are green. Four are red, each for a different reason: a company name missing "S.A.S.", a person's name in a different order, a wrong check digit, and a registration marked Cancelado instead of Activo. (opens full size in a new tab)
The result, on made-up data: her four columns, DIAN's four beside them, green where they match and red where they don't. Each red cell is a different kind of problem. Headers stay in Spanish, as in her file. Select the image to see it full size.

// What happened next

Retired on purpose.

It worked until DIAN added a bot check to its lookup page. I could have looked for a way around it; I retired the tool instead. The check was DIAN saying no to automated lookups, and a tool built on trust can't start by breaking someone else's rules.

It also changed my path. To automate those lookups I had to read how a web page is built, and that curiosity pulled me into web development. Everything else on this site started there.

// Skills it shows

  • Web automation
  • Data validation
  • Process automation

// What I learned

Trust is part of the design.

Trust comes from small decisions: I wouldn't run unknown code on private data, and I retired the tool rather than bypass DIAN's bot check.

What I'd change

Today I'd keep real and test data out of the repository from the first commit: in a folder git ignores, with made-up samples for testing. Back then I didn't know that anything committed stays readable in the history, even after you delete it.

// In my story · Chapter 4

Build it myself

A tool for my sister taught me HTML.

// Connected work