April 8, 2026
Vibe Coding Gone Right: How I Built a Bot to Book an Impossible Appointment

I'm Italian and I live in Spain, and I needed to renew my Carta d'Identità Elettronica (CIE), the Italian electronic ID card. The way it works is you go to a government booking portal, fill in a form with your personal details, and check if there's an appointment slot available somewhere in your city. There never is, though. Slots appear at random times, at random offices, with no warning, and they disappear within minutes. I spent a few days refreshing the page manually and the first couple of times I actually saw something, it was an appointment for the next year 😂 When you live abroad and have to plan trips home around this stuff, that's not really an option.

Google had just released Gemma 4 around the same time and I wanted to test it, so I had the perfect excuse to automate the whole thing. I opened Claude Code with Opus and just described what I wanted: a bot that opens the portal, fills in the form, checks for available slots, and pings me on Telegram if it finds something. I reviewed the diffs as they came in, made sure the form fields were getting filled correctly, and checked that the bot was picking the right CSS selectors.
The bot runs every 2 minutes with Playwright (headless Chromium). The government site has some quirky Materialize CSS dropdowns and typeahead components that were annoying to automate, but Claude handled most of that. For the visual parts of the form, I'm running Google's Gemma 4 locally through Ollama, a vision model that runs entirely on my machine, no API costs, no cloud, nothing. The lightweight e4b variant doesn't need a beefy GPU and it's good enough for what I needed.
When a slot shows up, the bot sends me a Telegram message with the details and a screenshot, so I can just open the link and book right away.

It ran for about 3 days straight, over 350 automated checks. Manually I'd only seen slots available maybe 30% of the time, and they were always for the next year. With the bot running every 2 minutes it found slots way more often, but they'd get booked within minutes by someone else. Eventually one stuck, I got the notification in time, and I booked my appointment.
This is the kind of project where vibe coding actually makes sense. I didn't need clean, reviewable, production-ready code. I needed something that works for a week and then goes in the trash. I wouldn't put my hand on the fire for vibe coding on a real product, but for a personal bot like this, every time.
Stack
- Python + Playwright (headless Chromium)
- Ollama + Gemma 4 (e4b) for local vision processing
- Telegram Bot API for notifications
- Claude Code (Opus)
I'm Andrea Giannini, a full stack developer and product builder based in Valencia.