FileCreatedTriggerFileCreatedTrigger
FileCreatedTriggerCertified

yaml
type: "io.kestra.plugin.googleworkspace.drive.FileCreatedTrigger"
yaml
id: google_drive_file_trigger
namespace: company.team

tasks:
  - id: process_file
    type: io.kestra.plugin.core.log.Log
    message: "New file created: {{ trigger.files[0].name }}"

triggers:
  - id: watch_folder
    type: io.kestra.plugin.googleworkspace.drive.FileCreatedTrigger
    serviceAccount: "{{ secret('GCP_SERVICE_ACCOUNT') }}"
    folderId: "1a2b3c4d5e6f7g8h9i0j"
    interval: PT5M

yaml
id: google_drive_pdf_trigger
namespace: company.team

tasks:
  - id: download_pdf
    type: io.kestra.plugin.googleworkspace.drive.Download
    serviceAccount: "{{ secret('GCP_SERVICE_ACCOUNT') }}"
    fileId: "{{ trigger.files[0].id }}"

triggers:
  - id: watch_pdfs
    type: io.kestra.plugin.googleworkspace.drive.FileCreatedTrigger
    serviceAccount: "{{ secret('GCP_SERVICE_ACCOUNT') }}"
    folderId: "1a2b3c4d5e6f7g8h9i0j"
    mimeTypes:
      - application/pdf
      - application/vnd.google-apps.document
    interval: PT10M

yaml
id: google_drive_owner_trigger
namespace: company.team

tasks:
  - id: notify
    type: io.kestra.plugin.notifications.slack.SlackIncomingWebhook
    url: "{{ secret('SLACK_WEBHOOK') }}"
    payload: |
      {
        "text": "New file by {{ trigger.files[0].owners[0].displayName }}: {{ trigger.files[0].name }}"
      }

triggers:
  - id: watch_my_files
    type: io.kestra.plugin.googleworkspace.drive.FileCreatedTrigger
    serviceAccount: "{{ secret('GCP_SERVICE_ACCOUNT') }}"
    ownerEmail: "user@company.com"
    interval: PT15M
Properties
Defaultfalse
Definitions
type*Requiredobject
afterstring
Formatdate-time
beforestring
Formatdate-time
datestring
Default{{ trigger.date }}
dayOfWeek*Requiredstring
Possible Values
MONDAYTUESDAYWEDNESDAYTHURSDAYFRIDAYSATURDAYSUNDAY
type*Requiredobject
datestring
Default{{ trigger.date }}
dayInMonth*Requiredstring
Possible Values
FIRSTLASTSECONDTHIRDFOURTH
dayOfWeek*Requiredstring
Possible Values
MONDAYTUESDAYWEDNESDAYTHURSDAYFRIDAYSATURDAYSUNDAY
type*Requiredobject
datestring
Default{{ trigger.date }}
flowId*Requiredstring
namespace*Requiredstring
type*Requiredobject
labels*Requiredarrayobject
type*Requiredobject
namespace*Requiredstring
type*Requiredobject
comparisonstring
Possible Values
EQUALSPREFIXSUFFIX
prefixbooleanstring
Defaultfalse
expression*Requiredbooleanstring
type*Requiredobject
type*Requiredobject
inarray
SubTypestring
Possible Values
CREATEDSUBMITTEDRUNNINGPAUSEDRESTARTEDKILLINGSUCCESSWARNINGFAILEDKILLEDCANCELLEDQUEUEDRETRYINGRETRIEDSKIPPEDBREAKPOINTRESUBMITTED
notInarray
SubTypestring
Possible Values
CREATEDSUBMITTEDRUNNINGPAUSEDRESTARTEDKILLINGSUCCESSWARNINGFAILEDKILLEDCANCELLEDQUEUEDRETRYINGRETRIEDSKIPPEDBREAKPOINTRESUBMITTED
expression*Requiredstring
type*Requiredobject
flowId*Requiredstring
namespace*Requiredstring
type*Requiredobject
namespace*Requiredstring
type*Requiredobject
prefixboolean
Defaultfalse
type*Requiredobject
inarray
SubTypestring
Possible Values
CREATEDSUBMITTEDRUNNINGPAUSEDRESTARTEDKILLINGSUCCESSWARNINGFAILEDKILLEDCANCELLEDQUEUEDRETRYINGRETRIEDSKIPPEDBREAKPOINTRESUBMITTED
notInarray
SubTypestring
Possible Values
CREATEDSUBMITTEDRUNNINGPAUSEDRESTARTEDKILLINGSUCCESSWARNINGFAILEDKILLEDCANCELLEDQUEUEDRETRYINGRETRIEDSKIPPEDBREAKPOINTRESUBMITTED
conditions*Requiredobject
id*Requiredstring
Validation RegExp^[a-zA-Z0-9][a-zA-Z0-9_-]*
Min length1
type*Requiredobject
resetOnSuccessboolean
Defaulttrue
timeWindow
Default{ "type": "DURATION_WINDOW" }
deadlinestring
Formatpartial-time
endTimestring
Formatpartial-time
startTimestring
Formatpartial-time
typestring
DefaultDURATION_WINDOW
Possible Values
DAILY_TIME_DEADLINEDAILY_TIME_WINDOWDURATION_WINDOWSLIDING_WINDOW
windowstring
Formatduration
windowAdvancestring
Formatduration
windowDeprecatedstring
Formatduration
windowAdvanceDeprecatedstring
Formatduration
conditions*Required
Min items1
type*Requiredobject
conditions*Required
Min items1
type*Requiredobject
type*Requiredobject
countrystring
datestring
Default{{ trigger.date}}
subDivisionstring
type*Requiredobject
afterstring
Formattime
beforestring
Formattime
datestring
Default{{ trigger.date }}
type*Requiredobject
datestring
Default{{ trigger.date }}
Defaultfalse
DefaultPT1H
Formatduration
Default100
SubTypestring
SubTypestring
Default["https://www.googleapis.com/auth/drive.metadata.readonly"]
SubTypestring
Possible Values
CREATEDSUBMITTEDRUNNINGPAUSEDRESTARTEDKILLINGSUCCESSWARNINGFAILEDKILLEDCANCELLEDQUEUEDRETRYINGRETRIEDSKIPPEDBREAKPOINTRESUBMITTED
Definitions
createdTimestring
Formatdate-time
iconLinkstring
idstring
kestraFileUristring
mimeTypestring
modifiedTimestring
Formatdate-time
namestring
ownersarray
SubTypeobject
parentsarray
SubTypestring
sizeinteger
thumbnailLinkstring
webViewLinkstring