Procedures

Automation procedures in the Google Sheets BDK Book.

to add some content to a table

Append the contents of a table into a sheet table reference.

Input Concepts

Concept
Description
Type
Required
Default Value

table ref from which to read the content.

sheet table reference

Yes

content

the content to be added into the table reference.

table

Yes

Examples

Append the contents of a table into a sheet table

...
get the PO Sheet's table whose name is "PO Table"
use the above as the PO Table
read the content from the PO Table
get the PO Sheet's table whose name is "PO History Table"
use the above as the PO History Table
add the content to the PO History Table

to create a (table) in a sheet

Create a table in a spreadsheet's sheet.

Input Concepts

Concept
Description
Type
Required
Default Value

spreadsheet's sheet where the table will be created.

google sheet reference

Yes

headers

List of the headers for the new table.

text

Yes

Output Concepts

Concept
Description
Type

A reference to the created table.

sheet table reference

Examples

Create a new table in a sheet of a spreadsheet

...
get the spreadsheet's sheet whose name is "PO Data"
use the above as the PO Sheet
create a table in the Po Sheet where
    the headers are "ID", "Product ID", "Price"

to create a google spreadsheet in a (folder)

Creates a new Google Sheet document.

Input Concepts

Concept
Description
Type
Required
Default Value

name

The name for the new Google Sheets spreadsheet.

text

Yes

The folder to create the Google Sheets spreadsheet in.

drive folder reference

No

Output Concepts

Concept
Description
Type

the new spreadsheet's file reference.

drive file reference

Examples

Create a Google Sheets spreadsheet called "Hello World" in a google drive folder

get the folder at "My Drive Folder"
use the above as the folder
create a google spreadsheet in the folder where
    the name is "Hello World"

to get the (file's sheets)

FILTER - CAPABLE

Retrieve sheets from a Google Sheet file.

Input Concepts

Concept
Description
Type
Required
Default Value

Google Sheets spreadsheet from which to retrieve the sheets.

drive file reference

Yes

Output Concepts

Concept
Description
Type

The list of the retrieved sheet references.

google sheet reference

Examples

Retrieve the sheets of a spreadsheet inside a drive folder

get the folder at "My Drive Folder"
use the above as the folder
get the folder's items
get the first item
use the above as the spreadsheet
get the spreadsheet's sheets

Retrieve a sheet of a spreadsheet by name

get the folder at "My Drive Folder"
use the above as the folder
get the folder's items
get the first item
use the above as the spreadsheet
get the spreadsheet's sheet whose name is "PO Data"

to get the (sheet's tables)

FILTER - CAPABLE

Retrieve the tables of a Google spreadsheet sheet.

Input Concepts

Concept
Description
Type
Required
Default Value

spreadsheet's sheet from which to retrieve the table.

google sheet reference

Yes

Output Concepts

Concept
Description
Type

The list of the retrieved table references.

sheet table reference

Examples

Retrieve the tables in a sheet of a spreadsheet

...
get the spreadsheet's sheet whose name is "PO Data"
use the above as the PO Sheet
get the PO Sheet's tables

Retrieve the table in a sheet of a spreadsheet by name

...
get the spreadsheet's sheet whose name is "PO Data"
use the above as the PO Sheet
get the PO Sheet's table whose name is "PO Table"

to insert a (new column) in the table

Insert a new column into a Google spreadsheet's Table

Input Concepts

Concept
Description
Type
Required
Default Value

table where to insert the new column.

sheet table reference

Yes

index

index in which to insert the column.

number

Yes

name

name to the new column

text

Yes

values

list of values to add to the new column

boolean or number or text

Yes

Output Concepts

Concept
Description
Type

A reference of the newly created column

sheet column reference

Examples

Insert a new column into a table

...
get the PO Sheet's table whose name is "PO Table"
use the above as the PO Table
insert a new column in the PO Table
    the index is 3
    the name is "Date"
    the values are "06/13/25", "06/14/25"

to insert a (new row) in the table

Insert a new row into a Google spreadsheet's Table

Input Concepts

Concept
Description
Type
Required
Default Value

table where to insert the new row.

sheet table reference

Yes

index

index in which to insert the row, starting at 0 and relative to the table's header.

number

Yes

values

list of values to add with the row

boolean or number or text

Yes

Output Concepts

Concept
Description
Type

A list of the retrieved row references.

sheet row reference

Examples

Insert a new row into a table

...
get the PO Sheet's table whose name is "PO Table"
use the above as the PO Table
insert a new row in the PO Table
    the index is 3
    the values are 5, "Test Product 5", "1KG", "06/10/25"

to read the (content) from a table

Read the contents of a sheet table reference into a Table

Input Concepts

Concept
Description
Type
Required
Default Value

table reference from which to read the content.

sheet table reference

Yes

Output Concepts

Concept
Description
Type

content

A table with the read contents.

table

Examples

Read the contents of a sheet table

...
get the PO Sheet's table whose name is "PO Table"
use the above as the PO Table
read the content from the PO Table

to retrieve the (columns) from the table

Retrieve the columns of a Google spreadsheet table.

Input Concepts

Concept
Description
Type
Required
Default Value

table from which to retrieve the columns.

sheet table reference

Yes

Output Concepts

Concept
Description
Type

A list of the retrieved column references.

sheet column reference

Examples

Retrieve the columns of a table

...
get the PO Sheet's table whose name is "PO Table"
use the above as the PO Table
retrieve the columns from the PO Table

to retrieve the (rows) from the table

Retrieve the rows of a Google spreadsheet table.

Input Concepts

Concept
Description
Type
Required
Default Value

table from which to retrieve the rows information.

sheet table reference

Yes

Output Concepts

Concept
Description
Type

A list of the retrieved row references.

sheet row reference

Examples

Retrieve the rows of a table

...
get the PO Sheet's table whose name is "PO Table"
use the above as the PO Table
retrieve the rows from the PO Table

to write the content in a table

Set the contents of a table into a sheet table reference.

Input Concepts

Concept
Description
Type
Required
Default Value

table reference from which to read the content.

sheet table reference

Yes

content

the content to be set into the table reference.

table

Yes

Examples

Set the contents of a table into a sheet table

...
get the PO Sheet's table whose name is "PO Table"
use the above as the PO Table
read the content from the PO Table
get the PO Sheet's table whose name is "PO Table Duplicate"
use the above as the PO Table Duplicate
write the content in the PO Table Duplicate

Last updated

Was this helpful?