younifyd
Menu

Sheets.spreadsheets.batch Update

Applies one or more updates to the spreadsheet. Each request is validated before being applied. If any request is not valid then the entire request will fail and nothing will be applied. Some requests have replies to give you some information about how they are applied. The replies will mirror the requests. For example, if you applied 4 updates and the 3rd one had a reply, then the response will have 2 empty replies, the actual reply, and another empty reply, in that order. Due to the collaborative nature of spreadsheets, it is not guaranteed that the spreadsheet will reflect exactly your changes after this completes, however it is guaranteed that the updates in the request will be applied together atomically. Your changes may be altered with respect to collaborator changes. If there are no collaborators, the spreadsheet should reflect your changes.

POST/v4/spreadsheets/{spreadsheetId}:batchUpdate

Use it in a workflow

  1. Add a step and choose the Google Sheets connector.
  2. Pick the Sheets.spreadsheets.batch Update action (under spreadsheets).
  3. Fill in the fields below, then reference the result from later steps as {{sheetsSpreadsheetsBatchUpdate.response.data}}.

Request

Path parameters

spreadsheetIdstringrequired

The spreadsheet to apply the updates to.

Query parameters

$.xgafvstring

V1 error format.

One of12

access_tokenstring

OAuth access token.

altstring

Data format for response.

One ofjsonmediaproto

callbackstring

JSONP

fieldsstring

Selector specifying which fields to include in a partial response.

keystring

API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.

oauth_tokenstring

OAuth 2.0 token for the current user.

prettyPrintboolean

Returns response with indentations and line breaks.

quotaUserstring

Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.

upload_protocolstring

Upload protocol for media (e.g. "raw", "multipart").

uploadTypestring

Legacy upload protocol for media (e.g. "media", "multipart").

Request body

Enter the body as JSON in the step's Body field.

includeSpreadsheetInResponseboolean

Determines if the update response should include the spreadsheet resource.

requestsarray<object>

A list of updates to apply to the spreadsheet. Requests will be applied in the order they are specified. If any request is not valid, no requests will be applied.

addBandingobject1 fields

Adds a new banded range to the spreadsheet.

addChartobject1 fields

Adds a chart to a sheet in the spreadsheet.

addConditionalFormatRuleobject2 fields

Adds a new conditional format rule at the given index. All subsequent rules' indexes are incremented.

addDataSourceobject1 fields

Adds a data source. After the data source is added successfully, an associated DATA_SOURCE sheet is created and an execution is triggered to refresh the sheet to read data from the data source. The request requires an additional `bigquery.readonly` OAuth scope.

addDimensionGroupobject1 fields

Creates a group over the specified range. If the requested range is a superset of the range of an existing group G, then the depth of G is incremented and this new group G' has the depth of that group. For example, a group [C:D, depth 1] + [B:E] results in groups [B:E, depth 1] and [C:D, depth 2]. If the requested range is a subset of the range of an existing group G, then the depth of the new group G' becomes one greater than the depth of G. For example, a group [B:E, depth 1] + [C:D] results in groups [B:E, depth 1] and [C:D, depth 2]. If the requested range starts before and ends within, or starts within and ends after, the range of an existing group G, then the range of the existing group G becomes the union of the ranges, and the new group G' has depth one greater than the depth of G and range as the intersection of the ranges. For example, a group [B:D, depth 1] + [C:E] results in groups [B:E, depth 1] and [C:D, depth 2].

addFilterViewobject1 fields

Adds a filter view.

addNamedRangeobject1 fields

Adds a named range to the spreadsheet.

addProtectedRangeobject1 fields

Adds a new protected range.

addSheetobject1 fields

Adds a new sheet. When a sheet is added at a given index, all subsequent sheets' indexes are incremented. To add an object sheet, use AddChartRequest instead and specify EmbeddedObjectPosition.sheetId or EmbeddedObjectPosition.newSheet.

addSlicerobject1 fields

Adds a slicer to a sheet in the spreadsheet.

appendCellsobject3 fields

Adds new cells after the last row with data in a sheet, inserting new rows into the sheet if necessary.

appendDimensionobject3 fields

Appends rows or columns to the end of a sheet.

autoFillobject3 fields

Fills in more data based on existing data.

autoResizeDimensionsobject2 fields

Automatically resizes one or more dimensions based on the contents of the cells in that dimension.

clearBasicFilterobject1 fields

Clears the basic filter, if any exists on the sheet.

copyPasteobject4 fields

Copies data from the source to the destination.

createDeveloperMetadataobject1 fields

A request to create developer metadata.

cutPasteobject3 fields

Moves data from the source to the destination.

deleteBandingobject1 fields

Removes the banded range with the given ID from the spreadsheet.

deleteConditionalFormatRuleobject2 fields

Deletes a conditional format rule at the given index. All subsequent rules' indexes are decremented.

deleteDataSourceobject1 fields

Deletes a data source. The request also deletes the associated data source sheet, and unlinks all associated data source objects.

deleteDeveloperMetadataobject1 fields

A request to delete developer metadata.

deleteDimensionobject1 fields

Deletes the dimensions from the sheet.

deleteDimensionGroupobject1 fields

Deletes a group over the specified range by decrementing the depth of the dimensions in the range. For example, assume the sheet has a depth-1 group over B:E and a depth-2 group over C:D. Deleting a group over D:E leaves the sheet with a depth-1 group over B:D and a depth-2 group over C:C.

deleteDuplicatesobject2 fields

Removes rows within this range that contain values in the specified columns that are duplicates of values in any previous row. Rows with identical values but different letter cases, formatting, or formulas are considered to be duplicates. This request also removes duplicate rows hidden from view (for example, due to a filter). When removing duplicates, the first instance of each duplicate row scanning from the top downwards is kept in the resulting range. Content outside of the specified range isn't removed, and rows considered duplicates do not have to be adjacent to each other in the range.

deleteEmbeddedObjectobject1 fields

Deletes the embedded object with the given ID.

deleteFilterViewobject1 fields

Deletes a particular filter view.

deleteNamedRangeobject1 fields

Removes the named range with the given ID from the spreadsheet.

deleteProtectedRangeobject1 fields

Deletes the protected range with the given ID.

deleteRangeobject2 fields

Deletes a range of cells, shifting other cells into the deleted area.

deleteSheetobject1 fields

Deletes the requested sheet.

duplicateFilterViewobject1 fields

Duplicates a particular filter view.

duplicateSheetobject4 fields

Duplicates the contents of a sheet.

findReplaceobject9 fields

Finds and replaces data in cells over a range, sheet, or all sheets.

insertDimensionobject2 fields

Inserts rows or columns in a sheet at a particular index.

insertRangeobject2 fields

Inserts cells into a range, shifting the existing cells over or down.

mergeCellsobject2 fields

Merges all cells in the range.

moveDimensionobject2 fields

Moves one or more rows or columns.

pasteDataobject5 fields

Inserts data into the spreadsheet starting at the specified coordinate.

randomizeRangeobject1 fields

Randomizes the order of the rows in a range.

responseIncludeGridDataboolean

True if grid data should be returned. Meaningful only if include_spreadsheet_in_response is 'true'. This parameter is ignored if a field mask was set in the request.

responseRangesarray<string>

Limits the ranges included in the response spreadsheet. Meaningful only if include_spreadsheet_in_response is 'true'.

json
{
  "includeSpreadsheetInResponse": false,
  "requests": [
    {
      "addBanding": {
        "bandedRange": {
          "bandedRangeId": 0,
          "columnProperties": {
            "firstBandColor": {
              "alpha": null,
              "blue": null,
              "green": null,
              "red": null
            },
            "firstBandColorStyle": {
              "rgbColor": null,
              "themeColor": null
            },
            "footerColor": {
              "alpha": null,
              "blue": null,
              "green": null,
              "red": null
            },
            "footerColorStyle": {
              "rgbColor": null,
              "themeColor": null
            },
            "headerColor": {
              "alpha": null,
              "blue": null,
              "green": null,
              "red": null
            },
            "headerColorStyle": {
              "rgbColor": null,
              "themeColor": null
            },
            "secondBandColor": {
              "alpha": null,
              "blue": null,
              "green": null,
              "red": null
            },
            "secondBandColorStyle": {
              "rgbColor": null,
              "themeColor": null
            }
          },
          "range": {
            "endColumnIndex": 0,
            "endRowIndex": 0,
            "sheetId": 0,
            "startColumnIndex": 0,
            "startRowIndex": 0
          },
          "rowProperties": {
            "firstBandColor": {
              "alpha": null,
              "blue": null,
              "green": null,
              "red": null
            },
            "firstBandColorStyle": {
              "rgbColor": null,
              "themeColor": null
            },
            "footerColor": {
              "alpha": null,
              "blue": null,
              "green": null,
              "red": null
            },
            "footerColorStyle": {
              "rgbColor": null,
              "themeColor": null
            },
            "headerColor": {
              "alpha": null,
              "blue": null,
              "green": null,
              "red": null
            },
            "headerColorStyle": {
              "rgbColor": null,
              "themeColor": null
            },
            "secondBandColor": {
              "alpha": null,
              "blue": null,
              "green": null,
              "red": null
            },
            "secondBandColorStyle": {
              "rgbColor": null,
              "themeColor": null
            }
          }
        }
      },
      "addChart": {
        "chart": {
          "border": {
            "color": {
              "alpha": null,
              "blue": null,
              "green": null,
              "red": null
            },
            "colorStyle": {
              "rgbColor": null,
              "themeColor": null
            }
          },
          "chartId": 0,
          "position": {
            "newSheet": false,
            "overlayPosition": {
              "anchorCell": null,
              "heightPixels": null,
              "offsetXPixels": null,
              "offsetYPixels": null,
              "widthPixels": null
            },
            "sheetId": 0
          },
          "spec": {
            "altText": "string",
            "backgroundColor": {
              "alpha": null,
              "blue": null,
              "green": null,
              "red": null
            },
            "backgroundColorStyle": {
              "rgbColor": null,
              "themeColor": null
            },
            "basicChart": {
              "axis": null,
              "chartType": null,
              "compareMode": null,
              "domains": null,
              "headerCount": null,
              "interpolateNulls": null,
              "legendPosition": null,
              "lineSmoothing": null,
              "series": null,
              "stackedType": null,
              "threeDimensional": null,
              "totalDataLabel": null
            },
            "bubbleChart": {
              "bubbleBorderColor": null,
              "bubbleBorderColorStyle": null,
              "bubbleLabels": null,
              "bubbleMaxRadiusSize": null,
              "bubbleMinRadiusSize": null,
              "bubbleOpacity": null,
              "bubbleSizes": null,
              "bubbleTextStyle": null,
              "domain": null,
              "groupIds": null,
              "legendPosition": null,
              "series": null
            },
            "candlestickChart": {
              "data": null,
              "domain": null
            },
            "dataSourceChartProperties": {
              "dataExecutionStatus": null,
              "dataSourceId": null
            },
            "filterSpecs": [
              null
            ],
            "fontName": "string",
            "hiddenDimensionStrategy": "CHART_HIDDEN_DIMENSION_STRATEGY_UNSPECIFIED",
            "histogramChart": {
              "bucketSize": null,
              "legendPosition": null,
              "outlierPercentile": null,
              "series": null,
              "showItemDividers": null
            },
            "maximized": false
          }
        }
      },
      "addConditionalFormatRule": {
        "index": 0,
        "rule": {
          "booleanRule": {
            "condition": {
              "type": null,
              "values": null
            },
            "format": {
              "backgroundColor": null,
              "backgroundColorStyle": null,
              "borders": null,
              "horizontalAlignment": null,
              "hyperlinkDisplayType": null,
              "numberFormat": null,
              "padding": null,
              "textDirection": null,
              "textFormat": null,
              "textRotation": null,
              "verticalAlignment": null,
              "wrapStrategy": null
            }
          },
          "gradientRule": {
            "maxpoint": {
              "color": null,
              "colorStyle": null,
              "type": null,
              "value": null
            },
            "midpoint": {
              "color": null,
              "colorStyle": null,
              "type": null,
              "value": null
            },
            "minpoint": {
              "color": null,
              "colorStyle": null,
              "type": null,
              "value": null
            }
          },
          "ranges": [
            {
              "endColumnIndex": null,
              "endRowIndex": null,
              "sheetId": null,
              "startColumnIndex": null,
              "startRowIndex": null
            }
          ]
        }
      },
      "addDataSource": {
        "dataSource": {
          "calculatedColumns": [
            {
              "formula": null,
              "reference": null
            }
          ],
          "dataSourceId": "string",
          "sheetId": 0,
          "spec": {
            "bigQuery": {
              "projectId": null,
              "querySpec": null,
              "tableSpec": null
            },
            "parameters": [
              null
            ]
          }
        }
      },
      "addDimensionGroup": {
        "range": {
          "dimension": "DIMENSION_UNSPECIFIED",
          "endIndex": 0,
          "sheetId": 0,
          "startIndex": 0
        }
      },
      "addFilterView": {
        "filter": {
          "criteria": {},
          "filterSpecs": [
            {
              "columnIndex": null,
              "dataSourceColumnReference": null,
              "filterCriteria": null
            }
          ],
          "filterViewId": 0,
          "namedRangeId": "string",
          "range": {
            "endColumnIndex": 0,
            "endRowIndex": 0,
            "sheetId": 0,
            "startColumnIndex": 0,
            "startRowIndex": 0
          },
          "sortSpecs": [
            {
              "backgroundColor": null,
              "backgroundColorStyle": null,
              "dataSourceColumnReference": null,
              "dimensionIndex": null,
              "foregroundColor": null,
              "foregroundColorStyle": null,
              "sortOrder": null
            }
          ],
          "title": "string"
        }
      },
      "addNamedRange": {
        "namedRange": {
          "name": "string",
          "namedRangeId": "string",
          "range": {
            "endColumnIndex": 0,
            "endRowIndex": 0,
            "sheetId": 0,
            "startColumnIndex": 0,
            "startRowIndex": 0
          }
        }
      },
      "addProtectedRange": {
        "protectedRange": {
          "description": "string",
          "editors": {
            "domainUsersCanEdit": false,
            "groups": [
              null
            ],
            "users": [
              null
            ]
          },
          "namedRangeId": "string",
          "protectedRangeId": 0,
          "range": {
            "endColumnIndex": 0,
            "endRowIndex": 0,
            "sheetId": 0,
            "startColumnIndex": 0,
            "startRowIndex": 0
          },
          "requestingUserCanEdit": false,
          "unprotectedRanges": [
            {
              "endColumnIndex": null,
              "endRowIndex": null,
              "sheetId": null,
              "startColumnIndex": null,
              "startRowIndex": null
            }
          ],
          "warningOnly": false
        }
      },
      "addSheet": {
        "properties": {
          "dataSourceSheetProperties": {
            "columns": [
              null
            ],
            "dataExecutionStatus": {
              "errorCode": null,
              "errorMessage": null,
              "lastRefreshTime": null,
              "state": null
            },
            "dataSourceId": "string"
          },
          "gridProperties": {
            "columnCount": 0,
            "columnGroupControlAfter": false,
            "frozenColumnCount": 0,
            "frozenRowCount": 0,
            "hideGridlines": false,
            "rowCount": 0,
            "rowGroupControlAfter": false
          },
          "hidden": false,
          "index": 0,
          "rightToLeft": false,
          "sheetId": 0,
          "sheetType": "SHEET_TYPE_UNSPECIFIED",
          "tabColor": {
            "alpha": 0,
            "blue": 0,
            "green": 0,
            "red": 0
          },
          "tabColorStyle": {
            "rgbColor": {
              "alpha": null,
              "blue": null,
              "green": null,
              "red": null
            },
            "themeColor": "THEME_COLOR_TYPE_UNSPECIFIED"
          },
          "title": "string"
        }
      },
      "addSlicer": {
        "slicer": {
          "position": {
            "newSheet": false,
            "overlayPosition": {
              "anchorCell": null,
              "heightPixels": null,
              "offsetXPixels": null,
              "offsetYPixels": null,
              "widthPixels": null
            },
            "sheetId": 0
          },
          "slicerId": 0,
          "spec": {
            "applyToPivotTables": false,
            "backgroundColor": {
              "alpha": null,
              "blue": null,
              "green": null,
              "red": null
            },
            "backgroundColorStyle": {
              "rgbColor": null,
              "themeColor": null
            },
            "columnIndex": 0,
            "dataRange": {
              "endColumnIndex": null,
              "endRowIndex": null,
              "sheetId": null,
              "startColumnIndex": null,
              "startRowIndex": null
            },
            "filterCriteria": {
              "condition": null,
              "hiddenValues": null,
              "visibleBackgroundColor": null,
              "visibleBackgroundColorStyle": null,
              "visibleForegroundColor": null,
              "visibleForegroundColorStyle": null
            },
            "horizontalAlignment": "HORIZONTAL_ALIGN_UNSPECIFIED",
            "textFormat": {
              "bold": null,
              "fontFamily": null,
              "fontSize": null,
              "foregroundColor": null,
              "foregroundColorStyle": null,
              "italic": null,
              "link": null,
              "strikethrough": null,
              "underline": null
            },
            "title": "string"
          }
        }
      },
      "appendCells": {
        "fields": "string",
        "rows": [
          {
            "values": [
              null
            ]
          }
        ],
        "sheetId": 0
      },
      "appendDimension": {
        "dimension": "DIMENSION_UNSPECIFIED",
        "length": 0,
        "sheetId": 0
      }
    }
  ],
  "responseIncludeGridData": false,
  "responseRanges": [
    "string"
  ]
}

Response

Returns 200 with an object. Read it in later steps with {{sheetsSpreadsheetsBatchUpdate.response.data.<field>}}.

repliesarray<object>

The reply of the updates. This maps 1:1 with the updates, although replies to some requests may be empty.

addBandingobject1 fields

The result of adding a banded range.

addChartobject1 fields

The result of adding a chart to a spreadsheet.

addDataSourceobject2 fields

The result of adding a data source.

addDimensionGroupobject1 fields

The result of adding a group.

addFilterViewobject1 fields

The result of adding a filter view.

addNamedRangeobject1 fields

The result of adding a named range.

addProtectedRangeobject1 fields

The result of adding a new protected range.

addSheetobject1 fields

The result of adding a sheet.

addSlicerobject1 fields

The result of adding a slicer to a spreadsheet.

createDeveloperMetadataobject1 fields

The response from creating developer metadata.

deleteConditionalFormatRuleobject1 fields

The result of deleting a conditional format rule.

deleteDeveloperMetadataobject1 fields

The response from deleting developer metadata.

deleteDimensionGroupobject1 fields

The result of deleting a group.

deleteDuplicatesobject1 fields

The result of removing duplicates in a range.

duplicateFilterViewobject1 fields

The result of a filter view being duplicated.

duplicateSheetobject1 fields

The result of duplicating a sheet.

findReplaceobject5 fields

The result of the find/replace.

refreshDataSourceobject1 fields

The response from refreshing one or multiple data source objects.

trimWhitespaceobject1 fields

The result of trimming whitespace in cells.

updateConditionalFormatRuleobject4 fields

The result of updating a conditional format rule.

updateDataSourceobject2 fields

The response from updating data source.

updateDeveloperMetadataobject1 fields

The response from updating developer metadata.

updateEmbeddedObjectPositionobject1 fields

The result of updating an embedded object's position.

spreadsheetIdstring

The spreadsheet the updates were applied to.

updatedSpreadsheetobject

Resource that represents a spreadsheet.

dataSourceSchedulesarray<object>6 fields

Output only. A list of data source refresh schedules.

dataSourcesarray<object>4 fields

A list of external data sources connected with the spreadsheet.

developerMetadataarray<object>5 fields

The developer metadata associated with a spreadsheet.

namedRangesarray<object>3 fields

The named ranges defined in a spreadsheet.

propertiesobject7 fields

Properties of a spreadsheet.

sheetsarray<object>13 fields

The sheets that are part of a spreadsheet.

spreadsheetIdstring

The ID of the spreadsheet. This field is read-only.

spreadsheetUrlstring

The url of the spreadsheet. This field is read-only.

json
{
  "replies": [
    {
      "addBanding": {
        "bandedRange": {
          "bandedRangeId": 0,
          "columnProperties": {
            "firstBandColor": {
              "alpha": null,
              "blue": null,
              "green": null,
              "red": null
            },
            "firstBandColorStyle": {
              "rgbColor": null,
              "themeColor": null
            },
            "footerColor": {
              "alpha": null,
              "blue": null,
              "green": null,
              "red": null
            },
            "footerColorStyle": {
              "rgbColor": null,
              "themeColor": null
            },
            "headerColor": {
              "alpha": null,
              "blue": null,
              "green": null,
              "red": null
            },
            "headerColorStyle": {
              "rgbColor": null,
              "themeColor": null
            },
            "secondBandColor": {
              "alpha": null,
              "blue": null,
              "green": null,
              "red": null
            },
            "secondBandColorStyle": {
              "rgbColor": null,
              "themeColor": null
            }
          },
          "range": {
            "endColumnIndex": 0,
            "endRowIndex": 0,
            "sheetId": 0,
            "startColumnIndex": 0,
            "startRowIndex": 0
          },
          "rowProperties": {
            "firstBandColor": {
              "alpha": null,
              "blue": null,
              "green": null,
              "red": null
            },
            "firstBandColorStyle": {
              "rgbColor": null,
              "themeColor": null
            },
            "footerColor": {
              "alpha": null,
              "blue": null,
              "green": null,
              "red": null
            },
            "footerColorStyle": {
              "rgbColor": null,
              "themeColor": null
            },
            "headerColor": {
              "alpha": null,
              "blue": null,
              "green": null,
              "red": null
            },
            "headerColorStyle": {
              "rgbColor": null,
              "themeColor": null
            },
            "secondBandColor": {
              "alpha": null,
              "blue": null,
              "green": null,
              "red": null
            },
            "secondBandColorStyle": {
              "rgbColor": null,
              "themeColor": null
            }
          }
        }
      },
      "addChart": {
        "chart": {
          "border": {
            "color": {
              "alpha": null,
              "blue": null,
              "green": null,
              "red": null
            },
            "colorStyle": {
              "rgbColor": null,
              "themeColor": null
            }
          },
          "chartId": 0,
          "position": {
            "newSheet": false,
            "overlayPosition": {
              "anchorCell": null,
              "heightPixels": null,
              "offsetXPixels": null,
              "offsetYPixels": null,
              "widthPixels": null
            },
            "sheetId": 0
          },
          "spec": {
            "altText": "string",
            "backgroundColor": {
              "alpha": null,
              "blue": null,
              "green": null,
              "red": null
            },
            "backgroundColorStyle": {
              "rgbColor": null,
              "themeColor": null
            },
            "basicChart": {
              "axis": null,
              "chartType": null,
              "compareMode": null,
              "domains": null,
              "headerCount": null,
              "interpolateNulls": null,
              "legendPosition": null,
              "lineSmoothing": null,
              "series": null,
              "stackedType": null,
              "threeDimensional": null,
              "totalDataLabel": null
            },
            "bubbleChart": {
              "bubbleBorderColor": null,
              "bubbleBorderColorStyle": null,
              "bubbleLabels": null,
              "bubbleMaxRadiusSize": null,
              "bubbleMinRadiusSize": null,
              "bubbleOpacity": null,
              "bubbleSizes": null,
              "bubbleTextStyle": null,
              "domain": null,
              "groupIds": null,
              "legendPosition": null,
              "series": null
            },
            "candlestickChart": {
              "data": null,
              "domain": null
            },
            "dataSourceChartProperties": {
              "dataExecutionStatus": null,
              "dataSourceId": null
            },
            "filterSpecs": [
              null
            ],
            "fontName": "string",
            "hiddenDimensionStrategy": "CHART_HIDDEN_DIMENSION_STRATEGY_UNSPECIFIED",
            "histogramChart": {
              "bucketSize": null,
              "legendPosition": null,
              "outlierPercentile": null,
              "series": null,
              "showItemDividers": null
            },
            "maximized": false
          }
        }
      },
      "addDataSource": {
        "dataExecutionStatus": {
          "errorCode": "string",
          "errorMessage": "string",
          "lastRefreshTime": "string",
          "state": "string"
        },
        "dataSource": {
          "calculatedColumns": [
            {
              "formula": null,
              "reference": null
            }
          ],
          "dataSourceId": "string",
          "sheetId": 0,
          "spec": {
            "bigQuery": {
              "projectId": null,
              "querySpec": null,
              "tableSpec": null
            },
            "parameters": [
              null
            ]
          }
        }
      },
      "addDimensionGroup": {
        "dimensionGroups": [
          {
            "collapsed": false,
            "depth": 0,
            "range": {
              "dimension": null,
              "endIndex": null,
              "sheetId": null,
              "startIndex": null
            }
          }
        ]
      },
      "addFilterView": {
        "filter": {
          "criteria": {},
          "filterSpecs": [
            {
              "columnIndex": null,
              "dataSourceColumnReference": null,
              "filterCriteria": null
            }
          ],
          "filterViewId": 0,
          "namedRangeId": "string",
          "range": {
            "endColumnIndex": 0,
            "endRowIndex": 0,
            "sheetId": 0,
            "startColumnIndex": 0,
            "startRowIndex": 0
          },
          "sortSpecs": [
            {
              "backgroundColor": null,
              "backgroundColorStyle": null,
              "dataSourceColumnReference": null,
              "dimensionIndex": null,
              "foregroundColor": null,
              "foregroundColorStyle": null,
              "sortOrder": null
            }
          ],
          "title": "string"
        }
      },
      "addNamedRange": {
        "namedRange": {
          "name": "string",
          "namedRangeId": "string",
          "range": {
            "endColumnIndex": 0,
            "endRowIndex": 0,
            "sheetId": 0,
            "startColumnIndex": 0,
            "startRowIndex": 0
          }
        }
      },
      "addProtectedRange": {
        "protectedRange": {
          "description": "string",
          "editors": {
            "domainUsersCanEdit": false,
            "groups": [
              null
            ],
            "users": [
              null
            ]
          },
          "namedRangeId": "string",
          "protectedRangeId": 0,
          "range": {
            "endColumnIndex": 0,
            "endRowIndex": 0,
            "sheetId": 0,
            "startColumnIndex": 0,
            "startRowIndex": 0
          },
          "requestingUserCanEdit": false,
          "unprotectedRanges": [
            {
              "endColumnIndex": null,
              "endRowIndex": null,
              "sheetId": null,
              "startColumnIndex": null,
              "startRowIndex": null
            }
          ],
          "warningOnly": false
        }
      },
      "addSheet": {
        "properties": {
          "dataSourceSheetProperties": {
            "columns": [
              null
            ],
            "dataExecutionStatus": {
              "errorCode": null,
              "errorMessage": null,
              "lastRefreshTime": null,
              "state": null
            },
            "dataSourceId": "string"
          },
          "gridProperties": {
            "columnCount": 0,
            "columnGroupControlAfter": false,
            "frozenColumnCount": 0,
            "frozenRowCount": 0,
            "hideGridlines": false,
            "rowCount": 0,
            "rowGroupControlAfter": false
          },
          "hidden": false,
          "index": 0,
          "rightToLeft": false,
          "sheetId": 0,
          "sheetType": "SHEET_TYPE_UNSPECIFIED",
          "tabColor": {
            "alpha": 0,
            "blue": 0,
            "green": 0,
            "red": 0
          },
          "tabColorStyle": {
            "rgbColor": {
              "alpha": null,
              "blue": null,
              "green": null,
              "red": null
            },
            "themeColor": "THEME_COLOR_TYPE_UNSPECIFIED"
          },
          "title": "string"
        }
      },
      "addSlicer": {
        "slicer": {
          "position": {
            "newSheet": false,
            "overlayPosition": {
              "anchorCell": null,
              "heightPixels": null,
              "offsetXPixels": null,
              "offsetYPixels": null,
              "widthPixels": null
            },
            "sheetId": 0
          },
          "slicerId": 0,
          "spec": {
            "applyToPivotTables": false,
            "backgroundColor": {
              "alpha": null,
              "blue": null,
              "green": null,
              "red": null
            },
            "backgroundColorStyle": {
              "rgbColor": null,
              "themeColor": null
            },
            "columnIndex": 0,
            "dataRange": {
              "endColumnIndex": null,
              "endRowIndex": null,
              "sheetId": null,
              "startColumnIndex": null,
              "startRowIndex": null
            },
            "filterCriteria": {
              "condition": null,
              "hiddenValues": null,
              "visibleBackgroundColor": null,
              "visibleBackgroundColorStyle": null,
              "visibleForegroundColor": null,
              "visibleForegroundColorStyle": null
            },
            "horizontalAlignment": "HORIZONTAL_ALIGN_UNSPECIFIED",
            "textFormat": {
              "bold": null,
              "fontFamily": null,
              "fontSize": null,
              "foregroundColor": null,
              "foregroundColorStyle": null,
              "italic": null,
              "link": null,
              "strikethrough": null,
              "underline": null
            },
            "title": "string"
          }
        }
      },
      "createDeveloperMetadata": {
        "developerMetadata": {
          "location": {
            "dimensionRange": {
              "dimension": null,
              "endIndex": null,
              "sheetId": null,
              "startIndex": null
            },
            "locationType": "DEVELOPER_METADATA_LOCATION_TYPE_UNSPECIFIED",
            "sheetId": 0,
            "spreadsheet": false
          },
          "metadataId": 0,
          "metadataKey": "string",
          "metadataValue": "string",
          "visibility": "DEVELOPER_METADATA_VISIBILITY_UNSPECIFIED"
        }
      },
      "deleteConditionalFormatRule": {
        "rule": {
          "booleanRule": {
            "condition": {
              "type": null,
              "values": null
            },
            "format": {
              "backgroundColor": null,
              "backgroundColorStyle": null,
              "borders": null,
              "horizontalAlignment": null,
              "hyperlinkDisplayType": null,
              "numberFormat": null,
              "padding": null,
              "textDirection": null,
              "textFormat": null,
              "textRotation": null,
              "verticalAlignment": null,
              "wrapStrategy": null
            }
          },
          "gradientRule": {
            "maxpoint": {
              "color": null,
              "colorStyle": null,
              "type": null,
              "value": null
            },
            "midpoint": {
              "color": null,
              "colorStyle": null,
              "type": null,
              "value": null
            },
            "minpoint": {
              "color": null,
              "colorStyle": null,
              "type": null,
              "value": null
            }
          },
          "ranges": [
            {
              "endColumnIndex": null,
              "endRowIndex": null,
              "sheetId": null,
              "startColumnIndex": null,
              "startRowIndex": null
            }
          ]
        }
      },
      "deleteDeveloperMetadata": {
        "deletedDeveloperMetadata": [
          {
            "location": {
              "dimensionRange": null,
              "locationType": null,
              "sheetId": null,
              "spreadsheet": null
            },
            "metadataId": 0,
            "metadataKey": "string",
            "metadataValue": "string",
            "visibility": "DEVELOPER_METADATA_VISIBILITY_UNSPECIFIED"
          }
        ]
      }
    }
  ],
  "spreadsheetId": "string",
  "updatedSpreadsheet": {
    "dataSourceSchedules": [
      {
        "dailySchedule": {
          "startTime": {
            "hours": 0,
            "minutes": 0,
            "nanos": 0,
            "seconds": 0
          }
        },
        "enabled": false,
        "monthlySchedule": {
          "daysOfMonth": [
            0
          ],
          "startTime": {
            "hours": 0,
            "minutes": 0,
            "nanos": 0,
            "seconds": 0
          }
        },
        "nextRun": {
          "endTime": "string",
          "startTime": "string"
        },
        "refreshScope": "DATA_SOURCE_REFRESH_SCOPE_UNSPECIFIED",
        "weeklySchedule": {
          "daysOfWeek": [
            "DAY_OF_WEEK_UNSPECIFIED"
          ],
          "startTime": {
            "hours": 0,
            "minutes": 0,
            "nanos": 0,
            "seconds": 0
          }
        }
      }
    ],
    "dataSources": [
      {
        "calculatedColumns": [
          {
            "formula": "string",
            "reference": {
              "name": null
            }
          }
        ],
        "dataSourceId": "string",
        "sheetId": 0,
        "spec": {
          "bigQuery": {
            "projectId": "string",
            "querySpec": {
              "rawQuery": null
            },
            "tableSpec": {
              "datasetId": null,
              "tableId": null,
              "tableProjectId": null
            }
          },
          "parameters": [
            {
              "name": null,
              "namedRangeId": null,
              "range": null
            }
          ]
        }
      }
    ],
    "developerMetadata": [
      {
        "location": {
          "dimensionRange": {
            "dimension": "DIMENSION_UNSPECIFIED",
            "endIndex": 0,
            "sheetId": 0,
            "startIndex": 0
          },
          "locationType": "DEVELOPER_METADATA_LOCATION_TYPE_UNSPECIFIED",
          "sheetId": 0,
          "spreadsheet": false
        },
        "metadataId": 0,
        "metadataKey": "string",
        "metadataValue": "string",
        "visibility": "DEVELOPER_METADATA_VISIBILITY_UNSPECIFIED"
      }
    ],
    "namedRanges": [
      {
        "name": "string",
        "namedRangeId": "string",
        "range": {
          "endColumnIndex": 0,
          "endRowIndex": 0,
          "sheetId": 0,
          "startColumnIndex": 0,
          "startRowIndex": 0
        }
      }
    ],
    "properties": {
      "autoRecalc": "RECALCULATION_INTERVAL_UNSPECIFIED",
      "defaultFormat": {
        "backgroundColor": {
          "alpha": 0,
          "blue": 0,
          "green": 0,
          "red": 0
        },
        "backgroundColorStyle": {
          "rgbColor": {
            "alpha": 0,
            "blue": 0,
            "green": 0,
            "red": 0
          },
          "themeColor": "THEME_COLOR_TYPE_UNSPECIFIED"
        },
        "borders": {
          "bottom": {
            "color": {
              "alpha": null,
              "blue": null,
              "green": null,
              "red": null
            },
            "colorStyle": {
              "rgbColor": null,
              "themeColor": null
            },
            "style": "STYLE_UNSPECIFIED",
            "width": 0
          },
          "left": {
            "color": {
              "alpha": null,
              "blue": null,
              "green": null,
              "red": null
            },
            "colorStyle": {
              "rgbColor": null,
              "themeColor": null
            },
            "style": "STYLE_UNSPECIFIED",
            "width": 0
          },
          "right": {
            "color": {
              "alpha": null,
              "blue": null,
              "green": null,
              "red": null
            },
            "colorStyle": {
              "rgbColor": null,
              "themeColor": null
            },
            "style": "STYLE_UNSPECIFIED",
            "width": 0
          },
          "top": {
            "color": {
              "alpha": null,
              "blue": null,
              "green": null,
              "red": null
            },
            "colorStyle": {
              "rgbColor": null,
              "themeColor": null
            },
            "style": "STYLE_UNSPECIFIED",
            "width": 0
          }
        },
        "horizontalAlignment": "HORIZONTAL_ALIGN_UNSPECIFIED",
        "hyperlinkDisplayType": "HYPERLINK_DISPLAY_TYPE_UNSPECIFIED",
        "numberFormat": {
          "pattern": "string",
          "type": "NUMBER_FORMAT_TYPE_UNSPECIFIED"
        },
        "padding": {
          "bottom": 0,
          "left": 0,
          "right": 0,
          "top": 0
        },
        "textDirection": "TEXT_DIRECTION_UNSPECIFIED",
        "textFormat": {
          "bold": false,
          "fontFamily": "string",
          "fontSize": 0,
          "foregroundColor": {
            "alpha": 0,
            "blue": 0,
            "green": 0,
            "red": 0
          },
          "foregroundColorStyle": {
            "rgbColor": {
              "alpha": null,
              "blue": null,
              "green": null,
              "red": null
            },
            "themeColor": "THEME_COLOR_TYPE_UNSPECIFIED"
          },
          "italic": false,
          "link": {
            "uri": "string"
          },
          "strikethrough": false,
          "underline": false
        },
        "textRotation": {
          "angle": 0,
          "vertical": false
        },
        "verticalAlignment": "VERTICAL_ALIGN_UNSPECIFIED",
        "wrapStrategy": "WRAP_STRATEGY_UNSPECIFIED"
      },
      "iterativeCalculationSettings": {
        "convergenceThreshold": 0,
        "maxIterations": 0
      },
      "locale": "string",
      "spreadsheetTheme": {
        "primaryFontFamily": "string",
        "themeColors": [
          {
            "color": {
              "rgbColor": null,
              "themeColor": null
            },
            "colorType": "THEME_COLOR_TYPE_UNSPECIFIED"
          }
        ]
      },
      "timeZone": "string",
      "title": "string"
    },
    "sheets": [
      {
        "bandedRanges": [
          {
            "bandedRangeId": 0,
            "columnProperties": {
              "firstBandColor": null,
              "firstBandColorStyle": null,
              "footerColor": null,
              "footerColorStyle": null,
              "headerColor": null,
              "headerColorStyle": null,
              "secondBandColor": null,
              "secondBandColorStyle": null
            },
            "range": {
              "endColumnIndex": null,
              "endRowIndex": null,
              "sheetId": null,
              "startColumnIndex": null,
              "startRowIndex": null
            },
            "rowProperties": {
              "firstBandColor": null,
              "firstBandColorStyle": null,
              "footerColor": null,
              "footerColorStyle": null,
              "headerColor": null,
              "headerColorStyle": null,
              "secondBandColor": null,
              "secondBandColorStyle": null
            }
          }
        ],
        "basicFilter": {
          "criteria": {},
          "filterSpecs": [
            {
              "columnIndex": null,
              "dataSourceColumnReference": null,
              "filterCriteria": null
            }
          ],
          "range": {
            "endColumnIndex": 0,
            "endRowIndex": 0,
            "sheetId": 0,
            "startColumnIndex": 0,
            "startRowIndex": 0
          },
          "sortSpecs": [
            {
              "backgroundColor": null,
              "backgroundColorStyle": null,
              "dataSourceColumnReference": null,
              "dimensionIndex": null,
              "foregroundColor": null,
              "foregroundColorStyle": null,
              "sortOrder": null
            }
          ]
        },
        "charts": [
          {
            "border": {
              "color": null,
              "colorStyle": null
            },
            "chartId": 0,
            "position": {
              "newSheet": null,
              "overlayPosition": null,
              "sheetId": null
            },
            "spec": {
              "altText": null,
              "backgroundColor": null,
              "backgroundColorStyle": null,
              "basicChart": null,
              "bubbleChart": null,
              "candlestickChart": null,
              "dataSourceChartProperties": null,
              "filterSpecs": null,
              "fontName": null,
              "hiddenDimensionStrategy": null,
              "histogramChart": null,
              "maximized": null
            }
          }
        ],
        "columnGroups": [
          {
            "collapsed": false,
            "depth": 0,
            "range": {
              "dimension": null,
              "endIndex": null,
              "sheetId": null,
              "startIndex": null
            }
          }
        ],
        "conditionalFormats": [
          {
            "booleanRule": {
              "condition": null,
              "format": null
            },
            "gradientRule": {
              "maxpoint": null,
              "midpoint": null,
              "minpoint": null
            },
            "ranges": [
              null
            ]
          }
        ],
        "data": [
          {
            "columnMetadata": [
              null
            ],
            "rowData": [
              null
            ],
            "rowMetadata": [
              null
            ],
            "startColumn": 0,
            "startRow": 0
          }
        ],
        "developerMetadata": [
          {
            "location": {
              "dimensionRange": null,
              "locationType": null,
              "sheetId": null,
              "spreadsheet": null
            },
            "metadataId": 0,
            "metadataKey": "string",
            "metadataValue": "string",
            "visibility": "DEVELOPER_METADATA_VISIBILITY_UNSPECIFIED"
          }
        ],
        "filterViews": [
          {
            "criteria": {},
            "filterSpecs": [
              null
            ],
            "filterViewId": 0,
            "namedRangeId": "string",
            "range": {
              "endColumnIndex": null,
              "endRowIndex": null,
              "sheetId": null,
              "startColumnIndex": null,
              "startRowIndex": null
            },
            "sortSpecs": [
              null
            ],
            "title": "string"
          }
        ],
        "merges": [
          {
            "endColumnIndex": 0,
            "endRowIndex": 0,
            "sheetId": 0,
            "startColumnIndex": 0,
            "startRowIndex": 0
          }
        ],
        "properties": {
          "dataSourceSheetProperties": {
            "columns": [
              null
            ],
            "dataExecutionStatus": {
              "errorCode": null,
              "errorMessage": null,
              "lastRefreshTime": null,
              "state": null
            },
            "dataSourceId": "string"
          },
          "gridProperties": {
            "columnCount": 0,
            "columnGroupControlAfter": false,
            "frozenColumnCount": 0,
            "frozenRowCount": 0,
            "hideGridlines": false,
            "rowCount": 0,
            "rowGroupControlAfter": false
          },
          "hidden": false,
          "index": 0,
          "rightToLeft": false,
          "sheetId": 0,
          "sheetType": "SHEET_TYPE_UNSPECIFIED",
          "tabColor": {
            "alpha": 0,
            "blue": 0,
            "green": 0,
            "red": 0
          },
          "tabColorStyle": {
            "rgbColor": {
              "alpha": null,
              "blue": null,
              "green": null,
              "red": null
            },
            "themeColor": "THEME_COLOR_TYPE_UNSPECIFIED"
          },
          "title": "string"
        },
        "protectedRanges": [
          {
            "description": "string",
            "editors": {
              "domainUsersCanEdit": null,
              "groups": null,
              "users": null
            },
            "namedRangeId": "string",
            "protectedRangeId": 0,
            "range": {
              "endColumnIndex": null,
              "endRowIndex": null,
              "sheetId": null,
              "startColumnIndex": null,
              "startRowIndex": null
            },
            "requestingUserCanEdit": false,
            "unprotectedRanges": [
              null
            ],
            "warningOnly": false
          }
        ],
        "rowGroups": [
          {
            "collapsed": false,
            "depth": 0,
            "range": {
              "dimension": null,
              "endIndex": null,
              "sheetId": null,
              "startIndex": null
            }
          }
        ]
      }
    ],
    "spreadsheetId": "string",
    "spreadsheetUrl": "string"
  }
}

Need more? See the Google Sheets guide for connection setup and behaviour shared by every action.

Was this page helpful?