Operations (sample payloads)
Main operations
Create Event
Creates an event. Sample Input
{
"calendar_id": "primary",
"start": \{
"date_time": "2023-07-15T09:00:00",
"time_zone": "America/New_York"
\},
"end": \{
"date_time": "2023-07-15T10:00:00",
"time_zone": "America/New_York"
\},
"summary": "Team Meeting",
"description": "Weekly team sync-up",
"location": "Conference Room A",
"attendees": [
\{
"email": "colleague1@example.com",
"display_name": "John Doe"
\},
\{
"email": "colleague2@example.com",
"display_name": "Jane Smith"
\}
],
"reminders": [
{
"overrides": [
\{
"method": "email",
"minutes": 30
\},
\{
"method": "popup",
"minutes": 10
\}
]
}
]
}
Sample Output
{
"kind": "calendar#event",
"etag": "\"3375457362000000\"",
"id": "abc123xyz456",
"status": "confirmed",
"htmlLink": "https://www.google.com/calendar/event?eid=abc123xyz456",
"created": "2023-07-10T14:30:00.000Z",
"updated": "2023-07-10T14:30:00.000Z",
"summary": "Team Meeting",
"creator": \{
"email": "organizer@example.com",
"self": true
\},
"organizer": \{
"email": "organizer@example.com",
"self": true
\},
"start": \{
"dateTime": "2023-07-15T09:00:00-04:00",
"timeZone": "America/New_York"
\},
"end": \{
"dateTime": "2023-07-15T10:00:00-04:00",
"timeZone": "America/New_York"
\},
"iCalUID": "abc123xyz456@google.com",
"sequence": 0,
"attendees": [
\{
"email": "colleague1@example.com",
"displayName": "John Doe",
"responseStatus": "needsAction"
\},
\{
"email": "colleague2@example.com",
"displayName": "Jane Smith",
"responseStatus": "needsAction"
\}
],
"reminders": {
"useDefault": false,
"overrides": [
\{
"method": "email",
"minutes": 30
\},
\{
"method": "popup",
"minutes": 10
\}
]
},
"eventType": "default"
}
Delete event
Deletes an event. Sample Input
\{
"calendar_id": "primary",
"event_id": "1234abcd5678efgh",
"send_updates": "all",
"send_notifications": true
\}
Sample Output
{
"success": true
}
Get calendar
Get a calendar by its ID. Sample Input
{
"calendar_id": "primary"
}
Sample Output
{
"kind": "calendar#calendar",
"etag": "\"1234567890\"",
"id": "primary",
"summary": "John Doe",
"timeZone": "America/New_York",
"conferenceProperties": {
"allowedConferenceSolutionTypes": [
"hangoutsMeet"
]
}
}
Get event
Get an event by its ID. Sample Input
\{
"calendar_id": "primary",
"event_id": "abc123xyz456",
"time_zone": "America/New_York",
"max_attendees": 10
\}
Sample Output
{
"kind": "calendar#event",
"etag": "\"3181161784712000\"",
"id": "abc123xyz456",
"status": "confirmed",
"htmlLink": "https://www.google.com/calendar/event?eid=YWJjMTIzeHl6NDU2",
"created": "2023-05-01T10:00:00.000Z",
"updated": "2023-05-01T10:30:00.000Z",
"summary": "Team Meeting",
"creator": \{
"email": "creator@example.com",
"self": true
\},
"organizer": \{
"email": "organizer@example.com",
"self": true
\},
"start": \{
"dateTime": "2023-05-15T14:00:00-04:00",
"timeZone": "America/New_York"
\},
"end": \{
"dateTime": "2023-05-15T15:00:00-04:00",
"timeZone": "America/New_York"
\},
"iCalUID": "abc123xyz456@google.com",
"sequence": 0,
"reminders": {
"useDefault": true
}
}
Get Free/Busy Information
Returns free/busy information for a set of calendars. Sample Input
\{
"time_min": "2023-06-01T09:00:00Z",
"time_max": "2023-06-01T17:00:00Z",
"items": [
"primary",
"john.doe@example.com",
"team-calendar@group.calendar.google.com"
],
"time_zone": "America/New_York",
"group_expansion_max": 20,
"calendar_expansion_max": 3
\}
Sample Output
{
"kind": "calendar#freeBusy",
"timeMin": "2023-06-01T09:00:00Z",
"timeMax": "2023-06-01T17:00:00Z",
"calendars": {
"primary": {
"busy": [
\{
"start": "2023-06-01T10:00:00-04:00",
"end": "2023-06-01T11:00:00-04:00"
\},
\{
"start": "2023-06-01T14:00:00-04:00",
"end": "2023-06-01T15:30:00-04:00"
\}
]
},
"john.doe@example.com": {
"busy": [
\{
"start": "2023-06-01T09:30:00-04:00",
"end": "2023-06-01T10:30:00-04:00"
\},
\{
"start": "2023-06-01T13:00:00-04:00",
"end": "2023-06-01T14:00:00-04:00"
\}
]
},
"team-calendar@group.calendar.google.com": {
"busy": [
\{
"start": "2023-06-01T11:00:00-04:00",
"end": "2023-06-01T12:00:00-04:00"
\},
\{
"start": "2023-06-01T15:00:00-04:00",
"end": "2023-06-01T16:00:00-04:00"
\}
]
}
}
}
List calendars
Returns a list of calendars. Sample Input
{
"has_sync_token": \{
"minimum_access_role": "reader",
"show_hidden": false,
"show_deleted": false
\},
"max_results": 50,
"page_token": "nextPageToken123"
}
Sample Output
{
"kind": "calendar#calendarList",
"etag": "\"p33wfvdgj4mfukd\"",
"nextSyncToken": "CJjmvLXY2_kCEJjmvLXY2_kCGAU=",
"items": [
{
"kind": "calendar#calendarListEntry",
"etag": "\"1573832853410000\"",
"id": "primary@example.com",
"summary": "My Primary Calendar",
"timeZone": "America/New_York",
"colorId": "17",
"backgroundColor": "#9a9cff",
"foregroundColor": "#000000",
"selected": true,
"accessRole": "owner",
"defaultReminders": [
\{
"method": "popup",
"minutes": 10
\},
\{
"method": "email",
"minutes": 30
\}
],
"notificationSettings": {
"notifications": [
\{
"type": "eventCreation",
"method": "email"
\},
\{
"type": "eventChange",
"method": "email"
\}
]
},
"primary": true,
"conferenceProperties": {
"allowedConferenceSolutionTypes": [
"hangoutsMeet"
]
}
},
{
"kind": "calendar#calendarListEntry",
"etag": "\"1573832854000000\"",
"id": "work@example.com",
"summary": "Work Calendar",
"timeZone": "America/Chicago",
"colorId": "2",
"backgroundColor": "#d06b64",
"foregroundColor": "#000000",
"selected": true,
"accessRole": "reader",
"defaultReminders": [
\{
"method": "popup",
"minutes": 15
\}
]
}
]
}
List events
Returns a list of events for a calendar. Sample Input
\{
"calendar_id": "primary",
"max_results": 100,
"order_by": "startTime",
"time_min": "2023-06-01T00:00:00Z",
"time_max": "2023-06-30T23:59:59Z",
"single_events": true,
"event_types": [
"default",
"focusTime"
],
"show_deleted": false,
"show_hidden_invitations": false
\}
Sample Output
{
"kind": "calendar#events",
"etag": "\"p32sd9f8shdf8sh8\"",
"summary": "My Calendar",
"updated": "2023-06-15T10:30:00.000Z",
"timeZone": "America/New_York",
"accessRole": "owner",
"defaultReminders": [
\{
"method": "popup",
"minutes": 10
\}
],
"nextPageToken": "CigKGjVpNjNxNmRwZGNnbGRtOXBiMjVsYjNKbmFYTRIHCNiJ5-v1Fw==",
"items": [
{
"kind": "calendar#event",
"etag": "\"3375287598000000\"",
"id": "1234567890abcdef",
"status": "confirmed",
"htmlLink": "https://www.google.com/calendar/event?eid=MTIzNDU2Nzg5MGFiY2RlZg",
"created": "2023-06-01T08:00:00.000Z",
"updated": "2023-06-01T08:30:00.000Z",
"summary": "Team Meeting",
"creator": \{
"email": "user@example.com",
"displayName": "John Doe"
\},
"organizer": {
"email": "user@example.com"
},
"start": \{
"dateTime": "2023-06-15T10:00:00-04:00",
"timeZone": "America/New_York"
\},
"end": \{
"dateTime": "2023-06-15T11:00:00-04:00",
"timeZone": "America/New_York"
\},
"iCalUID": "1234567890abcdef@google.com",
"sequence": 0,
"attendees": [
\{
"email": "colleague1@example.com",
"displayName": "Jane Smith",
"responseStatus": "accepted"
\},
\{
"email": "colleague2@example.com",
"displayName": "Bob Johnson",
"responseStatus": "tentative"
\}
],
"reminders": {
"useDefault": true
}
}
]
}
Raw HTTP request (advanced)
Perform a raw HTTP request with some pre-configuration and processing by the connector, such as authentication. Sample Input
{
"method": "GET",
"url": {
"endpoint": "/users"
},
"headers": [
\{
"key": "Accept",
"value": "application/json"
\}
],
"query_parameters": [
\{
"key": "limit",
"value": "10"
\},
\{
"key": "offset",
"value": "0"
\}
],
"body": {
"none": null
},
"include_raw_body": false,
"parse_response": "true"
}
Sample Output
{
"response": {
"status_code": 200,
"headers": \{
"Content-Type": "application/json",
"Cache-Control": "no-cache",
"X-RateLimit-Limit": "100",
"X-RateLimit-Remaining": "99"
\},
"body": [
\{
"id": 1,
"name": "John Doe",
"email": "john.doe@example.com"
\},
\{
"id": 2,
"name": "Jane Smith",
"email": "jane.smith@example.com"
\}
]
}
}
Update Event
Updates information about an event. Sample Input
{
"calendar_id": "primary",
"event_id": "abc123xyz456",
"summary": "Team Meeting",
"description": "Weekly team sync-up",
"location": "Conference Room A",
"start": \{
"date_time": "2023-06-15T10:00:00",
"time_zone": "America/New_York"
\},
"end": \{
"date_time": "2023-06-15T11:00:00",
"time_zone": "America/New_York"
\},
"attendees": [
\{
"email": "colleague1@example.com",
"display_name": "John Doe"
\},
\{
"email": "colleague2@example.com",
"display_name": "Jane Smith"
\}
],
"status": "confirmed",
"visibility": "default",
"reminders": [
{
"overrides": [
\{
"method": "email",
"minutes": 30
\},
\{
"method": "popup",
"minutes": 10
\}
]
}
]
}
Sample Output
{
"kind": "calendar#event",
"etag": "\"3345678901234567\"",
"id": "abc123xyz456",
"status": "confirmed",
"htmlLink": "https://www.google.com/calendar/event?eid=YWJjMTIzeHl6NDU2",
"created": "2023-06-01T09:00:00.000Z",
"updated": "2023-06-10T14:30:00.000Z",
"summary": "Team Meeting",
"creator": \{
"email": "organizer@example.com",
"self": true
\},
"organizer": \{
"email": "organizer@example.com",
"self": true
\},
"start": \{
"dateTime": "2023-06-15T10:00:00-04:00",
"timeZone": "America/New_York"
\},
"end": \{
"dateTime": "2023-06-15T11:00:00-04:00",
"timeZone": "America/New_York"
\},
"iCalUID": "abc123xyz456@google.com",
"sequence": 1,
"attendees": [
\{
"email": "colleague1@example.com",
"displayName": "John Doe",
"responseStatus": "needsAction"
\},
\{
"email": "colleague2@example.com",
"displayName": "Jane Smith",
"responseStatus": "needsAction"
\}
],
"reminders": {
"useDefault": false,
"overrides": [
\{
"method": "email",
"minutes": 30
\},
\{
"method": "popup",
"minutes": 10
\}
]
},
"eventType": "default"
}
DDL operations
List calendars (DDL)
Note that DDL operations can only be called directly by Connectors API, or when using CustomJS in the Embedded solution editor for e.g. DDL-dependent data mapping
Sample Input
{}
Sample Output
{
"calendars": [
\{
"id": "primary",
"summary": "My Calendar",
"description": "Personal calendar",
"timeZone": "America/New_York",
"colorId": "17",
"backgroundColor": "#9a9cff",
"foregroundColor": "#000000",
"accessRole": "owner",
"selected": true
\},
\{
"id": "work@company.com",
"summary": "Work Calendar",
"description": "Company-wide calendar",
"timeZone": "America/Los_Angeles",
"colorId": "2",
"backgroundColor": "#d06b64",
"foregroundColor": "#000000",
"accessRole": "reader",
"selected": false
\},
\{
"id": "family@group.calendar.google.com",
"summary": "Family",
"description": "Shared family calendar",
"timeZone": "America/Chicago",
"colorId": "8",
"backgroundColor": "#16a765",
"foregroundColor": "#000000",
"accessRole": "writer",
"selected": true
\}
]
}