Google Contact Birthday Reminders

Google Contact Birthday Reminder
Having a large and extended Chinese family I found it hard to keep track of everyone's Chinese birthdays. Although Google Calendar provides alternate calendars, these calendars do not support events or reminders in terms of Chinese dates. I have always overcome this by manually converting the Lunisolar date to the Gregorian date and then creating the corresponding event each year in Google Calendar.

Additionally, Google provides a birthday calendar which obtains the birthday dates from Google Contacts. However, this calendar lacks reminders and I have found that at times, it does not synchronize correctly. Moreover, this calendar does not properly sync with my Android devices.

Note: The Chinese calendar is often mistaken as a Lunar calendar when in fact it is a Lunisolar calendar.

I wanted a solution that extracts the Chinese and Western birthdays from my Google Contacts and create them as annual events with reminders. As a result, I have created the following Google Contact Birthday Reminders Apps Script.

  • Creates Google Calendar events with reminders from Google Contact Western (Gregorian) Birthdays.
  • Creates Google Calendar events with reminders from Google Contact Chinese (Lunisolar) Birthdays.

How to use
  1. Ensure you are logged into the Google Contacts account you wish to generate birthday reminders for.
  2. Ensure all birthday entries are correct in Google Contacts. A contact can have only a single birthday which can be a Western or Chinese date (Chinese birthdays are distinguished in step 4).
  3. Dates must be valid (without the error icon ).Google Contacts Birthday
  4. For all contacts that have Chinese birthdays, add them to a new Google Contact Group called: "Chinese Birthdays" (or anything you wish). This contact group will be used by the Apps Script to determine which birthdays are Chinese birthdays. All other contacts not in this new group will be regarded as Western birthdays.Google Contact Chinese Birthday Group
  5. Authorise the Apps Script below by clicking on the "Click to Authorize" link at the bottom (only needs to be done once).
    • Note: None of your data is altered except for the new calendar to be created.
  6. A new page will pop-up, click on the Grant Access button and then close the page.
  7. Refresh this page:
  8. Using the Apps Script below, select the "Chinese Birthday" contact group.
    • All listed contacts will be exported to the new Google Calendar.
  9. Click the "Create Now!" button.
    • Please be patient, this may take a while depending on how many contacts you have.
  10. All done! The new birthday calendar with the selected reminders have now been created in your Google Calendar.

The Apps Script

  • Chinese birthday events are generated as single events. This is for compatibility as not all calendars support custom event recurrence patterns (the WebUI of Google Calendar can display them correctly but my Android calendars cannot). 
  • Since the birthday calendar is manually created, any subsequent updates to Google Contacts do not automatically update the birthday calendar. As such the birthday calendar will need to be re-created by the Apps Script. This is why there is an option to replace/override the previous calendar.
  • Chinese birthday events repeat five years from the date of creation. This is to limit the amount of API calls to the Google Calendar API. For me, this isn't a problem as I would have no doubt re-created the birthday calendar due to changes in my Google Contacts.
  • Chinese leap months are not currently supported.
Future Improvements
The Apps Script presently satisfies my initial purpose but I know it can be improved in many ways. If there is enough demand for a feature, I'm more than happy to implement it. Some of the extra features that could be incorporated include:
  1. Support for other calendars e.g. Islamic Hijri (Lunar) calendar or Julian.
  2. Support Chinese leap months.
  3. Extra flexibility with reminders.
  4. Speed improvement (dependant on Google API).
  5. Option to use custom repetition/recurrence events (no compatible with many calendar viewers).
  6. Add standard dates such as Chinese New Year.
  7. Add Google Tasks which allow for To-Do's such as the purchasing of presents.
  8. Add periodic re-creation of the Birthday Calendar e.g. yearly.