Skip to main content

Google Sheets - Upload File to Sheet from Shipyard

Overview​

Easily import data from a single CSV into a single Google Sheet tab. The Google Sheet must already exist for the data to be uploaded.

Only one CSV file can be uploaded at a time, since the upload process requires a static starting cell to determine where to place the data. If you leave the starting cell blank, data will be inserted starting at cell A1 and expanding in width and depth as needed.

If you leave the tab name blank, the data will be uploaded into the first tab. If you specify a Tab Name that doesn't exist, it will be created.

This Blueprint is still subject to Google's limitations which restrict the number of cells, number of columns, and number of characters per cell in a spreadsheet.

Note: This Vessel cannot be used to upload a local file from your computer.

Recommended Setup:

  1. A Vessel built with this Blueprint should typically run after a Vessel that either downloads a file to Shipyard or generates a file with code.

Variables​

NameReferenceTypeRequiredDefaultOptionsDescription
Google Spreadsheet Name or IDSHEETS_SPREADSHEET_IDAlphanumericβœ…--Name or ID of the sheet to put data into.
Tab NameSHEETS_TAB_NAMEAlphanumericβž–--Name of the tab in the sheet to upload data to. This field is case sensitive. If left blank, data will be put into the first tab.
Shared Drive NameSHEETS_SHARED_DRIVE_NAMEAlphanumericβž–--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.
Shipyard File NameSHEETS_SOURCE_FILE_NAMEAlphanumericβœ…--Name of the target CSV file on Shipyard to be uploaded to the sheet.
Shipyard Folder NameSHEETS_SOURCE_FOLDER_NAMEAlphanumericβž–--Name of the local folder on Shipyard to upload the target file from. If left blank, will look in the home directory.
Starting CellSHEETS_STARTING_CELLAlphanumericβž–--Cell to start at when uploading data. If left blank, will start at cell A1.
Service AccountGOOGLE_APPLICATION_CREDENTIALSPasswordβœ…--JSON from a Google Cloud Service account key.

YAML​

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

source:
blueprint: Google Sheets - Upload File to Sheet from Shipyard
inputs:
SHEETS_SPREADSHEET_ID: null ## REQUIRED
SHEETS_TAB_NAME: null
SHEETS_SHARED_DRIVE_NAME: null
SHEETS_SOURCE_FILE_NAME: null ## REQUIRED
SHEETS_SOURCE_FOLDER_NAME: null
SHEETS_STARTING_CELL: null
GOOGLE_APPLICATION_CREDENTIALS: null ## REQUIRED
type: BLUEPRINT
guardrails:
retry_count: 1
retry_wait: 0h0m0s
runtime_cutoff: 1h0m0s
exclude_exit_code_ranges:
- '0'