Including Redfin Home Values Automatically

I wanted to include the value of my home in my assets and could not find an automated way to do it until recently. The way that I implemented this solution expands upon this thread: Home Value for Net Worth - #13 by jpm.moore

Also, this solution impacts the following Tiller sheets:

  • Balance History - This sheet might be hidden. I will add a link to unhiding this sheet if it is not available in your Tiller instance.
  • Accounts
  • Balances
  • Net Worth

Here are the steps to implement it:

Pulling the value of your house from Redfin
To successfully test that your pulling the Redfin data correctly, it is recommended that you create a new sheet for testing purposes. You can delete the sheet later.

  1. Obtain the ā€œRedfin_URLā€ value by searching for your address at the following URL:
    How Much Is My House Worth? | Home Value Estimator | Redfin
  2. Click the home image directly above the value in the middle of the page. See the following example:
  3. Copy the URL for the home image page into a text file so that you can reference it in the next step.
  4. Replace ā€œRefin_URLā€ in the following call with the URL from the previous subset:
    =IMPORTXML("Redfin_URL","//*[@class='statsValue']/span")

For example, if my address was 100 Main Street Austin, TX 73301 and Redfin had assigned 12345678 as the reference number for the address, the call would likely be:
=IMPORTXML(ā€œhttps://www.redfin.com/TX/Austin/100-Main-St-73301/home/12345678","//*[@class=ā€˜statsValue’]/spanā€)
Note: That is a fictious address.

If you see your home value, proceed to the next section. Otherwise, refer to the thread at the top of the post for pulling home values from Redfin.

Configuring an App Script to automatically retrieve the value
Now that you know your home value according to Redfin, we are going to automate the retrieval of that information on a periodic basis. This automation will enable Tiller to automatically include your home value in the list of assets on the Balances Sheet.

  1. Click Extensions > Apps Script from the Google Sheets menu.
  2. Click + in the Files row at the top of the Apps Script page and select Script.
  3. Enter a title for the script. I chose ā€œHomeValueā€.
  4. Enter the following code for the function in the center section:
function HomeValue() {
var spreadsheet = SpreadsheetApp.getActive();
spreadsheet.getRange('2:2').activate();
spreadsheet.getActiveSheet().insertRowsBefore(spreadsheet.getActiveRange().getRow(), 1);
spreadsheet.getActiveRange().offset(0, 0, 1, spreadsheet.getActiveRange().getNumColumns()).activate();
spreadsheet.getRange('B2').activate();
spreadsheet.getCurrentCell().setFormula('=TODAY()');
spreadsheet.getRange('C2').activate();
spreadsheet.getCurrentCell().setFormula('=TEXT(NOW(),"h:mm AM/PM" )');
spreadsheet.getRange('D2').activate();
spreadsheet.getCurrentCell().setValue('<Address>');
spreadsheet.getRange('F2').activate();
spreadsheet.getRange('F35').copyTo(spreadsheet.getActiveRange(), SpreadsheetApp.CopyPasteType.PASTE_NORMAL, false);
spreadsheet.getRange('G2').activate();
spreadsheet.getRange('F35').copyTo(spreadsheet.getActiveRange(), SpreadsheetApp.CopyPasteType.PASTE_NORMAL, false);
spreadsheet.getRange('H2').activate();
spreadsheet.getCurrentCell().setValue('<Mortgage_Holder>');
spreadsheet.getRange('I2').activate();
spreadsheet.getCurrentCell().setFormula('<Redfin_Home_Call>');
spreadsheet.getRange('L2').activate();
spreadsheet.getCurrentCell().setValue('INVESTMENT');
spreadsheet.getRange('M2').activate();
spreadsheet.getCurrentCell().setValue('Asset');
spreadsheet.getRange('N2').activate();
spreadsheet.getCurrentCell().setValue('ACTIVE');
};
  • In line 11, replace with your street address. For example, 100 Main Street.
  • In line 17, replace <Mortgage_Holder> with the name of the company that manages or services your home loan. If you are lucky enough to not have a home loan, enter any value, such as ā€œSelfā€. This value will be used as the Institution value on Tiller’s Balance History sheet.
  • In line 19, replace <Redfin_Home_Call> with the value from the results of the ā€œPulling the value of your house from Redfinā€ section.
  1. Click the Save icon at the top of the page. The icon is to the left of the Run icon.
  2. Click Run. If the script is successful, the execution log at the bottom of the page should show that it started and completed. For example:
  3. Return to Tiller and open the Balance History sheet. At the top of the sheet, you should now see a value for your home in Row 2. For example:
    Balance_History

Configuring an Apps Script trigger
With the expectation that the value is present in the Balance History sheet, let’s set up automation to pull the home value on a scheduled basis.

  1. Return to Apps Script. If the window has closed, click Extensions > Apps Script from the Google Sheets menu.
  2. Click the Triggers icon on the left side of the Apps Script page. The icon is 4th icon down on the left and resembles an old alarm clock. See:
  3. Click Add Trigger in the bottom left corner of the page. See: Add_Trigger
  4. Select the name of the script to run from the Choose which function to run menu. For example, ā€œHomeValue,ā€ which is the name of the script from the ā€œConfiguring an App Script to automatically retrieve the valueā€ section.
  5. Select Time-driven from the Select event source menu.
  6. Select the frequency to run the script from the Select type of time based trigger menu. Because home values do not fluctuate very frequently, I would recommend that you do not run the script more than weekly. Depending on the frequency that you select, additional time-based menus display for further clarification. I also indicated that it should run during the middle of the night (between 1 AM and 2 AM) when there is likely less traffic pulling data from the Redfin site.
  7. Click Save.

Adding your home to your list of accounts
At this point, if you are leveraging the Accounts sheet, you will find your home in the list of accounts. Complete these steps for the Accounts sheet:

  1. Select your home from the list of accounts.
  2. Assign a Call Override value, such as Asset.
  3. Assign a Group value, such as Real Estate. If you add it to your Accounts sheet with those values, you see your home value listed in the Assets column on the Balances sheet under the REAL ESTATE heading. For example:
    Real_Estate

It will also impact the information on the Net Worth sheet.

If you have completed all of the steps. you should see the home value be updated in the various Tilller sheets based on the frequency that you indicated for the App Script.

Enjoy!

This is very cool, @bwentwor. I know a lot of community members are interested in tracking their home value in this way.

I like this, there was a lot of issues with getting the formula pasted into scripts to use quotes I found escape key \ worked for me

Does anyone know if this is still working? The IMPORTXML part, not the script.

At first it didn’t work due to the quote marks. Google sheets doesn’t like the slanted, opening and closing single and double quote marks.

Original:

=IMPORTXML(ā€œ[https://www.redfin.com/TX/Austin/100-Main-St-73301/home/12345678","//*[@class=ā€˜statsValue’]/span")

I changed them all to straight up and down ones:

=IMPORTXML("[https://www.redfin.com/TX/Austin/100-Main-St-73301/home/12345678","//*[@class='statsValue']/span")

But then i’m still getting ā€œcouldn’t fetch the URL errors.ā€ However if i copy the url that i’m using into a browser, I get the page.

Hi @jono.
Yes, it is working for me. Let me take a look and see how I can help. It will be tomorrow morning before I can dive in, however.

1 Like

Hi @bwentwor
Thanks for your offer to help. BUT, good news.
I checked my sheet again an hour later and it is working. I see the correct home value.

So, maybe it was a temporary internet connection issue. But it wasn’t a formula issue (other than the single and double plain quotes.)

While your script is nice, I also use just the first part (scraping the home value) and put it on my Dashboard. In the past, I would manually update the home value once a month. But now on the home page I can see if my manually updated value matches the live lookup value.

This sounds great, but cannot get the IMPORTXML to pull the value. Here is my formula- IMPORTXML(ā€œhttps://www.redfin.com/FL/Orlando/12538-Floridays-Resort-Dr-32821/unit-603C/home/162217683","//*[@class=ā€˜statsValue’]/spanā€)

I get the error…
Error Could not fetch url: https://www.redfin.com/FL/Orlando/12538-Floridays-Resort-Dr-32821/unit-603C/home/162217683

What am I missing?

That’s the same error i was getting @Cowboy13 .
But then an hour later, it worked, without me changing anything.

I had 3 different properties I was trying. The condo example I gave above is now working. I copy and pasted the (now) working condo ImportXML function and just changed the URL. However, my 2 other properties are still showing #N/A with the same error I mentioned above.

I’ll see what it looks like tomorrow.

I can’t get mine to work nor can I get other people’s examples working. This juice isn’t worth the squeeze. Just do a manual transaction account balance update

I am sorry that you are haing difficulty. The problem might be with RedFin. Here is the exact code that I am using with my true address changed. It will add a new line to Balance History Spreadsheet for the property address, mortgage company, and investment value.

function HomeValue() {
 var ss = SpreadsheetApp.getActiveSpreadsheet();
 var spreadsheet = ss.getSheetByName("Balance History");
  spreadsheet.getRange('2:2').activate();
  spreadsheet.getRange('B2').activate();
  spreadsheet.getCurrentCell().setFormula('=TODAY()');
  spreadsheet.getRange('C2').activate();
  spreadsheet.getCurrentCell().setFormula('=TEXT(lambda(x;x)(now()),"h:mm AM/PM" )');
  spreadsheet.getRange('D2').activate();
  spreadsheet.getCurrentCell().setValue('1234 Main St');
  spreadsheet.getRange('F2').activate();
  spreadsheet.getRange('F35').copyTo(spreadsheet.getActiveRange(), SpreadsheetApp.CopyPasteType.PASTE_NORMAL, false);
  spreadsheet.getRange('G2').activate();
  spreadsheet.getRange('F35').copyTo(spreadsheet.getActiveRange(), SpreadsheetApp.CopyPasteType.PASTE_NORMAL, false);
  spreadsheet.getRange('H2').activate();
  spreadsheet.getCurrentCell().setValue('John Mortgage');
  spreadsheet.getRange('I2').activate();
  spreadsheet.getCurrentCell().setFormula('=IMPORTXML("https://www.redfin.com/TX/Austin/1-Main-St-12345/home/99999999","//*[@class=\'statsValue\']/span")');
  spreadsheet.getRange('L2').activate();
  spreadsheet.getCurrentCell().setValue('INVESTMENT');
  spreadsheet.getRange('M2').activate();
  spreadsheet.getCurrentCell().setValue('Asset');
  spreadsheet.getRange('N2').activate();
  spreadsheet.getCurrentCell().setValue('ACTIVE');
};

Let me use your address info and see what happens. I’ll post again.

I updated the Redfin URLs with various addresses (with and without unit #s) and I am getting NA# for the value as well. It is an issue with the value being retrieved from Redfin. As someone else mentioned, I would configure it and give it a few days to see if the error is replaced with a value. My hypothesis is that the error will resolve. I don’t have know why it will not give you a value right after the initial configuration. While it doesn’t solve the problem, I can say that I have been using the process successfully for many months.

I appreciate your support on this. I’m 302 Good Life Way Hardeeville SC 29927. I couldn’t even get step 1 working

I added your address to a test run and am getting that error as well. Let me see if that changes over the next few days and I will get back to you. I want it to work for people as well as it seems to work for me!

Hi! I just checked after a few hours and your home information is being pulled correctly into my spreadsheet.

Screenshot 2025-04-02 at 4.36.42 PM

Here is the code that I used:

function HomeValue() {
 var ss = SpreadsheetApp.getActiveSpreadsheet();
 var spreadsheet = ss.getSheetByName("Balance History");
  spreadsheet.getRange('2:2').activate();
  spreadsheet.getRange('B2').activate();
  spreadsheet.getCurrentCell().setFormula('=TODAY()');
  spreadsheet.getRange('C2').activate();
  spreadsheet.getCurrentCell().setFormula('=TEXT(lambda(x;x)(now()),"h:mm AM/PM" )');
  spreadsheet.getRange('D2').activate();
  spreadsheet.getCurrentCell().setValue('Test EntrySC');
  spreadsheet.getRange('F2').activate();
  spreadsheet.getRange('F35').copyTo(spreadsheet.getActiveRange(), SpreadsheetApp.CopyPasteType.PASTE_NORMAL, false);
  spreadsheet.getRange('G2').activate();
  spreadsheet.getRange('F35').copyTo(spreadsheet.getActiveRange(), SpreadsheetApp.CopyPasteType.PASTE_NORMAL, false);
  spreadsheet.getRange('H2').activate();
  spreadsheet.getCurrentCell().setValue('Wells Fargo');
  spreadsheet.getRange('I2').activate();
  spreadsheet.getCurrentCell().setFormula('=IMPORTXML("https://www.redfin.com/SC/Hardeeville/302-Good-Life-Way-29927/home/183167855","//*[@class=\'statsValue\']/span")');
  spreadsheet.getRange('L2').activate();
  spreadsheet.getCurrentCell().setValue('INVESTMENT');
  spreadsheet.getRange('M2').activate();
  spreadsheet.getCurrentCell().setValue('Asset');
  spreadsheet.getRange('N2').activate();
  spreadsheet.getCurrentCell().setValue('ACTIVE');
};

Let me know if it does not work.

It worked once but I already had a manual asset for my home with the same name. It created some work to combine them and something went wrong along the way. I think it’s just going to be easier to update the manual home once a month for me. Thanks for the help and I still have the link that step 1 created so that’s good.

I was interested in using this script but my sheet that I setup for 2025 doesn’t have/show Balance History. You said at the first that you would give a link to unhide it, but I sure can’t find it anywhere.

@wells.pdx Welcome to Tiller, Chuck. The Balance History sheet is hidden, by default. Here are the instructions to unhide it:

  1. Access the View menu at the top of the Google Sheet.
  2. Select Hidden Sheets > Balance History.