turbot/googleworkspace
steampipe plugin install googleworkspace

Table: googleworkspace_calendar_event - Query Google Workspace Calendar Events using SQL

Google Workspace Calendar Events is a feature within Google Workspace that allows you to schedule, manage, and track events. It provides a centralized way to manage events for various Google Workspace users, including details about the event, attendees, and more. Google Workspace Calendar Events helps you stay informed about the event schedules and take appropriate actions when needed.

Table Usage Guide

The googleworkspace_calendar_event table provides insights into Calendar Events within Google Workspace. As an IT administrator, explore event-specific details through this table, including event schedules, attendees, and associated metadata. Utilize it to uncover information about events, such as those with multiple attendees, the status of the attendees, and the verification of event details.

Important Notes

  • You must specify the calendar_id in the where or join clause (where calendar_id=, join googleworkspace_calendar_event e on e.calendar_id=) to query this table.

Examples

Basic info

Gain insights into upcoming events on a specific Google Workspace calendar. This query helps in planning and scheduling by providing details like the event summary, hangout link, start time, and end time of the ten soonest events.

select
calendar_id,
summary,
hangout_link,
start_time,
end_time
from
googleworkspace_calendar_event
where
calendar_id = 'user@domain.com'
order by
start_time
limit
10;
select
calendar_id,
summary,
hangout_link,
start_time,
end_time
from
googleworkspace_calendar_event
where
calendar_id = 'user@domain.com'
order by
start_time
limit
10;

List events scheduled in next 4 days

Identify upcoming events in your company's calendar for the next four days. This allows you to stay updated with the scheduled activities, their timings, and corresponding links, thereby aiding in effective time management and planning.

select
summary,
hangout_link,
start_time,
end_time
from
googleworkspace_calendar_event
where
calendar_id = 'company-calendar@domain.com'
and start_time >= current_date
and start_time <= (current_date + interval '4 days')
order by
start_time;
select
summary,
hangout_link,
start_time,
end_time
from
googleworkspace_calendar_event
where
calendar_id = 'company-calendar@domain.com'
and start_time >= date('now')
and start_time <= date('now', '+4 days')
order by
start_time;

List events scheduled in current month

Explore the scheduled events for the current month to stay updated on important dates and activities. This is beneficial in managing your time and ensuring no important event is overlooked.

select
summary,
hangout_link,
start_time,
end_time
from
googleworkspace_calendar_event
where
calendar_id = 'company-calendar@domain.com'
and start_time >= date_trunc('month', current_date)
and start_time <= date_trunc('month', current_date) + interval '1 month'
order by
start_time;
select
summary,
hangout_link,
start_time,
end_time
from
googleworkspace_calendar_event
where
calendar_id = 'company-calendar@domain.com'
and start_time >= date('now', 'start of month')
and start_time <= date('now', 'start of month', '+1 month')
order by
start_time;

List events scheduled in current week

Explore which company events are scheduled for the upcoming week. This query is useful for keeping track of upcoming events and meetings in your organization.

select
summary,
hangout_link,
start_time,
end_time
from
googleworkspace_calendar_event
where
calendar_id = 'company-calendar@domain.com'
and start_time >= date_trunc('week', current_date)
and start_time < (date_trunc('week', current_date) + interval '7 days')
order by
start_time;
select
summary,
hangout_link,
start_time,
end_time
from
googleworkspace_calendar_event
where
calendar_id = 'company-calendar@domain.com'
and start_time >= date('now', 'weekday 0', '-7 days')
and start_time < date('now', 'weekday 0')
order by
start_time;

List out of office (OOO) events in next 30 days

Discover the upcoming out of office events in the next month. This is useful for planning and coordinating team schedules and resources.

select
summary,
start_time
from
googleworkspace_calendar_event
where
calendar_id = 'company-calendar@domain.com'
and event_type = 'outOfOffice'
and start_time >= current_date
and start_time < current_date + interval '30 days'
order by
start_time;
select
summary,
start_time
from
googleworkspace_calendar_event
where
calendar_id = 'company-calendar@domain.com'
and event_type = 'outOfOffice'
and start_time >= date('now')
and start_time < date('now', '+30 days')
order by
start_time;

List upcoming Indian holidays in next 30 days

Discover the upcoming holidays in India within the next month. This can be useful for planning activities, scheduling events, or understanding potential business impacts due to national holidays.

select
summary,
start_time,
day
from
googleworkspace_calendar_event
where
calendar_id = 'en.indian#holiday@group.v.calendar.google.com'
and start_time >= current_date
and start_time < current_date + interval '30 days'
order by
start_time;
select
summary,
start_time,
day
from
googleworkspace_calendar_event
where
calendar_id = 'en.indian#holiday@group.v.calendar.google.com'
and start_time >= date('now')
and start_time < date('now', '+30 days')
order by
start_time;

Schema for googleworkspace_calendar_event

NameTypeOperatorsDescription
_ctxjsonbSteampipe context in JSON form, e.g. connection_name.
attachmentsjsonbA list of file attachments for the event.
attendeesjsonbA list of attendees of the event.
attendees_omittedbooleanIndicates whether attendees may have been omitted from the event's representation, or not.
calendar_idtext=Identifier of the calendar.
color_idtextThe color of the event.
conference_datajsonbThe conference-related information, such as details of a Google Meet conference.
created_attimestamp with time zoneCreation time of the event.
creatorjsonbSpecifies the creator details of the event.
daytextSpecifies the day of a week.
descriptiontextA short user-defined description of the event.
end_timetimestamp with time zoneSpecifies the event end time.
end_time_unspecifiedbooleanIndicates whether the end time is actually unspecified, or not.
etagtextETag of the resource.
event_typetextSpecifies the type of the event.
extended_propertiesjsonbA list of extended properties of the event.
guests_can_invite_othersbooleanIndicates whether attendees other than the organizer can invite others to the event, or not.
guests_can_modifybooleanIndicates whether attendees other than the organizer can modify the event, or not.
guests_can_see_other_guestsbooleanIndicates whether attendees other than the organizer can modify the event, or not.
hangout_linktextAn absolute link to the Google Hangout associated with this event.
html_linktextAn absolute link to this event in the Google Calendar Web UI.
ical_uidtextSpecifies the event unique identifier as defined in RFC5545. It is used to uniquely identify events accross calendaring systems and must be supplied when importing events via the import method.
idtext=Opaque identifier of the event.
locationtextGeographic location of the event as free-form text.
lockedbooleanIndicates whether this is a locked event copy where no changes can be made to the main event fields "summary", "description", "location", "start", "end" or "recurrence".
organizerjsonbSpecifies the organizer details of the event.
original_start_timejsonbFor an instance of a recurring event, this is the time at which this event would start according to the recurrence data in the recurring event identified by recurringEventId.
private_copybooleanIndicates whether event propagation is disabled, or not.
querytext=Filter string to filter events.
recurrencejsonbA list of RRULE, EXRULE, RDATE and EXDATE lines for a recurring event, as specified in RFC5545.
recurring_event_idtextFor an instance of a recurring event, this is the id of the recurring event to which this instance belongs.
remindersjsonbInformation about the event's reminders for the authenticated user.
sequencebigintSequence number as per iCalendar.
sourcejsonbSource from which the event was created.
start_timetimestamp with time zone>, >=, =, <, <=Specifies the event start time.
statustextStatus of the event.
summarytextSpecifies the title of the event.
timezonetextThe time zone of the calendar.
transparencytextIndicates whether the event blocks time on the calendar.
updated_attimestamp with time zoneLast modification time of the event.
visibilitytextVisibility of the event.

Export

This table is available as a standalone Exporter CLI. Steampipe exporters are stand-alone binaries that allow you to extract data using Steampipe plugins without a database.

You can download the tarball for your platform from the Releases page, but it is simplest to install them with the steampipe_export_installer.sh script:

/bin/sh -c "$(curl -fsSL https://steampipe.io/install/export.sh)" -- googleworkspace

You can pass the configuration to the command with the --config argument:

steampipe_export_googleworkspace --config '<your_config>' googleworkspace_calendar_event