Claude Code cleared a month of automation dread in half a day
At the start of each month, I gather up receipts and statements from the previous month and drop them into a fixed Dropbox folder. Some arrive by email, like those from GCP, GitHub, and various generative AI services. Others I have to log in and go fetch, like credit card and phone bills, Amazon, electronics retailer and electronic parts websites, and the bank. Counting them up, there are close to 20 services. Each one takes only a few minutes, but doing all of them eats up a fair amount of time.
I’d known for a long time that this could be automated.
The ones arriving by email could be picked up with the Gmail API, and the ones on the web could be fetched by driving a browser with Playwright. Having a human handle just the login and two-factor authentication, and leaving the rest to a script, is a natural enough division of labor. I could see the tools and the steps pretty clearly, yet every month I’d think “next month for sure” and end up collecting everything by hand anyway.
Why hadn’t I gotten around to it?
“No time” is only about half true. The effort of automating it should pay for itself easily after just a few months of the manual work. It wasn’t technically difficult either — Playwright and OAuth are both areas I understand reasonably well. Was it just tedious, then? Yes, but I couldn’t quite explain to myself what exactly made it so tedious.
This time I had Claude Code help me, and it was done in about half a day. Tracing back why half a day was enough makes the substance of that “tedium” visible.
Writing up instructions and handing them over
The first thing I did was put together what I wanted done as a Markdown instruction document and hand it to Claude Code. Anything that could be completed by email should be fully unattended; anything requiring login should be semi-automated. Don’t save passwords, don’t try to break through two-factor authentication or CAPTCHAs, don’t overwrite existing files, don’t do anything beyond viewing and downloading. Report back after each phase so I can check before moving to the next. That was about the extent of what I wrote.
The mines buried before the main task even started
The first snag had nothing to do with the core automation.
To use the Gmail API you need to create an OAuth client in Google Cloud, which is a job for a human. Leaving it in test mode means the token expires after 7 days, so it has to be published as production. Trying to publish it, I was told to finish the branding settings. Filling in the required fields, I was then told I needed a homepage URL and a privacy policy URL. This blog didn’t have a privacy policy page. I just wanted to collect receipts, and before I knew it I was writing a privacy policy for my blog (lol).
To be honest, similar things kept happening. pip install stopped with a mysterious error, and the cause turned out to be some odd value sitting in my Mac’s global pip configuration. I thought I’d fetched a receipt PDF from one retail site, but the contents turned out to be the HTML of an access-verification page (Cloudflare’s “Just a moment…”). On another retail site, opening the receipt page URL directly threw an error and logged me out. On the bank’s site, a blank space on the screen wasn’t an ordinary space but a non-breaking space, and string matching kept failing for no apparent reason.
None of these was individually hard.
I think this is the real identity of that tedium. Even when you can see the path to automation clearly, a number of small mines sit buried along the way, impossible to predict in advance. Step on one, investigate, fix it, move forward, repeat. Knowing that this cycle demands sustained concentration is probably why I never felt like tackling it in a couple of weekend hours.
Taking on the mine-clearing
What Claude Code did was exactly this mine-clearing. For the pip issue, it worked around it entirely inside the tool without touching the global configuration, and told me I could delete the workaround later if it wasn’t needed. For the retail-site PDF issue, it checked the contents of the saved file itself, noticed the problem, and even added a check to avoid saving anything that wasn’t actually a PDF. On the OAuth screens, it walked me through where to enter what at every step, and I mostly just clicked where I was told.
Stopping where it should stop
Another thing that impressed me was that it properly stopped where it needed to stop.
The online English conversation service’s receipt can only be issued once; after that it’s marked “reissued.” Claude noticed this and stopped to ask before issuing anything, until the billing name was settled. On the electronic parts retail site, changing the billing name to the company name required updating the billing information for each order, which conflicted with the instruction not to change settings — it asked me to confirm before proceeding. I granted an exception, and only then did it move forward. When I asked for it to run on the 1st of each month, it came back and told me that GCP’s invoice arrives on the 2nd, so running it on the 1st would mean it could never be fetched. That made me laugh. Fair point, now that it mentioned it.
In the end, what I did was log in, make judgment calls about the billing name, which documents to fetch, and where to draw the line between months, and click around in the Google Cloud console. When something failed, Claude read the logs and screenshots itself, found the cause, fixed it, and reran it. I mostly just watched from the side.
Deliberately skipping full automation
At the very end I changed one policy. I had initially set it up to run automatically at the start of each month via launchd, but I had it changed so that I trigger it explicitly myself instead. I don’t want to miss a site that needs re-login, and I want to notice right away if something breaks due to a change on a site’s end. I’ll watch how it goes for a while, and maybe switch back to automatic execution once it’s stable.
Easier from next month on
For September, 35 files from 10 sources — email-based and web-based — landed in the folder following the naming convention, all correctly in place. From next month, the procedure is just this.
1. Log in to the bank's site using the dedicated Chrome profile
2. ./run_monthly.sh
3. Handle any login prompts that come up along the way
Much easier now.
Looking back, I think what I was lacking wasn’t knowledge but the patience to step on the mines one by one. Once something else can take that on for you, work you already understood but never got around to turns out to be surprisingly quick to finish.
If you’re reading this, there’s probably at least one task you already know how to automate but keep doing by hand every month. Tasks exactly like that are worth handing off all at once, just to see what happens.
This piece was conceived and directed by Yuichiro Kuzuryu, written by AI.
Originally published in Japanese at https://clazytech.com/2026/10/1858/. Translated with LLM assistance and reviewed before publication.