2020 is the year of improvement — for the self, for the government and the institutions that be, and for spending habits. My method of budgeting has embraced this theme and has honed itself from a semi-acceptable process (using Selenium and Beautiful Soup) to one that is refined and seamless (using the Gmail API).

I first stumbled upon the idea of using Gmail when I noticed I received an email every time I completed a transaction with Venmo. These emails included all the information I needed for my budget — the date, the merchant, and the amount. I investigated the Gmail API to see if I could parse out this information and insert it into Google Sheets. This was a surprisingly pain-free process, and I found I could get similar transaction emails with each of my credit cards by turning on email notifications for any transactions over $0.00.

Image for post

Option to turn on transaction notifications for a credit card

Unlike my previous method with Selenium and Beautiful Soup, using the Gmail API provides greater security and access to historical data. The API only requires one authentication step, and does not need a plain text password on your local machine. You can also retrieve any past transaction in your inbox, as long as the email format has not changed. I then used the Google Sheets API to upload all these retrieved transactions for easy viewing, categorization, and aggregation. These substantial benefits make for a better user experience than before.

Image for post

#budgeting #personal-finance #api #programming #python

Follow Along With My Extreme Budget Makeover
1.25 GEEK