The Google Apps Script That Saves Me Hundreds on Books

About a year ago, I decided I needed to cut back on buying books. There were plenty of reasons for this—my personal collection had already surpassed 300 books (most of which I hadn't even read yet), the books I impulsively bought based on hype often turned out to be just okay, and my financial priorities had shifted. I wanted to allocate that money in a more intentional way.

Since then, I’ve made extensive use of my local library system and have been more selective about the books I purchase. Now, I only buy books if I have a strong belief that I’ll love them, I’ve already read and loved them and want a physical copy, or I know the content will be so thought-provoking that I’ll want to mark it up. Essentially, I’ve eliminated impulse book-buying and instead focused on curating a more meaningful to-be-read (TBR) list.

When one door closes, another opens

However, even with this shift, my TBR list never seems to shrink—I just keep adding to it. And to make matters worse, my library system recently reduced its hold limit for e-books from 25 to 10. This was a devastating change for me because I had been using my library holds as a sort of TBR tracker, with reminders conveniently popping up in my Libby app.

The problem became even more frustrating when I ran out of unread books on my e-reader. Since library holds often involve long wait times, I found myself in a situation where I had nothing new to read but didn’t want to fall back into impulsively buying e-books. So, what was the solution?

Modern problems require modern solutions

Enter the BookBub email list. I love this service—it sends me daily emails with deals on e-books. Now, I occasionally browse through the offers and load up my e-reader with books that pique my interest or that I already have on my TBR list but haven’t gotten around to yet. This way, I can still discover new books without falling into old spending habits, keeping my reading habit both fresh and financially responsible.

The BookBub website


BookBub’s deals are always such a steal - the cost of the books hover around $2. It also directly links the sales in every place you can buy. Since I have a Kobo it makes it super easy to go directly to the kobo store and purchase it there.

I was bemoaning the fact that I kept missing out on deals for books I was actually interested in because I was not consistent about actually checking the daily email. I decided to try my hand at writing a script to automate this process of cross-checking my TBR with the daily bookbub email. If it finds a match it could send me an email with the name of the book and which daily email it appears in.

Implementing a Google Apps Script

I had never implemented an apps script before but it was fairly straightforward. There are a few improvements I plan on making - for instance right now it copies over multiple instances of “We found a book on sale” into the email it sends me. Additionally if the name of a book from my TBR just appears in the description blurb of the book it gets picked up as a “match” so can be a little misleading. But already this script has been making it much simpler for me to stay up to date with these deals. I already purchased me first ever book thanks to this! I got Americanah by Chimamanda Ngozi Adichie.

The body of the email sent to me via my script.

Next
Next

Adding themes to a SwiftUI app using Environment Values