Track the Value of Your Vehicle with a vinAudit Script

Based on the [Track the value of your home via a Zillow script example I created a Google script that will track the value of a car using the VIN number and vinAudit.

vinAudit (Simple) Automation

The tiller-vinaudit-simple script is a simple Google Apps Script to scrape vinAudit estimates of a car values and insert them into the Balance History sheet of Tiller-enabled spreadsheets. This workflow is especially useful for tracking net worth.

Visit Tiller HQ to learn more about Tiller.

Adivsory

This simple script is designed for intermediate users and includes only lightweight error checking. We hope it meets your needs out of the box, but further tweaks may be required to get it working in your environment. We offer no warranties or support for this solution.

Setting Up Your Project

To configure your project, implement the following steps in Google Sheets:

  1. Find your vehicle’s VIN #.
  2. Open the Tiller Google-Sheets spreadsheet you’d like to add your vehicle’s value to.
  3. Click on Tools -> Script editor to open the spreadsheet’s bound scripts.
  4. Copy the contents of vinaudit.js from this repo into the Google Sheets script editor.
  5. Set the vins variable (at the start of the code) equal to your vins.
  6. Save the script file and name it carEstimator .
  7. Click on the Select Function dropdown in the control bar and select the vinAuditInsert function.
  8. Click the run/play button.
  9. Select Review Permissions and select the google accounts associated with your Tiller Account.
  10. You’ll get a warning saying “This app isn’t verified”. Select Advanced and Go to carEstimator (unsafe) .
  11. Select Allow.

If you’ve completed all the steps successfully, you should have a new entry in your Balance History reflecting the viAudit estimate of the vehicle.

Run Monthly

  1. In the script editor select Edit > Current Project's Triggers .
  2. Select event source = Time-driven.
  3. Select your desired options.

Taking This Solution Further…

Consider adding:

  • An onOpen() function to create a menu item to execute an update
  • Triggers to automate script execution

I love that you were able to get some mileage out of that simple zillow script, @kevinmclaughlin!
Thanks for sharing this new workflow. It is a great addition to Tiller Money.

Randy

2 Likes

This is very cool. Great addition to my net worth dashboard!

Hey team, was able to get this working, but for some odd reason I cannot get the value to come over? Any ideas?

This is all I get.

12/23/20 9:40 AM vinAudit: undefined 1234 vinAudit-1234 vinAudit - API 12/1/20 12/20/20 PROPERTY Asset
12/23/20 9:40 AM vinAudit: undefined 12345 vinAudit-12345 vinAudit - API 12/1/20 12/20/20 PROPERTY Asset

If you run it from the Apps Script Editor does it run clean, or does it error out? I’m thinking maybe the VIN you entered isn’t a proper VIN or it can’t find it.

Hey! I ran it without any errors. It populates a row in my balance history sheet but does not bring in the amount.

I thought the same thing on the vin number, but when I put the vin into the website directly, it does pull my car and value.

Maybe it’s the formatting, here’s what my ‘vins’ line looks like in the script, with quotes around the VIN, and brackets around the quotes:

var vins = [“XXXXXXXXXXXXXXXXX”];

For what it’s worth, I think the quotes they give are very high. They are significantly greater than what I get from KBB.com and a couple other sites I tried.

2 Likes

I think I am doing something so obvious I cannot see passed it, lol. Question below, @jpfieber

var vinAuditId = " WHAT GOES HERE";

var vins = [“MY VIN”];

var vinAuditId = “VA_DEMO_KEY”;

There we gooo!! Thank you!

1 Like

I am getting this error when I run the vinAuditInsert

TypeError: header[columnIndex].trim is not a function
at vinAuditInsert(carEstimator:28:33)

I don’t use this script, @orion53, but .trim may need empty parentheses after it.
header[columnIndex].trim()

https://www.w3schools.com/jsref/jsref_trim_string.asp

The empty parentheses is in the script. I tried removing an re-adding them in. I am not seeing the trim method populate as I type it in the location it is set to inside the bracket after the columnIndex. If I start to type it after the toLowerCase() it populates.

columns[header[columnIndex].trim().toLowerCase()] = columnIndex;

try adding in a toString.

header[columnIndex].toString().trim().toLowerCase()

I had the same problem, started 17 days ago. I just added toString() as suggested, and that fixed it, but the value I get back for my car is far from realistic (almost $10k over valued, used to at least be similar to what other services suggested), and my wife’s car isn’t returning a value at all (it used to), so I’m thinking it’s time to abandon this and manually look up the values myself every now and then, as I have to on Zillow for the house.