Export Google Fit Daily Steps, Weight and Distance to a Google Sheet

Updated on Friday, December 29, 2023

Comments Page 17

Return to post.


Robert Ellison

Chi, I don't currently track sleep so it's not something I can test. It is available via the API so should be possible to pull. Check the API explorer link in the article, this is pretty helpful for finding out what's available for your Google Fit account.


Hello :) Thank you for posting all this, I was able to set it up. Is there a way to add sleep data as a column as well?

Agnes Krawczyk

Thank you, Robert! I'm not sure why I hadn't noticed that instruction before, but it worked! Last night, data was automatically pulled for the first time.

Robert Ellison

Agnes - try following the steps in the second to last paragraph of the post to remove Google Fit access, reset and then authenticate again.

Agnes Krawczyk

Hello Robert, I now have basic functionality with this sheet and it pulls the data I need. The only problem now is with the automation. It loses authentication daily, so I have never seen it run automatically. Any idea what might be going on?


That was the problem.

I completely forgot about that.

Thank you very much,


Robert Ellison

Asier - it's failed to get an object for the sheet, so my guess is you didn't rename the tab to 'Metrics' - can you check this?


I'm getting this error:

TypeError: Cannot call method "appendRow" of null.

Any ideas?

Mark Perrin

This is great! Thanks to all who contributed.

I've been looking for the resting heart rate data point and haven't figured it out. Anyone willing to share that?



Agnes Krawczyk

Well. I mostly sorted it out. Turns out I hadn't enabled the Google fitness API. This is my first time working with APIs, and it's all so strange and magical. I've been able to pull today's data plus 80 days. 800 was too much for the software, so I'll figure out some way to programmatically import in chunks.

Thanks again!

Add Comment

All comments are moderated. Your email address is used to display a Gravatar and optionally for notification of new comments and to sign up for the newsletter.