Google Sheets connector

Read, add, update, and format rows and worksheets in Google Sheets from AgentRuntime workflows.

On this page

The google-sheets connector uses the Google Sheets API with Drive search. Workflows can find spreadsheets, read rows, add and update rows by header name or by position, import many rows at once, and export a worksheet as CSV.

Prerequisites

  • A Google account that can use Google Sheets and Drive.
  • A Google account connection in AgentRuntime with the Google Sheets service ticked. See Google Workspace.
  • The project_contributor role or higher in your workspace, which lets you manage connections and MCP instances. See Roles and permissions.

Connect in AgentRuntime

  1. Sign in with Google

    Go to Connections. In the Accounts section, click Sign in with Google. Enter a display name, tick Google Sheets (and any other Google services you plan to use), click Continue to Google, and approve the permissions. If you already connected a Google account with this service ticked, skip this step. If Sign in with Google is missing or Continue to Google is disabled, Google sign-in is not set up for your workspace: contact support. See Connections.

  2. Add the connector to your workspace

    Click MCP in the sidebar, then Add connectors. Find Google Sheets in the App catalog, select it, and click Add to workspace. The instance now appears on the MCP connectors page. See MCP instances.

  3. Attach your Google account to a profile

    Open the new instance to reach Instance config. Under Profiles for this connector, click New profile, enter a Display name, and on the Use a saved connection tab choose your Google account under Which connection?. Set Status to Active — can be used in workflows, click Save, then click Use this profile for workflows. You do not enter tokens yourself.

  4. Test it

    In Workflow Studio, add the google_sheets_find_spreadsheets tool from your Google Sheets instance (use Browse platform MCP if it is not listed), fill in its arguments, and run the workflow. A successful step means the connection works. Pass a spreadsheet_name, plus exact_match false, include_team_drives false, and page_size 10.

What you can build

  • Lead log. A form webhook becomes a new row with google_sheets_insert_row.
  • Dashboard refresh. A database query is written with google_sheets_insert_multiple_rows, and google_sheets_format_row highlights overdue rows.
  • Report export. google_sheets_get_many_rows reads a summary tab and google_sheets_export_sheet turns it into CSV.
  • Inventory sync. google_sheets_find_rows looks up an item, and google_sheets_update_row or google_sheets_insert_row writes the change.

Tools

The Required arguments column lists the fields the tool's input schema marks as required. Some of them are optional in practice; if you have nothing to set, pass an empty value such as "", [], {}, or false.

Tools marked Delete remove rows or worksheets, or clear data.

ToolAccessWhat it doesRequired arguments
google_sheets_export_sheetReadExport a worksheet as CSV or TSV text.spreadsheet_id, sheet_id, format
google_sheets_find_row_by_numReadGet a worksheet row by row number.spreadsheet_id, sheet_id, row_number, header_row, use_header_names
google_sheets_find_rowsReadFind worksheet rows where a column matches a value.spreadsheet_id, sheet_id, column_name, search_value, exact_match, starting_row, number_of_rows, header_row, use_header_names
google_sheets_find_spreadsheetsReadFind spreadsheets in Drive by name.spreadsheet_name, exact_match, include_team_drives, page_size
google_sheets_find_worksheetReadFind worksheets in a spreadsheet by title.spreadsheet_id, title, exact_match
google_sheets_get_many_rowsReadGet all rows from a worksheet, excluding the header row.spreadsheet_id, sheet_id, header_row, use_header_names
google_sheets_get_rowsReadGet a paginated slice of worksheet rows starting from a row number.spreadsheet_id, sheet_id, start_row, group_size, header_row, use_header_names

Write and format

ToolAccessWhat it doesRequired arguments
google_sheets_add_conditional_format_ruleWriteAdd a conditional format rule to a worksheet range.spreadsheet_id, sheet_id, start_row, end_row, start_column, end_column, condition_type, condition_value, rule_index, bg_color, text_color, bold, italic
google_sheets_clear_cellWriteClear a single worksheet cell.spreadsheet_id, sheet_id, cell
google_sheets_clear_rangeWriteClear values from a specified A1 range.spreadsheet_id, range
google_sheets_clear_rowWriteClear all values in a worksheet row without deleting the row.spreadsheet_id, sheet_id, row
google_sheets_clear_sheetWriteClear worksheet values, with optional header preservation.spreadsheet_id, sheet_id, preserve_header, header_row
google_sheets_create_columnWriteInsert a worksheet column with a header label at a chosen position.spreadsheet_id, sheet_id, column_name, column_index
google_sheets_delete_rowDeleteDelete a worksheet row by row number.spreadsheet_id, sheet_id, row_number
google_sheets_format_rowWriteFormat one or more worksheet rows.spreadsheet_id, sheet_id, starting_row, ending_row, bg_color, text_color, bold, italic, strikethrough
google_sheets_insert_multiple_rowsWriteAppend multiple rows to a worksheet from column_names, JSON, or CSV input.spreadsheet_id, sheet_id, input_type, rows, csv, overwrite, header_row, as_string, duplicate_field
google_sheets_insert_rowWriteAppend a single row to a worksheet.spreadsheet_id, sheet_id, values, values_by_header, header_row, as_string
google_sheets_update_multiple_rowsWriteUpdate multiple worksheet rows in one batchUpdate request.spreadsheet_id, sheet_id, header_row, as_string, updates
google_sheets_update_rowWriteUpdate a single worksheet row by row number.spreadsheet_id, sheet_id, row_number, values, values_by_header, header_row, as_string

Spreadsheets and worksheets

ToolAccessWhat it doesRequired arguments
google_sheets_copy_worksheetWriteCopy a worksheet into another spreadsheet.spreadsheet_id, sheet_id, destination_spreadsheet_id
google_sheets_create_spreadsheetWriteCreate a blank Google Sheets spreadsheet, optionally inside a Drive folder.title, folder_id
google_sheets_create_worksheetWriteCreate a worksheet tab in an existing spreadsheet, with optional header values.spreadsheet_id, title, headers
google_sheets_delete_worksheetDeleteDelete a worksheet from a spreadsheet.spreadsheet_id, sheet_id
google_sheets_rename_worksheetWriteRename a worksheet in a spreadsheet.spreadsheet_id, sheet_id, new_name

Example

Append a lead row using column headers. sheet_id is the numeric ID of the tab, not its name. Every required argument is included; values is empty because values_by_header is used.

{
  "id": "log-lead",
  "type": "mcp",
  "name": "Insert lead row",
  "tool_name": "google_sheets_insert_row",
  "tool_args": {
    "spreadsheet_id": "{{input.crm_spreadsheet_id}}",
    "sheet_id": 0,
    "values": [],
    "values_by_header": {
      "Name": "{{input.name}}",
      "Email": "{{input.email}}",
      "Status": "new"
    },
    "header_row": 1,
    "as_string": false
  },
  "timeout_s": 30
}

Configuration

Google connectors take no keys from you: the permissions come from your Google account connection.

Google permissions (scopes) requested when you tick this service:

  • https://www.googleapis.com/auth/spreadsheets
  • https://www.googleapis.com/auth/drive.readonly

Signing in also requests openid and https://www.googleapis.com/auth/userinfo.email so AgentRuntime can tell which Google account signed in.

Troubleshooting

ProblemWhat to do
No matches from google_sheets_find_rowsCheck that column_name matches the header text exactly, or set exact_match to false.
Rows come back as lists, not named fieldsSet use_header_names to true and make sure header_row points at your header row.
Not sure which sheet_id to useCall google_sheets_find_worksheet with the tab title. The numeric ID is different from the title.
Google access stopped workingOpen Connections, open the Google account, and click Reconnect. If you removed a permission, click Update permissions and tick the service again.
Edit this pageagentruntime-io/agentruntime-docs