Cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Automatically send sleep data using time intervals rather than when something is logged

Good afternoon,

 

I am wanting to link my Fitbit in a way where every hour or two my sleep data is transferred to a google document. I saw a tutorial on linking it using an API and getting a Fitbit access token in order to do so, however, I haven't been successful in the process. Does anyone know a feasible way to do this? 

 

Reasoning: I am doing research and have a script that can pull the data from the google document and then put it into our database, where our reasoning engine is determining if the user has slept enough hours to achieve a 'decent' sleep and if not, then the reasoning engine cross references with the users calendar and if no appointments or meetings exist then the users alarm can be pushed back. Granted this does mean that the users calendar and whatever alarm they use is linked to the smart-home environment. 

Best Answer
2 REPLIES 2

Hello @cwmiles I've moved your post out of hardware support and into API support. 

Best Answer
0 Votes

Hi @cwmiles 

 

You can use the Web API to do this.   Fitbit doesn't offer sample code but I have seen some through internet searches.   If you are not program-savvy, I found where IFTTT has a solution (https://ifttt.com/connect/fitbit/google_sheets) you can try.  If you're program-savvy, check out blog https://www.joe0.com/2020/08/02/how-to-sync-fitbit-data-to-google-spreadsheet-vs-2-aug-2020/.   This is the most recent code sample I've seen, but I believe some of the google code might have been deprecated.   If someone in the developer community has a more recent code sample, please share.

 

Gordon

 

 

Gordon Crenshaw
Senior Technical Solutions Consultant
Fitbit Partner Engineering & Web API Support | Google
Best Answer
0 Votes