⚡ Powered by Finn · Day 102 of 365
102

Making the Month-End Close Harder to Break

The first month I automated a client's bank reconciliation, the scripts worked, but it was scary. I knew the process was hacky, I was learning a new system and I'm not a CFO level accountant. I'll be upfront about that. There was a mass of dated one-off files, each named for the day I wrote it, each doing one step in the close. It tied out the month. It was also exactly the kind of thing that breaks, or that you forget how to do the moment you look away from it.

So over the last few weeks we rebuilt it into something harder to break. I say we, but that is really just me and the agent, who I sometimes love and sometimes hate. I wrote about the system itself a few days ago; this is what hardening it actually meant.

The rebuilding of this ai controller is still quite new to me, and as far as I can tell, has never been done before. Not that I'm moving into blue ocean territory here, where there is opportunity to SaaS this out. There is not, this is a custom scripted workflow for an enterprise client.

The pile of dated scripts became one command, a single month-agnostic close that runs the same way every month. It opens one connection per entity and reuses it across every step, read, post, verify, tie-out, so a four-entity close stays well under the API's hourly token limit instead of logging in fresh at every stage and tripping the cap.

That was the theory at least. It didn't quite work out that way. The idea was good, and I will continue to build upon it.

Two guards get tested harder than anything else in the codebase. The first refuses to write to a live ledger without an explicit typed confirmation, so nothing posts by accident. The second reads the ledger before it writes, so it physically cannot enter the same transaction twice. We also taught it to heal a stale login: where an expired token used to make the system quietly read back nothing, it now notices, refreshes once, and retries, or it fails loudly. And a completeness check proves every line on the bank statement is accounted for, posted or held, before anyone trusts the close. The last time this system missed half a statement, that check is the fix that came out of it.

We deliberately left one thing manual. AccountsIQ has no bank-reconciliation endpoint in its API. You can read everything you need to prove the books tie, but the formal act of marking a month reconciled is a human click in the interface. So the control splits cleanly: our code proves the ledger bank balance equals the statement closing balance to the cent, every month, and a person does the final marking.

That feels right. The machine does the matching and the proving. The person keeps the last word.

This month's close brought the work down from a week to one day. Not bad, but every time I run it, it gets better. And that's the whole point.

Monthly Revenues $11,000 | Clients 2 | Prospects (AI outbound agent now live)

Day 102 of 365.

Get the next build-in-public post by email

One short dispatch most days — the AI ops builds, what's working, what isn't. No spam.

← Day 101 All posts

Follow the BIP

AI Deployment as a Service. One workflow at a time.

Book 15 minutes. We see if your workflow is one we'd build.

Schedule a call