Blueprints

Upload file to Google Drive

Source

yaml
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

About this blueprint

GCP

In this blueprint, we upload a file to Google Drive.

Note: The parents property here refers to an existing Google Drive directory. To be able to use Google Drive you will have to enable the API in your Google Cloud Platform project and share the folder with your service account email address. Make sure to add the GOOGLE_APPLICATION_CREDENTIALS environment variable with a value of the path to the JSON keyfile (note this must be a path to a file, not the contents of the Service Account).

Download

Upload

More Related Blueprints

New to Kestra?

Use blueprints to kickstart your first workflows.

Get started with Kestra