Breadcrumbs

Google Sheets - Download Sheet to Workflows

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.

Variables

Name

Reference

Type

Required

Default

Options

Description

Google Spreadsheet Name or ID

SHEETS_SPREADSHEET_ID

Alphanumeric

None

-

Name or ID of the sheet to fetch data from.

Tab Name

SHEETS_TAB_NAME

Alphanumeric

None

-

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

None

-

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.

Workflows File Name

SHEETS_DESTINATION_FILE_NAME

Alphanumeric

None

-

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

Workflows Folder Name

SHEETS_DESTINATION_FOLDER_NAME

Alphanumeric

None

-

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

Cell Range

SHEETS_CELL_RANGE

Alphanumeric

None

-

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

YAML

Below is the YAML template

YAML

source:
  template: Google Sheets - Download Sheet to Workflows
  inputs:
    SHEETS_SPREADSHEET_ID:
    SHEETS_TAB_NAME:
    SHEETS_SHARED_DRIVE_NAME:
    SHEETS_DESTINATION_FILE_NAME:
    SHEETS_DESTINATION_FOLDER_NAME:
    SHEETS_CELL_RANGE:
  type: TEMPLATE
guardrails:
  retry_count: 1
  retry_wait: 0h0m0s
  runtime_cutoff: 1h0m0s
  exclude_exit_code_ranges:
    - 101
    - 102
    - 200