birthday-calendar-sync
Automates birthday management by fetching contacts from Google Contacts, creating and updating birthday events in Google Calendar, customizable
AI Summary
Birthday Calendar Sync
A Google Apps Script library that synchronizes birthdays stored in Google Contacts to a specified Google Calendar.
Target Users
Intermediate GAS developers who want to automatically reflect Google Contacts birthdays in a calendar for personal or internal Google Workspace use.
Problems Solved
Addresses the need to avoid manually entering and updating contact birthdays in a calendar.
Tags
Main Features
Automatic creation and update of birthday events
Retrieves birthday data via the Google Contacts API and writes or overwrites events in Google Calendar to keep them up-to-date.
Flexible configuration
`config.gs` allows detailed adjustments such as label filtering, reminder type/time, target year, and summary creation.
Bulk deletion of unwanted events
Provides `deleteEvents()` to bulk-delete existing birthday events based on keywords or a date range.
Usage Examples
Sync birthdays to the calendar
/**
* Sync birthdays from Google Contacts to the designated calendar.
* Simply forwards to updateBirthdaysAndSummariesInCalendar() defined in main.gs
*/
function syncBirthdays() {
// Edit calendarId or reminder settings in config.gs, then run.
updateBirthdaysAndSummariesInCalendar();
}
Running the above function from the Apps Script editor automatically adds or updates birthday events in the specified calendar.
Delete birthday events within a range
/**
* Delete birthday events in the configured date range.
*/
function cleanUpBirthdays() {
deleteEvents();
}
deleteEvents()
removes birthday events in bulk based on deleteStartDate
and deleteEndDate
set in config.gs.