Google Sheets connector
Read, add, update, and format rows and worksheets in Google Sheets from AgentRuntime workflows.
En esta página
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
- 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.
- 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.
- 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.
- Test it
In Workflow Studio, add the
google_sheets_find_spreadsheetstool 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 aspreadsheet_name, plusexact_matchfalse,include_team_drivesfalse, andpage_size10.
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, andgoogle_sheets_format_rowhighlights overdue rows. - Report export.
google_sheets_get_many_rowsreads a summary tab andgoogle_sheets_export_sheetturns it into CSV. - Inventory sync.
google_sheets_find_rowslooks up an item, andgoogle_sheets_update_roworgoogle_sheets_insert_rowwrites 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.
Read and search
| Tool | Access | What it does | Required arguments |
|---|---|---|---|
google_sheets_export_sheet | Read | Export a worksheet as CSV or TSV text. | spreadsheet_id, sheet_id, format |
google_sheets_find_row_by_num | Read | Get a worksheet row by row number. | spreadsheet_id, sheet_id, row_number, header_row, use_header_names |
google_sheets_find_rows | Read | Find 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_spreadsheets | Read | Find spreadsheets in Drive by name. | spreadsheet_name, exact_match, include_team_drives, page_size |
google_sheets_find_worksheet | Read | Find worksheets in a spreadsheet by title. | spreadsheet_id, title, exact_match |
google_sheets_get_many_rows | Read | Get all rows from a worksheet, excluding the header row. | spreadsheet_id, sheet_id, header_row, use_header_names |
google_sheets_get_rows | Read | Get 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
| Tool | Access | What it does | Required arguments |
|---|---|---|---|
google_sheets_add_conditional_format_rule | Write | Add 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_cell | Write | Clear a single worksheet cell. | spreadsheet_id, sheet_id, cell |
google_sheets_clear_range | Write | Clear values from a specified A1 range. | spreadsheet_id, range |
google_sheets_clear_row | Write | Clear all values in a worksheet row without deleting the row. | spreadsheet_id, sheet_id, row |
google_sheets_clear_sheet | Write | Clear worksheet values, with optional header preservation. | spreadsheet_id, sheet_id, preserve_header, header_row |
google_sheets_create_column | Write | Insert a worksheet column with a header label at a chosen position. | spreadsheet_id, sheet_id, column_name, column_index |
google_sheets_delete_row | Delete | Delete a worksheet row by row number. | spreadsheet_id, sheet_id, row_number |
google_sheets_format_row | Write | Format one or more worksheet rows. | spreadsheet_id, sheet_id, starting_row, ending_row, bg_color, text_color, bold, italic, strikethrough |
google_sheets_insert_multiple_rows | Write | Append 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_row | Write | Append a single row to a worksheet. | spreadsheet_id, sheet_id, values, values_by_header, header_row, as_string |
google_sheets_update_multiple_rows | Write | Update multiple worksheet rows in one batchUpdate request. | spreadsheet_id, sheet_id, header_row, as_string, updates |
google_sheets_update_row | Write | Update a single worksheet row by row number. | spreadsheet_id, sheet_id, row_number, values, values_by_header, header_row, as_string |
Spreadsheets and worksheets
| Tool | Access | What it does | Required arguments |
|---|---|---|---|
google_sheets_copy_worksheet | Write | Copy a worksheet into another spreadsheet. | spreadsheet_id, sheet_id, destination_spreadsheet_id |
google_sheets_create_spreadsheet | Write | Create a blank Google Sheets spreadsheet, optionally inside a Drive folder. | title, folder_id |
google_sheets_create_worksheet | Write | Create a worksheet tab in an existing spreadsheet, with optional header values. | spreadsheet_id, title, headers |
google_sheets_delete_worksheet | Delete | Delete a worksheet from a spreadsheet. | spreadsheet_id, sheet_id |
google_sheets_rename_worksheet | Write | Rename 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/spreadsheetshttps://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
| Problem | What to do |
|---|---|
No matches from google_sheets_find_rows | Check that column_name matches the header text exactly, or set exact_match to false. |
| Rows come back as lists, not named fields | Set use_header_names to true and make sure header_row points at your header row. |
Not sure which sheet_id to use | Call google_sheets_find_worksheet with the tab title. The numeric ID is different from the title. |
| Google access stopped working | Open Connections, open the Google account, and click Reconnect. If you removed a permission, click Update permissions and tick the service again. |