
Google Workspace Upload
CertifiedUpload a file to Drive
Google Workspace Upload
Upload a file to Drive
Uploads from Kestra storage to Drive using a service account. Creates or updates depending on fileId. Supports converting content by setting mimeType to a Google type. File size for Google apps is taken from the uploaded content.
type: io.kestra.plugin.googleworkspace.drive.UploadExamples
Upload a csv and convert it to sheet format
id: googleworkspace_drive_upload
namespace: company.team
inputs:
- id: file
type: FILE
description: The file to be uploaded to Google Drive
tasks:
- id: upload
type: io.kestra.plugin.googleworkspace.drive.Upload
from: "{{ inputs.file }}"
parents:
- "1HuxzpLt1b0111MuKMgy8wAv-m9Myc1E_"
name: "My awesome CSV"
contentType: "text/csv"
mimeType: "application/vnd.google-apps.spreadsheet"
Upload file to Google Drive
id: upload_google_drive
namespace: company.team
tasks:
- id: download
type: io.kestra.plugin.core.http.Download
uri: https://huggingface.co/datasets/kestra/datasets/raw/main/csv/orders.csv
- id: upload
type: io.kestra.plugin.googleworkspace.drive.Upload
from: "{{ outputs.download.uri }}"
parents:
- 15OENbAxvonlASDkYyfGBftV2c0fDTmnB
name: Orders
contentType: text/csv
mimeType: application/vnd.google-apps.spreadsheet
Properties
contentType *Requiredstring
Content type
RFC2045 content type of the uploaded data (e.g., text/csv, application/pdf)
from *Requiredstring
Source file URI
kestra:// URI of the file to upload
description string
File description
Optional short description; supports templating
fileId string
Existing file ID
When set, updates that file; otherwise a new file is created
mimeType string
MIME type
Explicit MIME type; Drive auto-detects if omitted. Google MIME types import content when possible. Supported import formats: https://developers.google.com/drive/api/v3/mime-types
name string
File name
Display name; not necessarily unique inside a folder
parents array
Destination folders
Parent folder IDs; leave empty for My Drive root
pluginDefaultsRef Non-dynamicstring
Reference (ref) of the pluginDefaults to apply to this task.
readTimeout integerstring
120The read timeout for the request (in seconds)
scopes array
["https://www.googleapis.com/auth/drive"]The GCP scopes to used
serviceAccount string
The GCP service account key
teamDriveId string
Shared Drive ID
Target Shared Drive (teamDriveId) when writing outside My Drive
Outputs
file
Uploaded file metadata
io.kestra.plugin.googleworkspace.drive.models.File
date-timeMetrics
size counter
countNumber of files returned by the list query