EventCreatedTrigger
Poll Google Calendar for new events
EventCreatedTrigger
Poll Google Calendar for new events
yaml
type: io.kestra.plugin.googleworkspace.calendar.EventCreatedTriggerExamples
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
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.notifications.slack.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
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
calendarIds *Requiredarray
SubTypestring
allowConcurrent Non-dynamicboolean
Default
falseconditions Non-dynamic
Definitions
Allow events only between two datetimes.
type*Requiredobject
Possible Values
io.kestra.plugin.core.condition.DateTimeBetweenio.kestra.core.models.conditions.types.DateTimeBetweenConditionio.kestra.plugin.core.condition.DateTimeBetweenConditionafterstring
beforestring
datestring
Default
{{ trigger.date }}Allow events on a specific weekday.
dayOfWeek*Requiredstring
Possible Values
MONDAYTUESDAYWEDNESDAYTHURSDAYFRIDAYSATURDAYSUNDAYtype*Requiredobject
Possible Values
io.kestra.plugin.core.condition.DayWeekio.kestra.core.models.conditions.types.DayWeekConditionio.kestra.plugin.core.condition.DayWeekConditiondatestring
Default
{{ trigger.date }}Allow events on an nth weekday within the month.
dayInMonth*Requiredstring
Possible Values
FIRSTLASTSECONDTHIRDFOURTHdayOfWeek*Requiredstring
Possible Values
MONDAYTUESDAYWEDNESDAYTHURSDAYFRIDAYSATURDAYSUNDAYtype*Requiredobject
Possible Values
io.kestra.plugin.core.condition.DayWeekInMonthio.kestra.plugin.core.condition.DayWeekInMonthConditionio.kestra.core.models.conditions.types.DayWeekInMonthConditiondatestring
Default
{{ trigger.date }}Match events from a specific flow.
flowId*Requiredstring
namespace*Requiredstring
type*Requiredobject
Possible Values
io.kestra.plugin.core.condition.ExecutionFlowio.kestra.plugin.core.condition.ExecutionFlowConditionio.kestra.core.models.conditions.types.ExecutionFlowConditionMatch executions by label set.
labels*Requiredarrayobject
type*Requiredobject
Possible Values
io.kestra.plugin.core.condition.ExecutionLabelsio.kestra.core.models.conditions.types.ExecutionLabelsConditionio.kestra.plugin.core.condition.ExecutionLabelsConditionMatch executions by namespace.
namespace*Requiredstring
type*Requiredobject
Possible Values
io.kestra.plugin.core.condition.ExecutionNamespaceio.kestra.core.models.conditions.types.ExecutionNamespaceConditionio.kestra.plugin.core.condition.ExecutionNamespaceConditioncomparisonstring
Possible Values
EQUALSPREFIXSUFFIXprefixbooleanstring
Default
falseCondition based on the outputs of an upstream execution.
expression*Requiredbooleanstring
type*Requiredobject
Possible Values
io.kestra.plugin.core.condition.ExecutionOutputsio.kestra.core.models.conditions.types.ExecutionOutputsConditionio.kestra.plugin.core.condition.ExecutionOutputsConditionMatch executions by status.
type*Requiredobject
Possible Values
io.kestra.plugin.core.condition.ExecutionStatusio.kestra.core.models.conditions.types.ExecutionStatusConditionio.kestra.plugin.core.condition.ExecutionStatusConditioninarray
SubTypestring
Possible Values
CREATEDSUBMITTEDRUNNINGPAUSEDRESTARTEDKILLINGSUCCESSWARNINGFAILEDKILLEDCANCELLEDQUEUEDRETRYINGRETRIEDSKIPPEDBREAKPOINTRESUBMITTEDnotInarray
SubTypestring
Possible Values
CREATEDSUBMITTEDRUNNINGPAUSEDRESTARTEDKILLINGSUCCESSWARNINGFAILEDKILLEDCANCELLEDQUEUEDRETRYINGRETRIEDSKIPPEDBREAKPOINTRESUBMITTEDCondition based on variable expression.
expression*Requiredstring
type*Requiredobject
Possible Values
io.kestra.plugin.core.condition.Expressionio.kestra.plugin.core.condition.ExpressionConditionio.kestra.core.models.conditions.types.VariableConditionMatch executions where a task was retried.
type*Requiredobject
Possible Values
io.kestra.plugin.core.condition.HasRetryAttemptio.kestra.plugin.core.condition.HasRetryAttemptConditionio.kestra.core.models.conditions.types.HasRetryAttemptConditioninarray
SubTypestring
Possible Values
CREATEDSUBMITTEDRUNNINGPAUSEDRESTARTEDKILLINGSUCCESSWARNINGFAILEDKILLEDCANCELLEDQUEUEDRETRYINGRETRIEDSKIPPEDBREAKPOINTRESUBMITTEDnotInarray
SubTypestring
Possible Values
CREATEDSUBMITTEDRUNNINGPAUSEDRESTARTEDKILLINGSUCCESSWARNINGFAILEDKILLEDCANCELLEDQUEUEDRETRYINGRETRIEDSKIPPEDBREAKPOINTRESUBMITTEDInvert one or more conditions.
conditions*Required
Min items
1type*Requiredobject
Possible Values
io.kestra.plugin.core.condition.Notio.kestra.core.models.conditions.types.NotConditionio.kestra.plugin.core.condition.NotConditionPass when any condition is true.
conditions*Required
Min items
1type*Requiredobject
Possible Values
io.kestra.plugin.core.condition.Orio.kestra.core.models.conditions.types.OrConditionio.kestra.plugin.core.condition.OrConditionAllow events on public holidays.
type*Requiredobject
Possible Values
io.kestra.plugin.core.condition.PublicHolidayio.kestra.plugin.core.condition.PublicHolidayConditionio.kestra.core.models.conditions.types.PublicHolidayConditioncountrystring
datestring
Default
{{ trigger.date}}subDivisionstring
Allow events between two times of day.
type*Requiredobject
Possible Values
io.kestra.plugin.core.condition.TimeBetweenio.kestra.plugin.core.condition.TimeBetweenConditionio.kestra.core.models.conditions.types.TimeBetweenConditionafterstring
beforestring
datestring
Default
{{ trigger.date }}Allow events on weekends.
type*Requiredobject
Possible Values
io.kestra.plugin.core.condition.Weekendio.kestra.plugin.core.condition.WeekendConditionio.kestra.core.models.conditions.types.WeekendConditiondatestring
Default
{{ trigger.date }}eventStatus string
Possible Values
CONFIRMEDTENTATIVECANCELLEDinterval Non-dynamicstring
Default
PT5MFormat
durationmaxEventsPerPoll integerstring
Default
100organizerEmail string
searchQuery string
serviceAccount string
stopAfter Non-dynamicarray
SubTypestring
Possible Values
CREATEDSUBMITTEDRUNNINGPAUSEDRESTARTEDKILLINGSUCCESSWARNINGFAILEDKILLEDCANCELLEDQUEUEDRETRYINGRETRIEDSKIPPEDBREAKPOINTRESUBMITTEDOutputs
events array
Definitions
io.kestra.plugin.googleworkspace.calendar.EventCreatedTrigger-EventMetadata
createdstring
Format
date-timedescriptionstring
end
io.kestra.plugin.googleworkspace.calendar.EventCreatedTrigger-EventDateTime
datestring
dateTimestring
Format
date-timetimeZonestring
eventTypestring
htmlLinkstring
idstring
locationstring
organizer
io.kestra.plugin.googleworkspace.calendar.EventCreatedTrigger-Organizer
displayNamestring
emailstring
selfboolean
start
io.kestra.plugin.googleworkspace.calendar.EventCreatedTrigger-EventDateTime
datestring
dateTimestring
Format
date-timetimeZonestring
statusstring
summarystring
updatedstring
Format
date-timevisibilitystring