A simple script to synchronize your Peloton schedule with Google Calendar. peloCal works with both live classes and sessions across all activity types.
- Make a copy of the deployed script to your Google account by going to the Overview menu and then clicking the Make a copy icon on the top right.
- Store your Peloton credentials in the
pelotonUsername
andpelotonPassword
script properties under Project Settings > Script Properties - Deploy your project (optional). If you don't deploy/version your project the Head deployment will be used.
- Set up a time-driven trigger under Triggers on the left menu so it runs automatically. Below is an example on setting the script to run every 10 minutes:
- "Choose which function to run" should be set to
run
- "Select event source" should be set to
Time-driven
- "Select type of time based trigger" should be set to
Minutes Timer
- "Select minute interval" should be set to
Every 10 Minutes
- "Choose which function to run" should be set to
- Update the
timeZone
to your timezone (see list) inappsscript.json
in the Editor (this ensures events in the past do not accidently get deleted) - Check for successful/failed executions under Executions on the left menu
- Please be kind to the Peloton API and don't set too aggressive of a trigger (e.g. every minute), or you may find yourself rate limited.
- This script interacts with unofficial, undocumented endpoints, meaning it can and probably will break if Peloton changes their API.
- Thanks to @DovOps for his incredibly helpful unofficial Swagger docs for the Peloton API.
- Output an .ics file for compatibility with non-Google calendar apps.