Mandala
Tools

Google Sheets

Read, write, and update data

Usage Instructions

Integrate Google Sheets into the workflow. Can read, write, append, and update data.

Tools

google_sheets_read

Read data from a Google Sheets spreadsheet

Input

ParameterTypeRequiredDescription
spreadsheetIdstringYesThe ID of the spreadsheet (found in the URL: docs.google.com/spreadsheets/d/{SPREADSHEET_ID}/edit).
rangestringNoThe A1 notation range to read (e.g. "Sheet1!A1:D10", "A1:B5"). Defaults to first sheet A1:Z1000 if not specified.

Output

ParameterTypeDescription
datajsonSheet data including range and cell values
metadatajsonSpreadsheet metadata including ID and URL

google_sheets_write

Write data to a Google Sheets spreadsheet

Input

ParameterTypeRequiredDescription
spreadsheetIdstringYesThe ID of the spreadsheet
rangestringNoThe A1 notation range to write to (e.g. "Sheet1!A1:D10", "A1:B5")
valuesarrayYesThe data to write as a 2D array (e.g. [["Name", "Age"], ["Alice", 30], ["Bob", 25]]) or array of objects.

Output

ParameterTypeDescription
updatedRangestringRange of cells that were updated
updatedRowsnumberNumber of rows updated
updatedColumnsnumberNumber of columns updated
updatedCellsnumberNumber of cells updated
metadatajsonSpreadsheet metadata including ID and URL

google_sheets_update

Update data in a Google Sheets spreadsheet

Input

ParameterTypeRequiredDescription
spreadsheetIdstringYesThe ID of the spreadsheet to update
rangestringNoThe A1 notation range to update (e.g. "Sheet1!A1:D10", "A1:B5")
valuesarrayYesThe data to update as a 2D array (e.g. [["Name", "Age"], ["Alice", 30]]) or array of objects.

Output

ParameterTypeDescription
updatedRangestringRange of cells that were updated
updatedRowsnumberNumber of rows updated
updatedColumnsnumberNumber of columns updated
updatedCellsnumberNumber of cells updated
metadatajsonSpreadsheet metadata including ID and URL

google_sheets_append

Append data to the end of a Google Sheets spreadsheet

Input

ParameterTypeRequiredDescription
spreadsheetIdstringYesThe ID of the spreadsheet to append to
rangestringNoThe A1 notation range to append after (e.g. "Sheet1", "Sheet1!A:D")
valuesarrayYesThe data to append as a 2D array (e.g. [["Alice", 30], ["Bob", 25]]) or array of objects.

Output

ParameterTypeDescription
tableRangestringRange of the table where data was appended
updatedRangestringRange of cells that were updated
updatedRowsnumberNumber of rows updated
updatedColumnsnumberNumber of columns updated
updatedCellsnumberNumber of cells updated
metadatajsonSpreadsheet metadata including ID and URL

Notes

  • Category: tools
  • Type: google_sheets
Google Sheets