Google Sheets

App · Spreadsheets · 18 actions · 1 trigger

Read and write rows in Google Sheets workbooks.

Triggers

Start a workflow when something happens in Google Sheets. See how triggers work.

Google Sheets New Row

Triggers when a new row is added to a Google Sheets spreadsheet.

Filters

Narrow which events start a run.

spreadsheet_idRequired
sheet_name

Event fields

What a run starts with. Later steps read each field with an @ reference.

fieldsobject
row_numbernumber
new_row_countnumber

Actions

ActionWhat it does
Append cell to columnAppend a single value to the end of a column.
Append rowAppend a single row to the end of a Google Sheet.
Clear row valuesClear values in a specific row without deleting the row itself.
Clear tabClear all cells within a sheet/tab.
Create columnInsert a new column at a specified position.
Create spreadsheetCreate a new Google Sheets spreadsheet.
Create tabCreate a new tab (sheet) within a spreadsheet.
Delete columnDelete a single column from a sheet.
Delete rowDelete a single row from a sheet.
Delete spreadsheetDelete a Google Sheets spreadsheet permanently.
Delete tabDelete a tab (sheet) from a spreadsheet by name.
Get column valuesReturn all values from a specific column, chosen by its position number.
Get row valuesReturn all values from a specific row as a list.
Read columnRead all values from a specific column.
Read rowsRead every data row of a sheet at once.
Rename tabRename an existing tab in a spreadsheet.
Update rowSet some cells of one row by column name, leaving the rest of the row as it is.
Write rowOverwrite a whole row, from column A, with values in column order.

Append cell to column

Append a single value to the end of a column.

Inputs

Spreadsheet URLspreadsheet_urltextRequired
The URL of the spreadsheet
Sheet namesheet_nametextRequired
The name of the sheet/tab
Column numbercolumn_indexnumberRequired
The column's position number: 1 for column A, 2 for column B, and so on.
ValuevaluetextRequired
The value to append
How to save valuesvalue_input_optiontext
How Google Sheets reads the values written: as if typed (the default), or exactly as given.One of: USER_ENTERED (As if typed (numbers, dates, and formulas are recognized)), RAW (Exactly as given (text stays text)). Default: USER_ENTERED.

Outputs

No return value

Append row

Append a single row to the end of a Google Sheet.

Inputs

Spreadsheet URLspreadsheet_urltextRequired
The URL of the spreadsheet
Sheet namesheet_nametextRequired
The name of the sheet/tab to append the row to
Row valuesrow_valueslistRequired
A list of values representing the row to append
How to save valuesvalue_input_optiontext
How Google Sheets reads the values written: as if typed (the default), or exactly as given.One of: USER_ENTERED (As if typed (numbers, dates, and formulas are recognized)), RAW (Exactly as given (text stays text)). Default: USER_ENTERED.

Outputs

No return value

Example output
{
  "status": "success"
}

Clear row values

Clear values in a specific row without deleting the row itself.

Inputs

Spreadsheet URLspreadsheet_urltextRequired
The URL of the spreadsheet
Sheet namesheet_nametextRequired
The name of the sheet/tab
Row numberrow_indexnumberRequired
The row number to clear. The first row is 1.

Outputs

No return value

Clear tab

Clear all cells within a sheet/tab.

Inputs

Spreadsheet URLspreadsheet_urltextRequired
The URL of the spreadsheet
Sheet namesheet_nametextRequired
The name of the sheet/tab to clear

Outputs

No return value

Example output
{
  "status": "success"
}

Create column

Insert a new column at a specified position.

Inputs

Spreadsheet URLspreadsheet_urltextRequired
The URL of the spreadsheet
Sheet namesheet_nametextRequired
The name of the sheet/tab
Column numbercolumn_indexnumberRequired
The position where the new column will be inserted: 1 for column A, 2 for column B, and so on.

Outputs

No return value

Create spreadsheet

Create a new Google Sheets spreadsheet.

Inputs

TitletitletextRequired
Title of the new spreadsheet
Localelocaletext
The spreadsheet's locale (language and region), for example en_US.
Time zonetime_zonetext
Time zone of the spreadsheet (e.g., America/New_York)

Outputs

propertiesobject
Spreadsheet properties
spreadsheet_idtext
ID of the created spreadsheet
spreadsheet_urltext
URL of the created spreadsheet
Example output
{
  "properties": {
    "locale": "en_US",
    "title": "My Spreadsheet"
  },
  "spreadsheet_id": "1AbCdEfGhIjKlMnOpQrStUvWxYz",
  "spreadsheet_url": "https://docs.google.com/spreadsheets/d/1AbCdEfGhIjKlMnOpQrStUvWxYz/edit"
}

Create tab

Create a new tab (sheet) within a spreadsheet.

Inputs

Spreadsheet URLspreadsheet_urltextRequired
The URL of the spreadsheet
Sheet namesheet_nametextRequired
Name for the new tab
Tab positionsheet_indexnumber
Where to place the new tab: 0 is the first position, 1 is the second, and so on.

Outputs

Response envelope; the payload is in the "result" field.

resultobject
statustext
Example output
{
  "result": {
    "index": 1,
    "sheet_id": 123456789,
    "title": "New Tab"
  },
  "status": "success"
}

Delete column

Delete a single column from a sheet.

Inputs

Spreadsheet URLspreadsheet_urltextRequired
The URL of the spreadsheet
Sheet namesheet_nametextRequired
The name of the sheet/tab
Column numbercolumn_indexnumberRequired
The position number of the column to delete: 1 for column A, 2 for column B, and so on.

Outputs

No return value

Delete row

Delete a single row from a sheet.

Inputs

Spreadsheet URLspreadsheet_urltextRequired
The URL of the spreadsheet
Sheet namesheet_nametextRequired
The name of the sheet/tab
Row numberrow_indexnumberRequired
The row number to delete. The first row is 1.

Outputs

No return value

Delete spreadsheet

Delete a Google Sheets spreadsheet permanently.

Inputs

Spreadsheet URLspreadsheet_urltextRequired
The URL of the spreadsheet to delete

Outputs

No return value

Delete tab

Delete a tab (sheet) from a spreadsheet by name.

Inputs

Spreadsheet URLspreadsheet_urltextRequired
The URL of the spreadsheet
Sheet namesheet_nametextRequired
Name of the tab to delete

Outputs

No return value

Example output
{
  "status": "success"
}

Get column values

Return all values from a specific column, chosen by its position number.

Inputs

Spreadsheet URLspreadsheet_urltextRequired
The URL of the spreadsheet
Sheet namesheet_nametextRequired
The name of the sheet/tab
Column numbercolumn_indexnumberRequired
The column's position number: 1 for column A, 2 for column B, and so on.

Outputs

Response envelope; the column values are in the 'values' field.

statustext
valueslist
List of values in the column
Example output
{
  "status": "success",
  "values": [
    "Header",
    "Value1",
    "Value2",
    "Value3"
  ]
}

Get row values

Return all values from a specific row as a list.

Inputs

Spreadsheet URLspreadsheet_urltextRequired
The URL of the spreadsheet
Sheet namesheet_nametextRequired
The name of the sheet/tab
Row numberrow_indexnumberRequired
The row number to read. The first row is 1.

Outputs

Response envelope; the row values are in the 'values' field.

statustext
valueslist
List of values in the row
Example output
{
  "status": "success",
  "values": [
    "Name",
    "Email",
    "Status",
    "Date"
  ]
}

Read column

Read all values from a specific column.

Inputs

Spreadsheet URLspreadsheet_urltextRequired
The URL of the spreadsheet
Sheet namesheet_nametextRequired
The name of the sheet/tab
ColumncolumntextRequired
Column letter (e.g., 'A', 'B', 'AA')

Outputs

Response envelope; the column values are in the 'values' field.

statustext
valueslist
List of values in the column
Example output
{
  "status": "success",
  "values": [
    "Header",
    "Value1",
    "Value2",
    "Value3"
  ]
}

Read rows

Read every data row of a sheet at once. Each row comes back as an object keyed by the column headers (row.Email), plus the sheet row number (row.row_number), so Update row can write a result back to that exact row. Use this to loop over a list of records.

Inputs

Spreadsheet URLspreadsheet_urltextRequired
The URL of the spreadsheet
Sheet namesheet_nametextRequired
The name of the sheet/tab
First row is a headerhas_headertrue/false
Use the first row as the column names. Turn this off when the sheet starts straight into data; the columns are then named column_1, column_2, and so on.Default: true.
Maximum rowsmax_rowsnumber
Read at most this many data rows. Leave empty to read them all.

Outputs

Response envelope; the rows are in the 'rows' field. Read a value off a row by its column name (row.Email), never by position.

countnumber
How many data rows were read
headerslist
The column names, in sheet order
rowslist
One object per data row, keyed by column header, plus 'row_number' (the row's position in the sheet, for writing a result back to it)
statustext
Example output
{
  "count": 2,
  "headers": [
    "Company",
    "Contact Name",
    "Email",
    "Status"
  ],
  "rows": [
    {
      "Company": "Acme Corp",
      "Contact Name": "Jordan Lee",
      "Email": "jordan@acme.test",
      "Status": "New",
      "row_number": 2
    },
    {
      "Company": "Northwind",
      "Contact Name": "Sam Rivera",
      "Email": "sam@northwind.test",
      "Status": "",
      "row_number": 3
    }
  ],
  "status": "success"
}

Rename tab

Rename an existing tab in a spreadsheet.

Inputs

Spreadsheet URLspreadsheet_urltextRequired
The URL of the spreadsheet
Sheet namesheet_nametextRequired
Current name of the tab
New sheet namenew_sheet_nametextRequired
New name for the tab

Outputs

Response envelope; the payload is in the "result" field.

resultobject
statustext
Example output
{
  "result": {
    "sheet_id": 123456789,
    "title": "Renamed Tab"
  },
  "status": "success"
}

Update row

Set some cells of one row by column name, leaving the rest of the row as it is. Pair it with Read rows to write a result back to the row it came from (row.row_number). A column that doesn't exist yet is added to the header row.

Inputs

Spreadsheet URLspreadsheet_urltextRequired
The URL of the spreadsheet
Sheet namesheet_nametextRequired
The name of the sheet/tab
Row numberrow_indexnumberRequired
The row to update. Row 1 holds the column names, so the first data row is 2. Read rows gives each row's number as row_number.
ValuesvaluesobjectRequired
The cells to set, by column name, e.g. {"Category": "Travel"}. Columns left out keep their values; an empty value clears the cell.
How to save valuesvalue_input_optiontext
How Google Sheets reads the values written: as if typed (the default), or exactly as given.One of: USER_ENTERED (As if typed (numbers, dates, and formulas are recognized)), RAW (Exactly as given (text stays text)). Default: USER_ENTERED.

Outputs

No return value

Example output
{
  "added_columns": [],
  "status": "success"
}

Write row

Overwrite a whole row, from column A, with values in column order. To change only some cells of a row, use Update row.

Inputs

Spreadsheet URLspreadsheet_urltextRequired
The URL of the spreadsheet
Sheet namesheet_nametextRequired
The name of the sheet/tab
Row numberrow_indexnumberRequired
The row number to write to. The first row is 1.
Row valuesrow_valueslistRequired
A list of values to write into the row
How to save valuesvalue_input_optiontext
How Google Sheets reads the values written: as if typed (the default), or exactly as given.One of: USER_ENTERED (As if typed (numbers, dates, and formulas are recognized)), RAW (Exactly as given (text stays text)). Default: USER_ENTERED.

Outputs

No return value

Example output
{
  "status": "success"
}

On this page