Case Study: Automating Appointment Checks with Playwright, 2Captcha, and Mailtrap

Konstantin KomelinKonstantin Komelin

Imagine having to open the same web page every day, enter a number from a captcha, and press a "Check" button. It's not a nightmare - it's reality. Even in 2025, there are still services without any notification system, and I was forced to use one of them - fortunately, not for long.

Appointment Queue Position: Sketch

To borrow a rare book from a library, I needed to schedule an appointment. Because that section of the library had somewhat limited capacity, there were over 1000 people in the queue. Sadly, their website hadn't been touched by a developer in what seemed like 20 years, so there was no notification system in place. That meant I had to check my queue position manually every day for about three months. I would typically spend 3-4 minutes on the site each day - which adds up to more than 4.5 hours over 90 days (3.5 minutes * 90).

As a programmer, I couldn't stand repeating such a tedious task, so I decided to act.

What needed to be done:

  1. Open the appointment page.

  2. Solve a noisy numeric captcha.

  3. Enter the number from the captcha into a text field and press the "Check Queue Position" button.

  4. Fetch the queue position number from the text on the results page.

  5. Send an email with the queue position to my address.

  6. Repeat every day.

What I used for the solution:

  1. Node.js without types for simplicity.

  2. Playwright to navigate the site, take a screenshot of the captcha, and extract the text.

  3. 2Captcha API to solve captchas. It cost me about $0.01 per captcha - less than $1 over three months.

  4. Mailtrap API to send emails. Their free tier includes 1000 emails/month, so I didn't spend anything there.

  5. Claude Code to speed up the development - just a few extra cents I guess.

  6. Linux cron to run the script daily.

Results

  • I receive my queue position via email every day.

  • I no longer need to visit the outdated library site at all.

  • It cost me a couple of bucks for APIs and Claude Code, plus a couple of hours of development.

  • I'm freaking happy about it.


Now let me leave you with one conclusion: if you repeat a boring task every day, it's time to automate!