
FileCreatedTrigger
FileCreatedTrigger
yaml
type: "io.kestra.plugin.googleworkspace.drive.FileCreatedTrigger"Examples
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
folderId*Requiredstring
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*Requiredstring
type*Requiredobject
Condition that checks labels of an execution.
labels*Requiredarrayobject
type*Requiredobject