← Back to all apps

Google Sheets

Productivityby OpenAI

Connector for interacting with Google Sheets via the REST API. Supports reading an entire sheet, reading a single cell, writing to a cell, and fetching the current user's profile

4ChatGPT Tools
OpenAIDeveloper
ProductivityCategory

Available Tools

Add Sheet To Spreadsheet

add_sheet_to_spreadsheet
Full Description

Add a new sheet to an existing spreadsheet.

Parameters (2 required)
Required
sheet_namestring

Exact sheet tab title (e.g. Sheet1 or Q1 Plan). Do not add A1 quotes, !, or coordinates.

spreadsheet_urlstring

Google Sheets spreadsheet URL in the format https://docs.google.com/spreadsheets/d/<SPREADSHEET_ID>/... or a raw spreadsheet ID.

Append Range

append_range
Full Description

Append values to the end of a logical table within a spreadsheet.

Preferred tool for adding new rows at the bottom of existing data.

Parameters (4 required)
Required
rangestring

Optional A1 range used to find the logical table to append to, e.g. A1:D1 or B:E. Do not include the sheet name here and avoid partial bounds like A1:D. Use append_range whenever the intent is 'add row(s) at the bottom' so Google Sheets picks the next row automatically (instead of manually targeting A{n+1}:...). Pass null to append using the whole sheet.

sheet_namestring

Sheet tab name only (no ! or coordinates). For A1 notation compatibility, quote names with spaces/punctuation (e.g. 'Q1 Plan'). If the name contains a single quote, escape it as two single quotes inside the quoted name (e.g. 'O''Reilly').

spreadsheet_urlstring

Google Sheets spreadsheet URL in the format https://docs.google.com/spreadsheets/d/<SPREADSHEET_ID>/... or a raw spreadsheet ID.

valuesarray

Rows to append. Each inner list is one row. Keep column count consistent with your table schema.

Clear Range

clear_range
Full Description

Clear values from a range of cells within a spreadsheet.

Parameters (2 required, 1 optional)
Required
sheet_namestring

Sheet tab name only (no ! or coordinates). For A1 notation compatibility, quote names with spaces/punctuation (e.g. 'Q1 Plan'). If the name contains a single quote, escape it as two single quotes inside the quoted name (e.g. 'O''Reilly').

spreadsheet_urlstring

Google Sheets spreadsheet URL in the format https://docs.google.com/spreadsheets/d/<SPREADSHEET_ID>/... or a raw spreadsheet ID.

Optional
rangestring

The range of cells to clear (A1 or R1C1 notation). Use null to clear the entire sheet.

Default: null

Create Chart

create_chart
Full Description

Create an embedded chart on a new sheet from the specified range.

Parameters (4 required, 12 optional)
Required
chart_titlestring

Title for the chart

rangestring

Primary chart source range in bounded A1 notation with explicit start/end cells, e.g. A1:B20. Do not include sheet name. Use exactly two columns here: first column for labels, second column for the first numeric series. Add any extra series through series_ranges/secondary_series_ranges.

sheet_namestring

Exact sheet tab name containing the chart data (for this tool, pass the literal tab name without A1 quoting).

spreadsheet_urlstring

Google Sheets spreadsheet URL in the format https://docs.google.com/spreadsheets/d/<SPREADSHEET_ID>/... or a raw spreadsheet ID.

Optional
anchor_cellstring

Optional anchor cell like F1 (single cell only, no sheet prefix). Use null to create chart on a new sheet.

Default: null
chart_typestring

Chart type: COLUMN, LINE, BAR, SCATTER, AREA, COMBO, STEPPED_AREA. If using stacked_type, prefer COLUMN/AREA/BAR; LINE often rejects stacked_type. BAR can be stricter about series axis assignments in Google Sheets.

Default: COLUMN
header_countinteger

Number of header rows at the top of the range to use for labels (e.g., 1 to use row 1).

Default: null
legend_positionstring

Legend position: BOTTOM_LEGEND, TOP_LEGEND, LEFT_LEGEND, RIGHT_LEGEND, NO_LEGEND

Default: BOTTOM_LEGEND
secondary_series_rangesarray

Optional ranges for series on the right axis. Each entry must be a single-row or single-column bounded A1 range (e.g. D1:D20), with no sheet prefix.

Default: null
series_rangesarray

Optional additional series ranges on the left axis. Each entry must be a single-row or single-column bounded A1 range (e.g. C1:C20), with no sheet prefix.

Default: null
stacked_typestring

Stacking option: STACKED, PERCENT_STACKED, or NOT_STACKED. Set only when supported by chart_type.

Default: null
title_font_colorstring

Optional hex color or named color for the chart title text (e.g. '#1A2B3C' or 'black').

Default: null
title_font_familystring

Optional font family for the chart title, e.g. 'Arial'.

Default: null
title_font_sizeinteger

Optional font size (points) for the chart title.

Default: null
x_axis_titlestring

Custom title for X-axis

Default: X-Axis
y_axis_titlestring

Custom title for Y-axis

Default: Y-Axis

Create Spreadsheet

create_spreadsheet
Full Description

Create a new spreadsheet with a single sheet.

Parameters (1 required, 1 optional)
Required
titlestring

The title of the spreadsheet document.

Optional
sheet_namestring

The name of the first sheet in the new spreadsheet. Use null for the default name 'Sheet1'.

Default: null

Duplicate Sheet

duplicate_sheet
Full Description

Duplicate an existing sheet within a spreadsheet.

Parameters (2 required, 2 optional)
Required
source_sheet_namestring

Exact sheet tab title (e.g. Sheet1 or Q1 Plan). Do not add A1 quotes, !, or coordinates.

spreadsheet_urlstring

Google Sheets spreadsheet URL in the format https://docs.google.com/spreadsheets/d/<SPREADSHEET_ID>/... or a raw spreadsheet ID.

Optional
insert_indexinteger

Optional index where the new sheet should be inserted (0-based). Use null to append at end.

Default: null
new_sheet_namestring

Optional name for the duplicate sheet. Must be unique in the spreadsheet and 100 characters or fewer. Use null to let Google assign a unique name.

Default: null

Get Profile

get_profile

Get Range

get_range
Full Description

Read values from a range of cells within a spreadsheet.

Parameters (3 required, 1 optional)
Required
rangestring

Cell range only (A1 or R1C1), e.g. A1:B10, A:Z, or 1:200. Do not include the sheet name here (pass it only in sheet_name), and do not pass duplicated prefixes like Sheet1!Sheet1!A1:B10. Keep the range within existing sheet bounds.

sheet_namestring

Sheet tab name only (no ! or coordinates). For A1 notation compatibility, quote names with spaces/punctuation (e.g. 'Q1 Plan'). If the name contains a single quote, escape it as two single quotes inside the quoted name (e.g. 'O''Reilly').

spreadsheet_urlstring

Google Sheets spreadsheet URL in the format https://docs.google.com/spreadsheets/d/<SPREADSHEET_ID>/... or a raw spreadsheet ID.

Optional
value_render_option

The option to render the values, e.g. 'FORMATTED_VALUE', 'UNFORMATTED_VALUE' or 'FORMULA'. Use null for default.

Default: null

Get Spreadsheet Metadata

get_spreadsheet_metadata
Full Description

Get metadata about a spreadsheet.

Parameters (1 required, 1 optional)
Required
spreadsheet_urlstring

Google Sheets spreadsheet URL in the format https://docs.google.com/spreadsheets/d/<SPREADSHEET_ID>/... or a raw spreadsheet ID.

Optional
charts_onlyboolean

When true, return only sheet properties and chart IDs/titles.

Default: False

Insert Range

insert_range
Full Description

Insert one or more rows at the specified location and populate them with values.

Parameters (4 required)
Required
sheet_namestring

Exact sheet tab title (e.g. Sheet1 or Q1 Plan). Do not add A1 quotes, !, or coordinates.

spreadsheet_urlstring

Google Sheets spreadsheet URL in the format https://docs.google.com/spreadsheets/d/<SPREADSHEET_ID>/... or a raw spreadsheet ID.

start_row_indexinteger

0-based index where to insert rows (0 = before first row, 1 = before second row, etc.)

valuesarray

Values to populate the inserted rows. The number of rows will be inferred from this.

Search Rows

search_rows
Full Description

Search for rows containing a query string and return matching rows as a Markdown table.

Usage guidance:

  • Retrieve the first row (e.g. with get_range using A1:Z1) to learn header names and

column positions; it is often a header row.

  • Then call this tool to search within a larger range. This returns only matching rows

and is preferable to retrieving the entire range, which can exhaust the context window.

  • The returned markdown table includes a leading Row column with 1-based row numbers

relative to the provided range (the header row is left blank).

Implementation notes: this tool fetches the full selected range, scans each row client-side, and returns all matching rows with the requested columns.

Parameters (4 required, 4 optional)
Required
querystring

String to search for in any cell within each row.

rangestring

Cell range to search (A1 or R1C1), e.g. A1:Z200. Do not include the sheet name here (passing Sheet1!A1:Z200 will fail because sheet_name is prepended automatically).

sheet_namestring

Sheet tab name only (no ! or coordinates). For A1 notation compatibility, quote names with spaces/punctuation (e.g. 'Q1 Plan'). If the name contains a single quote, escape it as two single quotes inside the quoted name (e.g. 'O''Reilly').

spreadsheet_urlstring

Google Sheets spreadsheet URL in the format https://docs.google.com/spreadsheets/d/<SPREADSHEET_ID>/... or a raw spreadsheet ID.

Optional
column_numbersarray

1-based column numbers to return. Use null to return all columns (up to max_columns).

Default: null
include_header_rowboolean

When true, always include the header row as the first data row in the output.

Default: True
max_columnsinteger

Maximum number of columns to return when column_numbers is null. Default is 100.

Default: 100
max_rowsinteger

Maximum number of rows to return from the selected range. Default is 500.

Default: 500

Write Range

write_range
Full Description

Write values to an exact range of cells within a spreadsheet.

Use this when you have a specific destination range (for example A2:D2 or A2:D200). This does not auto-append after the last populated row. If you need to add rows, use append_range (bottom) or insert_range (specific index).

Parameters (4 required)
Required
rangestring

Target cell range only (A1 or R1C1), e.g. A1:B10. Do not include the sheet name here. Use write_range only when you know the exact destination cells already exist and you intend to write/overwrite those cells. write_range does not grow sheet dimensions, so guessed next-row writes (like A3:D3) can fail with grid limit errors. For adding a new row at the bottom of existing data, use append_range instead.

sheet_namestring

Sheet tab name only (no ! or coordinates). For A1 notation compatibility, quote names with spaces/punctuation (e.g. 'Q1 Plan'). If the name contains a single quote, escape it as two single quotes inside the quoted name (e.g. 'O''Reilly').

spreadsheet_urlstring

Google Sheets spreadsheet URL in the format https://docs.google.com/spreadsheets/d/<SPREADSHEET_ID>/... or a raw spreadsheet ID.

valuesarray

2D row-major matrix of values to write. Matrix height/width must not exceed the specified range bounds (e.g. two rows and three columns requires a range that can hold 2x3 cells).