Google Apps Script for Withings
Google Apps Script for Withings
1B7FSrk5Zi6L1rSxxTDgDEUsPzlukDsi4KGuTMorsTQHhGBzBkMun4iDF
(OAuth2).CLIENT_ID
: CLIENT_ID of API.CLIENT_SECRET
: CLIENT_SECRET of API.EMAIL
: Optional. If not set, use the email address of script owner to notify errors.https://script.google.com/macros/d/<SCRIPT_ID>/usercallback
SCRIPT_ID
is found in the menu of Apps Script: File -> Project properties -> Script IdEdit params.gs if you want to change the parameters.
Open Measure.gs
and run function body
.
Open Sleep.gs
and run function sleepSummary
.
It is good to schedule the job to retrieve messages every day.
Trigger
(Clock icon) in the Apps Script project.Add Trigger
body
Head
Time-driven
Day timer
0 am to 1 am
This trigger fill body data between 0 am to 1 am every day.
Set a trigger for sleepSummary
as well.