Amazon Banner

Saturday, December 20, 2014

How to use import-gvhistory script to parse Google Voice data from Takeout and export it to a .csv file

I recently posted the import-gvhistory powershell script that I wrote, which parses the html files provided by Google Takeout when downloading data from a Google Voice account.  Below are step by step instructions on how to use the script.

Note: The link below to HTML Agility Pack goes to a codeplex page where you can download version 1.46.  There is a note at the top of the page that the latest version is available from NuGet.  Currently, the version on NuGet is 1.4.9.  Either of those versions will work, so for simplicity I recommend you just click the big purple download button and get v1.4.6 if you aren't already familiar with NuGet.


  1. Download your Google Voice data using Google Takeout.
  2. Extract the the zip file to c:\temp or another path of your choosing. 
  3. **Windows 7 Users** Download and install WMF4 to update Powershell to 4.0
  4. Download the HTML Agility Pack, unzip the file, open the NET45 folder inside, and copy HtmlAgilityPack.dll the same folder.  For example, I'll use c:\temp
  5. Open a new notepad window.  Copy the entire text of the script from this post, and save the file as c:\temp\import-gvhistory.ps1
  6. Open Powershell (It's probably in your start menu, under the name Windows Powershell )
  7. Type "cd \temp" (without the quotes)
  8. Type ". .\import-gvhistory.ps1" (without quotes.  Note that this begins with a period, a space, then another period, don't leave out that first period!)
  9. Type "import-gvhistory -path c:\temp\takeout\calls | export-csv c:\temp\GVHistory.csv"


That should take just a minute or two before the prompt comes back up.  Once you're back at the prompt, there will be a new file c:\temp\GVHistory.csv containing the details of all your google voice calls, texts, etc.  Those who are more comfortable working with powershell can leave off the export-csv part of the command and pipe the data to where-object or other tools to filter or otherwise manipulate the data as needed.

Tuesday, December 16, 2014

import-gvhistory: Export Google Voice SMS/Text Messages and Call logs to CSV using Powershell

Here is a script I wrote to parse the thousands of HTML files produced by Google Takeout when exporting Google Voice data.  This script parses the html files to gather the Contact Name, Number, time, type (Placed/received etc), duration, and (text/voicemail) message contents for every phone call and text message, and outputs them as a powershell object which can be further filtered or manipulated and then exported into a csv or other format as needed.

Basic examples of how to use this script are included in the script comments.  If you download the script and have trouble, or if it works perfectly, please leave a comment and let me know.

**Update 12/20/2014** I've just posted step by step instructions for how to use the script..
**Update 11/16/2015** The script has been updated due to a change in how Google Takeout exports the timestamps.