I’ve seen a few requests for YNAB (You Need A Budget) to support some more advanced net worth tracking, such as tracking home value automatically. Personal Capital supports this out-of-the-box, but I thought it’d be fun to add it onto YNAB as well.
For this project we’ll be using Google Apps Script again, since it’s easy to use and accessible to pretty much everyone. For the home data we’ll be using Zestimate, since it’s pretty much the only publically available home value estimation tool.
Generate a YNAB Personal Access Token
Follow the Getting Started instructions on YNAB’s API documentation page to generate a Personal Access Token.
Get a Zillow Web Services ID (ZWSID)
- Create an account on Zillow, or sign into your existing account.
- Follow the Get Started instructions to sign up for API access.
- Choose only the Property Details API unless you plan to do anything else with your ZWSID that might require access to the other endpoints.
- You should receive an email with your ZWSID shortly after filling out the form.
API Signup Page
Create a Tracking Account in YNAB
If you do not already have an account in YNAB for tracking your home value, create one now.
- From your budget screen click Add Account.
- Choose Unlinked.
- Select Asset (e.g. Investment) from the account type dropdown, and then give the account a name and a starting balance.
The balance can be the current Zestimate value, or you can leave it blank, since this script will create an inflow for you on first-run.
Create a New Google Apps Script Project
- Go to script.google.com and choose New script, I’ve called my project YNAB Zestimate Automation.
- Replace the entirety of Code.gs with the following script and fill in your own details on lines 2-6:
Run the Report
From the Select function dropdown, choose the updateYnabHomeZestimate function, then press Run (the play button).
You will need to authorize the project to access external services (YNAB API, Zillow API).
Check Your Balance
If everything ran successfully you should have a new transaction in your tracking account, and your account balance should match your current Zestimate.
My zestimate is $177,081 but my account balance was $180,000 so a $2,919 outflow was added
Schedule the Report to Run Automatically
Click the timer icon and create a new trigger. I’m not sure how often Zestimates change, but I think once a month should be a good baseline for something like this.