Automatically sync Google Calendar entries as Habitica To Do items.
- Automatically sync Google Calendar items to Habitica dailies.
- Automatically check off Google Calendar items when checked off in Habitica.
- Turn description lines into checklist items.
- Copy the contents of
habitica-google-calendar-v2.gs
into an empty Google App Scripts file. - Create a Google Calendar for the Dailies, or use an existing one.
- Set the values of
CALENDAR_NAME
andCALENDAR_MAIL_ADDRESS
to match your Google Calendar account. - Set the values of
HABITICA_TOKEN
andHABITICA_ID
to match your Habitica account. (Click here to find your tokens) - Set the number of days, including today, to sync ahead.
- Set a daily time-based trigger to execute
syncToHabbitica()
. I recommend every 5 minutes. - Insert some calendar entries in the Google Calendar.
- The program will automatically sync to Habitica.
To verify the installation, create a calendar entry with a description for today in the Google Calendar in the calendar selected earlier.
Manually execute the syncToHabbitica()
function and wait for it to finish.
The entry should appear in Habitica as a daily item.
Note: The default timezone for Google Scripts is America/Los_Angeles (Pacific time). If your calendar is in a different timezone, this will not be taken into account. The easiest way to address this is to add an app manifest and change the timezone to one of the valid values that correspond to the timezone of your calendar.