
EventCreatedTrigger
EventCreatedTrigger
yaml
type: "io.kestra.plugin.googleworkspace.calendar.EventCreatedTrigger"Examples
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
allowConcurrentNon-dynamicboolean
Default
falseconditionsNon-dynamic
Definitions
Condition to allow events between two specific datetime values.
type*Requiredobject
afterstring
Format
date-timebeforestring
Format
date-timedatestring
Default
{{ trigger.date }}Condition to allow events on a particular day of the week.
dayOfWeek*Requiredstring
Possible Values
MONDAYTUESDAYWEDNESDAYTHURSDAYFRIDAYSATURDAYSUNDAYtype*Requiredobject
datestring
Default
{{ trigger.date }}Condition to execute tasks on a specific day of the week relative to the current month (first, last, ...)
dayInMonth*Requiredstring
Possible Values
FIRSTLASTSECONDTHIRDFOURTHdayOfWeek*Requiredstring
Possible Values
MONDAYTUESDAYWEDNESDAYTHURSDAYFRIDAYSATURDAYSUNDAYtype*Requiredobject
datestring
Default
{{ trigger.date }}Condition for a specific flow of an execution.
flowId*Requiredstring
namespace