AI-generated Key Takeaways
- 
          
The Google Calendar service for Apps Script allows scripts to access and modify user calendars.
 - 
          
Various classes like
Calendar,CalendarApp,CalendarEvent, andCalendarEventSeriesare available to manage calendars and events. - 
          
Enums like
Color,EventColor,EventType, andVisibilitydefine properties and statuses for calendars and events. - 
          
Methods are provided to create, retrieve, modify, and delete calendars and events, including handling guests and recurrences.
 - 
          
Detailed methods are available for managing individual events and entire recurring event series.
 
This service allows a script to access and modify the user's Google Calendar, including additional calendars that the user is subscribed to.
Classes
| Name | Brief description | 
|---|---|
Calendar | Represents a calendar that the user owns or is subscribed to. | 
Calendar | Allows a script to read and update the user's Google Calendar. | 
Calendar | Represents a single calendar event. | 
Calendar | Represents a series of events (a recurring event). | 
Color | An enum representing the named colors available in the Calendar service. | 
Event | An enum representing the named event colors available in the Calendar service. | 
Event | Represents a guest of an event. | 
Event | Represents the recurrence settings for an event series. | 
Event | An enum representing the transparency of an event. | 
Event | An enum representing the type of an event. | 
Guest | An enum representing the statuses a guest can have for an event. | 
Recurrence | Represents a recurrence rule for an event series. | 
Visibility | An enum representing the visibility of an event. | 
Calendar
Methods
| Method | Return type | Brief description | 
|---|---|---|
create | Calendar | Creates a new all-day event. | 
create | Calendar | Creates a new all-day event that can span multiple days. | 
create | Calendar | Creates a new all-day event that can span multiple days. | 
create | Calendar | Creates a new all-day event. | 
create | Calendar | Creates a new all-day event series. | 
create | Calendar | Creates a new all-day event series. | 
create | Calendar | Creates a new event. | 
create | Calendar | Creates a new event. | 
create | Calendar | Creates an event from a free-form description. | 
create | Calendar | Creates a new event series. | 
create | Calendar | Creates a new event series. | 
delete | void | Deletes the calendar permanently. | 
get | String | Gets the color of the calendar. | 
get | String | Gets the description of the calendar. | 
get | Calendar | Gets the event with the given ID. | 
get | Calendar | Gets the event series with the given ID. | 
get | Calendar | Gets all events that occur within a given time range. | 
get | Calendar | Gets all events that occur within a given time range and meet the specified criteria. | 
get | Calendar | Gets all events that occur on a given day. | 
get | Calendar | Gets all events that occur on a given day and meet specified criteria. | 
get | String | Gets the ID of the calendar. | 
get | String | Gets the name of the calendar. | 
get | String | Gets the time zone of the calendar. | 
is | Boolean | Determines whether the calendar is hidden in the user interface. | 
is | Boolean | Determines whether the calendar is the primary calendar for the effective user. | 
is | Boolean | Determines whether the calendar is owned by you. | 
is | Boolean | Determines whether the calendar's events are displayed in the user interface. | 
set | Calendar | Sets the color of the calendar. | 
set | Calendar | Sets the description of a calendar. | 
set | Calendar | Sets whether the calendar is visible in the user interface. | 
set | Calendar | Sets the name of the calendar. | 
set | Calendar | Sets whether the calendar's events are displayed in the user interface. | 
set | Calendar | Sets the time zone of the calendar. | 
unsubscribe | void | Unsubscribes the user from a calendar. | 
CalendarApp 
Properties
| Property | Type | Description | 
|---|---|---|
Color | Color | An enum representing the named colors available in the Calendar service. | 
Event | Event | An enum representing the named event colors available in the Calendar service. | 
Event | Event | The Event enumeration. | 
Event | Event | The Event enumeration. | 
Guest | Guest | An enum representing the statuses a guest can have for an event. | 
Month | Month | An enum representing the months of the year. | 
Visibility | Visibility | An enum representing the visibility of an event. | 
Weekday | Weekday | An enum representing the days of the week. | 
Methods
| Method | Return type | Brief description | 
|---|---|---|
create | Calendar | Creates a new all-day event. | 
create | Calendar | Creates a new all-day event that can span multiple days. | 
create | Calendar | Creates a new all-day event that can span multiple days. | 
create | Calendar | Creates a new all-day event. | 
create | Calendar | Creates a new all-day event series. | 
create | Calendar | Creates a new all-day event series. | 
create | Calendar | Creates a new calendar, owned by the user. | 
create | Calendar | Creates a new calendar, owned by the user. | 
create | Calendar | Creates a new event. | 
create | Calendar | Creates a new event. | 
create | Calendar | Creates an event from a free-form description. | 
create | Calendar | Creates a new event series. | 
create | Calendar | Creates a new event series. | 
get | Calendar[] | Gets all calendars that the user owns or is subscribed to. | 
get | Calendar[] | Gets all calendars that the user owns. | 
get | Calendar | Gets the calendar with the given ID. | 
get | Calendar[] | Gets all calendars with a given name that the user owns or is subscribed to. | 
get | String | Gets the color of the calendar. | 
get | Calendar | Gets the user's default calendar. | 
get | String | Gets the description of the calendar. | 
get | Calendar | Gets the event with the given ID. | 
get | Calendar | Gets the event series with the given ID. | 
get | Calendar | Gets all events that occur within a given time range. | 
get | Calendar | Gets all events that occur within a given time range and meet the specified criteria. | 
get | Calendar | Gets all events that occur on a given day. | 
get | Calendar | Gets all events that occur on a given day and meet specified criteria. | 
get | String | Gets the ID of the calendar. | 
get | String | Gets the name of the calendar. | 
get | Calendar | Gets the calendar with the given ID, if the user owns it. | 
get | Calendar[] | Gets all calendars with a given name that the user owns. | 
get | String | Gets the time zone of the calendar. | 
is | Boolean | Determines whether the calendar is hidden in the user interface. | 
is | Boolean | Determines whether the calendar is the primary calendar for the effective user. | 
is | Boolean | Determines whether the calendar is owned by you. | 
is | Boolean | Determines whether the calendar's events are displayed in the user interface. | 
new | Event | Creates a new recurrence object, which can be used to create rules for event recurrence. | 
set | Calendar | Sets the color of the calendar. | 
set | Calendar | Sets the description of a calendar. | 
set | Calendar | Sets whether the calendar is visible in the user interface. | 
set | Calendar | Sets the name of the calendar. | 
set | Calendar | Sets whether the calendar's events are displayed in the user interface. | 
set | Calendar | Sets the time zone of the calendar. | 
subscribe | Calendar | Subscribes the user to the calendar with the given ID, if the user is allowed to subscribe. | 
subscribe | Calendar | Subscribes the user to the calendar with the given ID, if the user is allowed to subscribe. | 
CalendarEvent 
Methods
| Method | Return type | Brief description | 
|---|---|---|
add | Calendar | Adds a new email reminder to the event. | 
add | Calendar | Adds a guest to the event. | 
add | Calendar | Adds a new pop-up notification to the event. | 
add | Calendar | Adds a new SMS reminder to the event. | 
anyone | Boolean | Determines whether people can add themselves as guests to a Calendar event. | 
delete | void | Deletes a Calendar event. | 
delete | Calendar | Deletes a key/value tag from the event. | 
get | Date | Gets the date on which this all-day calendar event ends. | 
get | Date | Gets the date on which this all-day calendar event begins. | 
get | String[] | Gets all keys for tags that have been set on the event. | 
get | String | Returns the color of the calendar event. | 
get | String[] | Gets the creators of an event. | 
get | Date | Gets the date the event was created. | 
get | String | Gets the description of the event. | 
get | Integer[] | Gets the minute values for all email reminders for the event. | 
get | Date | Gets the date and time at which this calendar event ends. | 
get | Calendar | Gets the series of recurring events that this event belongs to. | 
get | Event | Gets the Event of this event. | 
get | Event | Gets a guest by email address. | 
get | Event | Gets the guests for the event, not including the event owner. | 
get | Event | Gets the guests for the event, potentially including the event owners. | 
get | String | Gets the unique iCalUID of the event. | 
get | Date | Gets the date the event was last updated. | 
get | String | Gets the location of the event. | 
get | Guest | Gets the event status (such as attending or invited) of the effective user. | 
get | String | Get the ID of the calendar where this event was originally created. | 
get | Integer[] | Gets the minute values for all pop-up reminders for the event. | 
get | Integer[] | Gets the minute values for all SMS reminders for the event. | 
get | Date | Gets the date and time at which this calendar event begins. | 
get | String | Gets a tag value of the event. | 
get | String | Gets the title of the event. | 
get | Event | Gets the transparency of the event. | 
get | Visibility | Gets the visibility of the event. | 
guests | Boolean | Determines whether guests can invite other guests. | 
guests | Boolean | Determines whether guests can modify the event. | 
guests | Boolean | Determines whether guests can see other guests. | 
is | Boolean | Determines whether this is an all-day event. | 
is | Boolean | Determines whether you're the owner of the event. | 
is | Boolean | Determines whether the event is part of an event series. | 
remove | Calendar | Removes all reminders from the event. | 
remove | Calendar | Removes a guest from the event. | 
reset | Calendar | Resets the reminders using the calendar's default settings. | 
set | Calendar | Sets the date of the event. | 
set | Calendar | Sets the dates of the event. | 
set | Calendar | Sets whether non-guests can add themselves to the event. | 
set | Calendar | Sets the color of the calendar event. | 
set | Calendar | Sets the description of the event. | 
set | Calendar | Sets whether guests can invite other guests. | 
set | Calendar | Sets whether guests can modify the event. | 
set | Calendar | Sets whether guests can see other guests. | 
set | Calendar | Sets the location of the event. | 
set | Calendar | Sets the event status (such as attending or invited) of the effective user. | 
set | Calendar | Sets a key/value tag on the event, for storing custom metadata. | 
set | Calendar | Sets the dates and times for the start and end of the event. | 
set | Calendar | Sets the title of the event. | 
set | Calendar | Sets the transparency of the event. | 
set | Calendar | Sets the visibility of the event. | 
CalendarEventSeries  
Methods
| Method | Return type | Brief description | 
|---|---|---|
add | Calendar | Adds a new email reminder to the event. | 
add | Calendar | Adds a guest to the event. | 
add | Calendar | Adds a new pop-up notification to the event. | 
add | Calendar | Adds a new SMS reminder to the event. | 
anyone | Boolean | Determines whether people can add themselves as guests to a Calendar event. | 
delete | void | Deletes the event series. | 
delete | Calendar | Deletes a key/value tag from the event. | 
get | String[] | Gets all keys for tags that have been set on the event. | 
get | String | Returns the color of the calendar event. | 
get | String[] | Gets the creators of an event. | 
get | Date | Gets the date the event was created. | 
get | String | Gets the description of the event. | 
get | Integer[] | Gets the minute values for all email reminders for the event. | 
get | Event | Gets the Event of this event. | 
get | Event | Gets a guest by email address. | 
get | Event | Gets the guests for the event, not including the event owner. | 
get | Event | Gets the guests for the event, potentially including the event owners. | 
get | String | Gets the unique iCalUID of the event. | 
get | Date | Gets the date the event was last updated. | 
get | String | Gets the location of the event. | 
get | Guest | Gets the event status (such as attending or invited) of the effective user. | 
get | String | Get the ID of the calendar where this event was originally created. | 
get | Integer[] | Gets the minute values for all pop-up reminders for the event. | 
get | Integer[] | Gets the minute values for all SMS reminders for the event. | 
get | String | Gets a tag value of the event. | 
get | String | Gets the title of the event. | 
get | Event | Gets the transparency of the event. | 
get | Visibility | Gets the visibility of the event. | 
guests | Boolean | Determines whether guests can invite other guests. | 
guests | Boolean | Determines whether guests can modify the event. | 
guests | Boolean | Determines whether guests can see other guests. | 
is | Boolean | Determines whether you're the owner of the event. | 
remove | Calendar | Removes all reminders from the event. | 
remove | Calendar | Removes a guest from the event. | 
reset | Calendar | Resets the reminders using the calendar's default settings. | 
set | Calendar | Sets whether non-guests can add themselves to the event. | 
set | Calendar | Sets the color of the calendar event. | 
set | Calendar | Sets the description of the event. | 
set | Calendar | Sets whether guests can invite other guests. | 
set | Calendar | Sets whether guests can modify the event. | 
set | Calendar | Sets whether guests can see other guests. | 
set | Calendar | Sets the location of the event. | 
set | Calendar | Sets the event status (such as attending or invited) of the effective user. | 
set | Calendar | Sets the recurrence rules for an all-day event series. | 
set | Calendar | Sets the recurrence rules for this event series. | 
set | Calendar | Sets a key/value tag on the event, for storing custom metadata. | 
set | Calendar | Sets the title of the event. | 
set | Calendar | Sets the transparency of the event. | 
set | Calendar | Sets the visibility of the event. | 
Color
Properties
| Property | Type | Description | 
|---|---|---|
BLUE | Enum | 
#2952A3). | 
BROWN | Enum | 
#8D6F47). | 
CHARCOAL | Enum | 
#4E5D6C). | 
CHESTNUT | Enum | 
#865A5A). | 
GRAY | Enum | 
#5A6986). | 
GREEN | Enum | 
#0D7813). | 
INDIGO | Enum | 
#5229A3). | 
LIME | Enum | 
#528800). | 
MUSTARD | Enum | 
#88880E). | 
OLIVE | Enum | 
#6E6E41). | 
ORANGE | Enum | 
#BE6D00). | 
PINK | Enum | 
#B1365F). | 
PLUM | Enum | 
#705770). | 
PURPLE | Enum | 
#7A367A). | 
RED | Enum | 
#A32929). | 
RED_ORANGE | Enum | 
#B1440E). | 
SEA_BLUE | Enum | 
#29527A). | 
SLATE | Enum | 
#4A716C). | 
TEAL | Enum | 
#28754E). | 
TURQOISE | Enum | 
#1B887A). | 
YELLOW | Enum | 
#AB8B00). | 
EventColor 
Properties
| Property | Type | Description | 
|---|---|---|
PALE_BLUE | Enum | 
"1"), referred to as "Peacock" in th Calendar UI. | 
PALE_GREEN | Enum | 
"2"), referred to as "Sage" in th Calendar UI. | 
MAUVE | Enum | 
"3"),, referred to as "Grape" in th Calendar UI. | 
PALE_RED | Enum | 
"4"), referred to as "Flamingo" in th Calendar UI. | 
YELLOW | Enum | 
"5"), referred to as "Banana" in th Calendar UI. | 
ORANGE | Enum | 
"6"), referred to as "Tangerine" in th Calendar UI. | 
CYAN | Enum | 
"7"), referred to as "Lavender" in th Calendar UI. | 
GRAY | Enum | 
"8"), referred to as "Graphite" in th Calendar UI. | 
BLUE | Enum | 
"9"), referred to as "Blueberry" in th Calendar UI. | 
GREEN | Enum | 
"10"), referred to as "Basil" in th Calendar UI. | 
RED | Enum | 
"11"), referred to as "Tomato" in th Calendar UI. | 
EventGuest 
Methods
| Method | Return type | Brief description | 
|---|---|---|
get | Integer | Gets the number of additional people that this guest has said are attending. | 
get | String | Gets the email address of the guest. | 
get | Guest | Gets the status of the guest for the event. | 
get | String | Gets the name of the guest. | 
EventRecurrence 
Methods
| Method | Return type | Brief description | 
|---|---|---|
add | Recurrence | Adds a rule that excludes occurrences on a daily basis. | 
add | Recurrence | Adds a rule that causes the event to recur on a daily basis. | 
add | Event | Adds a rule that causes the event to recur on a specific date. | 
add | Event | Adds a rule that excludes an occurrence for a specific date. | 
add | Recurrence | Adds a rule that excludes occurrences on a monthly basis. | 
add | Recurrence | Adds a rule that causes the event to recur on a monthly basis. | 
add | Recurrence | Adds a rule that excludes occurrences on a weekly basis. | 
add | Recurrence | Adds a rule that causes the event to recur on a weekly basis. | 
add | Recurrence | Adds a rule that excludes occurrences on a yearly basis. | 
add | Recurrence | Adds a rule that causes the event to recur on a yearly basis. | 
set | Event | Sets the time zone for this recurrence. | 
EventTransparency 
Properties
| Property | Type | Description | 
|---|---|---|
OPAQUE | Enum | The event does block time on the calendar. | 
TRANSPARENT | Enum | The event does not block time on the calendar. | 
EventType 
Properties
| Property | Type | Description | 
|---|---|---|
DEFAULT | Enum | The event is a regular event. | 
BIRTHDAY | Enum | The event is a special all-day event with an annual recurrence. | 
FOCUS_TIME | Enum | The event is a focus-time event. | 
FROM_GMAIL | Enum | The event is an event from Gmail. | 
OUT_OF_OFFICE | Enum | The event is an out-of-office event. | 
WORKING_LOCATION | Enum | The event is a working location event. | 
GuestStatus 
Properties
| Property | Type | Description | 
|---|---|---|
INVITED | Enum | The guest has been invited, but has not indicated whether they are attending. | 
MAYBE | Enum | The guest has indicated they might attend. | 
NO | Enum | The guest has indicated they are not attending. | 
OWNER | Enum | The guest is the owner of the event. | 
YES | Enum | The guest has indicated they are attending. | 
RecurrenceRule 
Methods
| Method | Return type | Brief description | 
|---|---|---|
add | Recurrence | Adds a rule that excludes occurrences on a daily basis. | 
add | Recurrence | Adds a rule that causes the event to recur on a daily basis. | 
add | Event | Adds a rule that causes the event to recur on a specific date. | 
add | Event | Adds a rule that excludes an occurrence for a specific date. | 
add | Recurrence | Adds a rule that excludes occurrences on a monthly basis. | 
add | Recurrence | Adds a rule that causes the event to recur on a monthly basis. | 
add | Recurrence | Adds a rule that excludes occurrences on a weekly basis. | 
add | Recurrence | Adds a rule that causes the event to recur on a weekly basis. | 
add | Recurrence | Adds a rule that excludes occurrences on a yearly basis. | 
add | Recurrence | Adds a rule that causes the event to recur on a yearly basis. | 
interval(interval) | Recurrence | Configures the rule to only apply at this interval of the rule's time unit. | 
only | Recurrence | Configures the rule to only apply to a specific month. | 
only | Recurrence | Configures the rule to only apply to specific months. | 
only | Recurrence | Configures the rule to only apply to a specific day of the month. | 
only | Recurrence | Configures the rule to only apply to specific days of the month. | 
only | Recurrence | Configures the rule to only apply to a specific week of the year. | 
only | Recurrence | Configures the rule to only apply to a specific day of the week. | 
only | Recurrence | Configures the rule to only apply to specific days of the week. | 
only | Recurrence | Configures the rule to only apply to specific weeks of the year. | 
only | Recurrence | Configures the rule to only apply to a specific day of the year. | 
only | Recurrence | Configures the rule to only apply to specific days of the year. | 
set | Event | Sets the time zone for this recurrence. | 
times(times) | Recurrence | Configures the rule to end after a given number of occurrences. | 
until(endDate) | Recurrence | Configures the rule to end on a given date (inclusive). | 
week | Recurrence | Configures which day a week starts on, for the purposes of applying the rule. | 
Visibility
Properties
| Property | Type | Description | 
|---|---|---|
CONFIDENTIAL | Enum | The event is private. | 
DEFAULT | Enum | Uses the default visibility for events on the calendar. | 
PRIVATE | Enum | The event is private and only event attendees may view event details. | 
PUBLIC | Enum | The event is public and event details are visible to all readers of the calendar. |