https://github.com/saberzero1/habitica-google-calendar
Automatically sync Google Calendar entries as Habitica To Do items.
https://github.com/saberzero1/habitica-google-calendar
google-apps-script google-calendar habitica habitica-api habitica-api-v3 habitica-todo sync synchronization
Last synced: 3 months ago
JSON representation
Automatically sync Google Calendar entries as Habitica To Do items.
- Host: GitHub
- URL: https://github.com/saberzero1/habitica-google-calendar
- Owner: saberzero1
- License: gpl-3.0
- Created: 2021-07-20T08:27:20.000Z (almost 4 years ago)
- Default Branch: main
- Last Pushed: 2022-05-31T21:08:40.000Z (about 3 years ago)
- Last Synced: 2025-03-19T07:13:45.800Z (3 months ago)
- Topics: google-apps-script, google-calendar, habitica, habitica-api, habitica-api-v3, habitica-todo, sync, synchronization
- Language: JavaScript
- Homepage:
- Size: 74.2 KB
- Stars: 9
- Watchers: 1
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
[](https://habitica.com/apidoc/)
[](https://script.google.com/home)
[](https://github.com/saberzero1/habitica-google-calendar/blob/main/LICENSE)# Habitica Google Calendar Synchronization
Automatically sync Google Calendar entries as Habitica To Do items.
## Features
- 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.## Installation
- 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` and `CALENDAR_MAIL_ADDRESS` to match your Google Calendar account.
- Set the values of `HABITICA_TOKEN` and `HABITICA_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.
## Verifying installationTo 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](https://developers.google.com/apps-script/concepts/manifests) and change the timezone to one of the [valid values](https://docs.oracle.com/javase/8/docs/api/java/time/ZoneId.html) that correspond to the timezone of your calendar.