Google Workspace EventCreatedTrigger

Google Workspace EventCreatedTrigger

Certified

Poll Google Calendar for new events

Polls one or more shared calendars for events created since the previous interval and starts an Execution when any are found. Uses a service account with Calendar scope (https://www.googleapis.com/auth/calendar); each calendar ID must be shared with that account. Minimum interval is PT1M (default PT5M); maxEventsPerPoll defaults to 100 and must be 1-2500. Errors on one calendar are logged and polling continues.

yaml
type: io.kestra.plugin.googleworkspace.calendar.EventCreatedTrigger

Monitor calendar for any new event

yaml
id: google_calendar_event_trigger
namespace: company.team

tasks:
  - id: process_events
    type: io.kestra.plugin.core.log.Log
    message: "Found {{ trigger.events | length }} new event(s)"
  - id: log_each_event
    type: io.kestra.plugin.core.flow.ForEach
    values: "{{ trigger.events }}"
    tasks:
      - id: log_event
        type: io.kestra.plugin.core.log.Log
        message: "Event: {{ taskrun.value.summary }} ({{ taskrun.value.id }})"

triggers:
  - id: watch_calendar
    type: io.kestra.plugin.googleworkspace.calendar.EventCreatedTrigger
    serviceAccount: "{{ secret('GCP_SERVICE_ACCOUNT_JSON') }}"
    calendarIds:
      - "team@company.com"
    interval: PT5M

Monitor specific calendar with keyword filter

yaml
id: google_calendar_meeting_trigger
namespace: company.team

tasks:
  - id: notify_meetings
    type: io.kestra.plugin.core.flow.ForEach
    values: "{{ trigger.events }}"
    tasks:
      - id: send_notification
        type: io.kestra.plugin.slack.notifications.SlackIncomingWebhook
        url: "{{ secret('SLACK_WEBHOOK') }}"
        payload: |
          {
            "text": "New meeting scheduled: {{ taskrun.value.summary }} on {{ taskrun.value.start.dateTime }}"
          }

triggers:
  - id: watch_meetings
    type: io.kestra.plugin.googleworkspace.calendar.EventCreatedTrigger
    serviceAccount: "{{ secret('GCP_SERVICE_ACCOUNT_JSON') }}"
    calendarIds:
      - "team-calendar@company.com"
    searchQuery: "meeting"
    interval: PT10M

Monitor multiple calendars with organizer filter

yaml
id: google_calendar_multiple_trigger
namespace: company.team

tasks:
  - id: log_events
    type: io.kestra.plugin.core.flow.ForEach
    values: "{{ trigger.events }}"
    tasks:
      - id: log_event
        type: io.kestra.plugin.core.log.Log
        message: "Event by {{ taskrun.value.organizer.email }}: {{ taskrun.value.summary }}"

triggers:
  - id: watch_multiple_calendars
    type: io.kestra.plugin.googleworkspace.calendar.EventCreatedTrigger
    serviceAccount: "{{ secret('GCP_SERVICE_ACCOUNT_JSON') }}"
    calendarIds:
      - "team-calendar@company.com"
      - "project-calendar@company.com"
    organizerEmail: "manager@company.com"
    interval: PT15M
Properties
SubTypestring

Calendar IDs

Email-style calendar IDs shared with the service account; each calendar is polled separately.

Defaultfalse

Specifies whether a trigger is allowed to start a new execution even if a previous run is still in progress.

Possible Values
CONFIRMEDTENTATIVECANCELLED

Event status filter

Only events with this status trigger executions (CONFIRMED, TENTATIVE, CANCELLED)

DefaultPT5M
Formatduration

Polling interval

How frequently to check for new events; minimum PT1M, default PT5M

Default100

Events processed per poll

Upper bound on new events processed per calendar per poll; default 100, valid range 1-2500 (API limit)

Organizer email filter

Only events organized by this email address trigger an execution

Free-text search filter

Only events matching this search term will trigger an execution. The search applies to event title, description, and location fields.

Service account key

Google service account JSON with Calendar API scope. Share each target calendar with this account email; if omitted, Application Default Credentials are used.

SubTypestring
Possible Values
CREATEDSUBMITTEDRUNNINGPAUSEDRESTARTEDKILLINGSUCCESSWARNINGFAILEDKILLEDCANCELLEDQUEUEDRETRYINGRETRIEDSKIPPEDBREAKPOINTRESUBMITTED

List of execution states after which a trigger should be stopped (a.k.a. disabled).

Defaulttrue

A condition that determines whether the trigger should run.

A Pebble expression evaluated at trigger time. The trigger fires only when the expression evaluates to a truthy value (true, a non-empty string, a non-zero number). Use this to gate trigger execution on dynamic runtime values such as execution labels, flow variables, or environment conditions.

List of new events found during the poll

All new events created since the last polling interval.

Definitions
createdstring
Formatdate-time

When the event was created

descriptionstring

The event description

end

The end time of the event

datestring

The date (for all-day events)

dateTimestring
Formatdate-time

The date and time

timeZonestring

The time zone

eventTypestring

Type of the event

htmlLinkstring

Link to the event in Google Calendar

idstring

The event ID

locationstring

The event location

organizer

The organizer of the event

displayNamestring

The organizer's display name

emailstring

The organizer's email

selfboolean

Whether this is the current user

start

The start time of the event

datestring

The date (for all-day events)

dateTimestring
Formatdate-time

The date and time

timeZonestring

The time zone

statusstring

The event status

summarystring

The event title/summary

updatedstring
Formatdate-time

When the event was last updated

visibilitystring

Visibility of the event