Google Sheets
Procedures and concepts for the Google Sheets integration.
Overview
Google Sheets is a powerful cloud-based spreadsheet application with real-time collaboration capabilities. This integration enables automated data entry, spreadsheet management, and collaborative workflow automation. Streamline data analysis and enhance team productivity through automated spreadsheet operations.
Prerequisites
1. Required Books
The following Book(s) need to be added to your agent so it can learn and understand the automation procedures defined within them:
Google Sheets
How to Add the Book(s)
Go to Books → All Books.
Search for the name of the book and click on it.
Click on Install or Add Connection to add the book to your agent.
If adding a connection, you'll be prompted for connectivity details.
Connectivity
This section outlines the available methods for connecting to the Book, along with the required configuration details for each.
Connect using Client Email, Token URI and Private Key
Gets the credentials from the service account keys.
Client Email
The client email of the service account registered in the Google Cloud Console.
text
Token URI
The token URI of the Google Cloud Console.
text
Private Key
The private key of the service account registered in the Google Cloud Console.
sensitive
Procedures
to add some content to a table
Append content to a Google Sheets table.
Input Concepts
content
the content to be added into the table reference.
table
Yes
(no default)
Examples
Append the contents of a table into a sheet table
to clear the worksheet range
Clear the contents of a worksheet range.
Input Concepts
Examples
Clear a range
to copy the sheet with a name
Copy a sheet within a Google Sheets file, giving the copy a name.
The copy is created in the same spreadsheet as the source sheet.
Input Concepts
Output Concepts
Examples
Copy a sheet
to create a (new sheet) in the file
Create a new sheet in a Google Sheets file.
Input Concepts
name
the name for the new sheet.
text
Yes
(no default)
Output Concepts
Examples
Create a new sheet
to create a (table) in a sheet
Create a table in a spreadsheet's sheet.
Input Concepts
headers
List of the headers for the new table.
text
Yes
(no default)
Output Concepts
Examples
Create a new table in a sheet of a spreadsheet
to create a (worksheet range) in a sheet
Create a reference to a range of cells in a sheet.
Input Concepts
start
A1 address of the top-left cell of the range (e.g. "A1").
text
Yes
(no default)
end
A1 address of the bottom-right cell of the range (e.g. "B5").
text
Yes
(no default)
Output Concepts
Examples
Create a range in a sheet
to create a google spreadsheet in a (folder)
Create a new Google Sheets spreadsheet.
Input Concepts
name
The name for the new Google Sheets spreadsheet.
text
Yes
(no default)
The folder to create the Google Sheets spreadsheet in.
google drive folder reference
No
(no default)
Output Concepts
Examples
Create a Google Sheets spreadsheet called "Hello World" in a google drive folder
to delete the sheet
Delete a sheet from a Google Sheets file.
Input Concepts
Examples
Delete a sheet
to get the (cell's color)
Get the background (fill) color of a cell as a hex string.
Input Concepts
Output Concepts
cell's color
The background color of the cell as a hex string (e.g. "#FFFFFF").
text
Examples
Get a cell's color
to get the (cell's formula)
Get the formula of a cell.
If the cell does not contain a formula, the literal cell value is returned.
Input Concepts
Output Concepts
cell's formula
The formula of the cell.
text
Examples
Get a cell's formula
to get the (cell's number format)
Get the number format pattern of a cell.
Input Concepts
Output Concepts
cell's number format
The cell's number format pattern (e.g. "0.00"), or "General" if none is set.
text
Examples
Get a cell's number format
to get the (cell's value)
Get the value of a cell.
Input Concepts
Output Concepts
cell's value
The value of the cell.
boolean or number or text
Examples
Get a cell's value
to get the (column count) in a worksheet range
Get the number of columns in a worksheet range.
Input Concepts
Output Concepts
column count
The number of columns in the range.
number
Examples
Get the column count of a range
to get the (file's sheets)
Get the sheets from a Google Sheets file.
Input Concepts
Google Sheets spreadsheet from which to retrieve the sheets.
google drive file reference
Yes
(no default)
Output Concepts
Examples
Retrieve the sheets of a spreadsheet inside a drive folder
Retrieve a sheet of a spreadsheet by name
to get the (following row range) in a worksheet range
Get the range covering the single row immediately below a worksheet range.
Input Concepts
Output Concepts
A reference to the range covering the row below the given range.
google sheet range reference
Examples
Get the row that follows a range
to get the (row count) in a worksheet range
Get the number of rows in a worksheet range.
Input Concepts
Output Concepts
row count
The number of rows in the range.
number
Examples
Get the row count of a range
to get the (row's cells) from the worksheet range
Get the cells of a row within a worksheet range.
Input Concepts
Output Concepts
Examples
Get the cells of the first row of a range
to get the (sheet's tables)
Get the tables from a Google Sheets sheet.
Input Concepts
Output Concepts
Examples
Retrieve the tables in a sheet of a spreadsheet
Retrieve the table in a sheet of a spreadsheet by name
to get the (sheet's used range)
Get the range of cells that contain data in a sheet.
Input Concepts
spreadsheet's sheet from which to retrieve the used range.
google sheet reference
Yes
(no default)
Output Concepts
Examples
Get the used range of a sheet
to get the (worksheet range's rows)
Get the rows from a worksheet range.
Input Concepts
the range from which to retrieve the rows.
google sheet range reference
Yes
(no default)
Output Concepts
Examples
Get the rows of a range
to insert a (new column) in the table
Create a new column in a Google Sheets table.
Input Concepts
index
index in which to insert the column.
number
Yes
(no default)
name
name to the new column
text
Yes
(no default)
values
list of values to add to the new column
boolean or number or text
Yes
(no default)
Output Concepts
Examples
Insert a new column into a table
to insert a (new row) in the table
Create a new row in a Google Sheets table.
Input Concepts
index
index in which to insert the row, starting at 0 and relative to the table's header.
number
Yes
(no default)
values
list of values to add with the row
boolean or number or text
Yes
(no default)
Output Concepts
Examples
Insert a new row into a table
to read the (content) from a table
Get the contents of a Google Sheets table.
Input Concepts
Output Concepts
content
A table with the read contents.
table
Examples
Read the contents of a sheet table
to read the (content) from a worksheet range
Get the contents of a worksheet range.
The first row of the range is treated as the header row.
Input Concepts
Output Concepts
content
A table with the read contents.
table
Examples
Read the contents of a range
to rename the sheet to a new name
Rename a sheet in a Google Sheets file.
Input Concepts
new name
the new name for the sheet.
text
Yes
(no default)
Output Concepts
Examples
Rename a sheet
to retrieve the (columns) from the table
Get the columns from a Google Sheets table.
Input Concepts
Output Concepts
Examples
Retrieve the columns of a table
Retrieve a column by name
to retrieve the (rows) from the table
Get the rows from a Google Sheets table.
When a filter is given, only data rows whose cells satisfy it are returned (referencing columns by their header name); without a filter, every row is returned.
Input Concepts
Output Concepts
Examples
Retrieve the rows of a table
Retrieve the rows where a column meets a condition
to set the cell's color to a color
Set the background (fill) color of a cell.
Input Concepts
color
the fill color as a hex string (e.g. "#FF0000").
text
Yes
(no default)
Examples
Set a cell's color
to set the cell's content to a value
Set the value of a cell.
Input Concepts
value
the value to write into the cell.
boolean or number or text
Yes
(no default)
Examples
Set a cell's value
to set the cell's font color to a color
Set the font (text) color of a cell.
Input Concepts
color
the font color as a hex string (e.g. "#0000FF").
text
Yes
(no default)
Examples
Set a cell's font color
to set the cell's formula to a formula value
Set the formula of a cell.
Input Concepts
formula value
the formula to write into the cell (e.g. "=SUM(A1:A10)").
text
Yes
(no default)
Examples
Set a cell's formula
to set the cell's number format to a format string
Set the number format of a cell.
Input Concepts
format string
the number format pattern (e.g. "0.00", "$#,##0.00").
text
Yes
(no default)
Examples
Set a cell's number format
to set the range's color to a color
Set the background (fill) color of every cell in a worksheet range.
Input Concepts
color
the fill color as a hex string (e.g. "#FF0000").
text
Yes
(no default)
Examples
Set a range's color
to set the range's font color to a color
Set the font (text) color of every cell in a worksheet range.
Input Concepts
color
the font color as a hex string (e.g. "#0000FF").
text
Yes
(no default)
Examples
Set a range's font color
to set the worksheet range's number format to a format string
Set the number format of every cell in a worksheet range.
Input Concepts
the range whose number format will be set.
google sheet range reference
Yes
(no default)
format string
the number format pattern (e.g. "0.00", "$#,##0.00").
text
Yes
(no default)
Examples
Set a range's number format
to write the content in a table
Update the contents of a Google Sheets table.
Input Concepts
content
the content to be set into the table reference.
table
Yes
(no default)
Examples
Set the contents of a table into a sheet table
to write the content in a worksheet range
Write content into a worksheet range starting at the range's top-left cell.
Input Concepts
content
the content to be written into the range.
table
Yes
(no default)
Examples
Write content into a range
Concepts
Google sheet table reference
Reference to a table inside a Google Sheets spreadsheet's sheet.
id
Id of the table
text
name
Name of the table
text
sheet_reference
Sheet the table belongs to
json
Google sheet reference
Reference to a sheet inside a Google Sheets spreadsheet file.
id
Id of the sheet
number
name
Name of the sheet
text
file
spreadsheet file the sheet belongs to
json
Google sheet range reference
Reference to a range of cells inside a Google Sheets spreadsheet's sheet.
file
spreadsheet file the range belongs to
json
sheet_id
Id of the sheet the range belongs to
number
sheet_name
Name of the sheet the range belongs to
text
address
A1 notation of the range without the sheet prefix (e.g. "A1:B2")
text
start_row_index
0-based index of the first row in the range
optional[number]
end_row_index
0-based exclusive index of the last row in the range
optional[number]
start_column_index
0-based index of the first column in the range
optional[number]
end_column_index
0-based exclusive index of the last column in the range
optional[number]
row_count
Number of rows in the range
optional[number]
column_count
Number of columns in the range
optional[number]
cell_count
Number of cells in the range
optional[number]
Google drive file reference
Contains all information required to identify a file in Google Drive.
id
The id of the file
text
file_name
The name of the file
text
Google drive folder reference
Contains all information required to identify a folder in Google Drive.
id
The id of the folder
text
folder_name
The name of the folder
text
Google sheet column reference
Reference to a column inside a Google Sheets spreadsheet's sheet.
index
Index of the column
number
name
Name of the column
text
table
Table the column belongs to
json
Google sheet row reference
Reference to a row inside a Google Sheets spreadsheet's sheet.A row can belong either to a table (table is set) or to a worksheet range (range_reference is set).
index
Index of the row
number
Range the row belongs to, if the row came from a range
optional[google sheet range reference]
Google sheet cell reference
Reference to a single cell inside a Google Sheets spreadsheet's sheet.A cell is a 1x1 range; row_index and column_index are 0-based (A1 -> row 0, column 0).
file
spreadsheet file the cell belongs to
json
sheet_id
Id of the sheet the cell belongs to
number
sheet_name
Name of the sheet the cell belongs to
text
row_index
0-based row index of the cell
number
column_index
0-based column index of the cell
number
address
A1 notation of the cell without the sheet prefix (e.g. "B3"). Derived from row_index/column_index when not provided.
optional[text]
table_id
Id of the table the cell belongs to, when applicable
optional[text]
Last updated
Was this helpful?

