How To Download Fitbit Data Using Google Spreadsheets: An Update

February 19, 2013

Editors Note: The method outlined below no longer functions. We are keeping it up for archival purposes. (3/22/19)

Editors Note: We’ve updated this post to reflect Google’s move to a new version of their spreadsheet application. The newest version no longer support the Script Gallery mentioned here. We have included a link in the instruction steps below that allows you to use the old version of Google Spreadsheets. We’ll keep an eye out and update this post again if the old version is taken down. We’ve also included a new set of instructions if you’d like to use the new Google Spreadsheets. This involves slight editing to a simple script (updated 09/22/14). 

Interested in downloading your minute-by-minute Fitbit data? Check out our new how-to here! (updated 09/26/14)

We’ve updated the script to reflect Fitbit’s move to only accept HTTPS requests to access their API. Make sure to update your own scripts if you’ve modified the one linked below in Step 4 (updated 10/15/14). 

If you’re like me, then you’re always looking for new ways to learn about yourself through the data you collect. As a long time Fitbit user I’m always drawn back to my data in order to understand my own physical activity patterns. Last year we showed you how to access your Fitbit data in a Google spreadsheet. This was by far the easiest method for people who want to use the Fitbit API, but don’t have the programming skills to write their own code. As luck would have it one of our very own QS Meetup Organizers, Mark Leavitt from QS Portland, decided to make some modifications to that script to make it even easier to get your data. In this video below I walk you through the steps necessary to setup your very own Fitbit data Google spreadsheet.

Step-by-step instructions after the jump.

  1. Set up your Google spreadsheet and script
    • Create a new google spreadsheet. Important: You must use the old version of Google Sheets. You can access that here – g.co/oldsheets (If you want to use the new version of Google Spreadsheets skip to Step 2.)
    • Go to Tools->Script Gallery
    • Enter “fitbit” in the search box and hit search
    • Install the “Fitbit Download” script by clicking install.
    • Click authorize in the dialog box.
    • Click “ok” in the new window that opens.
    • The script is now installed on your spreadsheet.
    • Close the script gallery dialog box.
  2. Set up your FitBit Developer account and register an app.
    • Go to dev.fitbit.com and sign in using your FitBit credentials.
    • Click on the “Register an App” at the top right corner of the page.
    • Fill in your application information. You can call it whatever you want.
    • Make sure to click “Browser” for the Application Type and “Read Only” for the Default Access type fields.
    • Read the terms of service and if you agree check the box and click “Register”
  3. Copy the API keys
    • Copy the Consumer Key.
    • Copy the Consumer Secret.
    • You can save these to a text file, but they are also available anytime you return to dev.fitbit.com by clicking on the “Manage my Apps” tab.
  4. Authorize the Fitbit Download Script
    • Go back to your Google spreadsheet.
    • Go to Tools->Script editor
      • If you have chosen to run the new version of Google Spreadsheets you must download this script, copy it’s contents, and paste into the script editor window. Make sure to delete all text in the editor before pasting. You can then follow along with the instructions below.
    • Select “setup” in the Run drop down menu. This will open a dialog box in your spreadsheet.
    • In your spreadsheet past the Consumer Key and Consumer Secret that you copied from your application on dev.fitbit.com.
    • Enter the day to start retrieving data. If you know when you purchased your Fitbit I would suggest using that date.
    • Select the data you want to save to your spreadsheet. By default all available Fitbit data is selected.
    • Click “save setup”
    • Go back to your script editor window
    • Select “authorize” in the Run drop down menu. This will open a dialog box in your spreadsheet. Click yes.
    • A new browser window will open and ask you to authorize the application to look at your Fitbit data. Click allow to authorize the spreadsheet script.
  5. Download your Fitbit Data
    • Go back to your script editor window
    • Select “sync” in the Run drop down menu. This will download your Fitbit data to the spreadsheet.
  6. Set up an automatic trigger to automatically update your spreadsheet with new data on a specific schedule.
    • Go to Tools->Script Editor
    • Go to the “Resources” menu and select “current project’s triggers”
    • Add a new trigger that runs “sync” that is ‘time driven’ and choose an interval for the spreadsheet to update. I currently have mine set to “daily” updating between “midnight to 1am” but feel free to choose something different.
    • Click save.

Now that you’ve set it all up your Fitbit data will automatically be downloaded to that spreadsheet. As you may know, there are a wide variety of charts and Google Gadgets that you can use to visualize that data.

If you’re using this method to look at your Fitbit data we want to know! Use the comments below to tell us what you’re learning from your Fitbit data and what types of visualizations or analysis you find most useful.

Related Posts

The Personal Data Exploratory On Open Humans

Bastian Greshake Tzovaras

August 30, 2018

Editors Note: The method outlined below no longer functions. We are keeping it up for archival purposes. (3/22/19) Editors Note: We’ve updated this post to reflect Google’s move to a new version of their spreadsheet application. The newest version no longer support the Script Gallery mentioned here. We have included a link in the instruction...

What We Are Reading

Steven Jonas

April 25, 2016

What We Are Reading Newsletter from Apr 25, 2016

What We Are Reading

Ernesto Ramirez

September 12, 2015

What We Are Reading Newsletter from Sep 12, 2015