[Google Apps Script] List the events on a calendar for one day

Created on November 30, 2026

Call getEventsForDay() on a calendar to retrieve its events for a date. The example logs event titles for June 15, 2022. Replace the calendar ID with one you can read. The method interprets the day in the calendar's time zone.

function main() {
  const calendar = CalendarApp.getCalendarById("YOUR_CALENDAR_ID");
  const events = calendar.getEventsForDay(new Date("2022-06-15T00:00:00+09:00"));
  for (const event of events) {
    Logger.log(event.getTitle());
  }
}

A Tokyo calendar containing these two events that day would produce the following log.

Planning meeting
Project review
Google Apps Script