Returns events in a calendar between two dates.
class CalendarApp method .getEvents()
CalendarApp is the Apps Script service.
.getEvents() is the method name you will see after a dot in your code.
What it does
Why it's used
- Pull this week's meetings into a staffing or prep sheet.
- Check for conflicts before auto-booking something new.
Common errors
- Forgetting parentheses on getEvents. Write CalendarApp.getEvents(), not CalendarApp.getEvents or getEvents by itself.
- Skipping dots between chained calls. Each step needs a dot, like CalendarApp.getEvents().
- Adding spaces where they do not belong. Write CalendarApp.getEvents(), not CalendarApp .getEvents(), CalendarApp.getEvents (), or CalendarApp . getEvents().
- Wrong capitalization. Use CalendarApp and getEvents, not calendarapp or getevents.
Explore
Related methods
-
.getEventsForDay()
Returns all events on a specific date.
-
.createEvent()
Adds a timed event to a calendar.
-
.getCalendarById()
Opens a calendar by its ID.
-
.createAllDayEvent()
Adds an all-day event to a calendar.
-
.getDefaultCalendar()
Returns the user's primary Google Calendar.
More Apps Script
Better Sheets tutorials
No tagged tutorials yet. Fetch Apps Script from the harvest table and this page fills automatically.
Related blog posts
Written guides about CalendarApp.getEvents().