Skip to main content
Skip table of contents

Google Sheet - Download Sheet

Overview

Quickly export data from a single tab on a Google Sheet to a CSV.

Only one tab of data can be downloaded at a time, since CSVs are flat files. If you leave the tab name blank, the first tab of data will be pulled.

Content of the downloaded file can be refined by providing a cell range. Otherwise, the entire contents of the tab will be downloaded.

If your sheet is in a shared drive, the email associated with the authentication you use to access your sheet must be shared

  1. With the Sheet itself

  2. With the Shared Drive

Variables

Name

Reference

Type

Required

Default

Options

Description

Google Spreadsheet Name or ID

SHEETS_SPREADSHEET_ID

Alphanumeric

-

-

Name or ID of the sheet to fetch data from.

Not the URL. For example:

in https://docs.google.com/spreadsheets/d/1sRIXZ19123o1PEr_1/edit?gid=0#gid=0 the id is 1sRIXZ19123o1PEr_1

Tab Name

SHEETS_TAB_NAME

Alphanumeric

-

-

Name of the tab in the sheet to fetch data from. This field is case sensitive. If left blank, data will be pulled from the first tab.

Shared Drive Name

SHEETS_SHARED_DRIVE_NAME

Alphanumeric

-

-

Name of the Shared Drive the sheet exists in. This field is case sensitive. Leave blank if the file does not exist in a Shared Drive.

Workflow File Name

SHEETS_DESTINATION_FILE_NAME

Alphanumeric

-

-

Name of file to be generated with the results. Should be .csv extension.

Workflow Folder Name

SHEETS_DESTINATION_FOLDER_NAME

Alphanumeric

-

-

Folder where the file should be downloaded. Leaving blank will place the file in the home directory.

Cell Range

SHEETS_CELL_RANGE

Alphanumeric

-

-

Range to fetch data from in the sheet formatted as A1:B10. If left blank the entire contents of the tab will be fetched.

Service Account

GOOGLE_APPLICATION_CREDENTIALS

Password

-

-

JSON from a Google Cloud Service account key.

YAML

Below is the YAML template for this Template and can be used in the Fleet YAML Editor.

CODE
source:
  blueprint: Google Sheets - Download Sheet to Shipyard
  inputs:
    SHEETS_SPREADSHEET_ID: null  ## REQUIRED
    SHEETS_TAB_NAME: null
    SHEETS_SHARED_DRIVE_NAME: null
    SHEETS_DESTINATION_FILE_NAME: null  ## REQUIRED
    SHEETS_DESTINATION_FOLDER_NAME: null
    SHEETS_CELL_RANGE: null
    GOOGLE_APPLICATION_CREDENTIALS: null  ## REQUIRED
  type: BLUEPRINT
guardrails:
  retry_count: 1
  retry_wait: 0h0m0s
  runtime_cutoff: 1h0m0s
  exclude_exit_code_ranges:
    - '101'
    - '102'
    - '200'
JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.