Modify Sheet Values
modify_sheet_valuesWrites, updates, or clears values in a specified Google Sheets range, and can insert Drive or People smart chips. Use it to edit spreadsheet cells by range and spreadsheet ID.
Instructions
Modifies values in a specific range of a Google Sheet - can write, update, or clear values, or insert Smart Chips (Drive files/folders or People).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| chips | No | Smart chip(s) to insert instead of values: - A single URL or email string for a single cell (e.g., "https://drive.google.com/drive/folders/123", "user@example.com"). - A list of URLs or emails for a single cell (multiple chips) or across cells (e.g., ["https://...", "https://..."]). - A 2D list of URLs/emails matching a grid range. For a single-row or single-column range, each inner list is instead the chips for one cell (e.g., [["a@x.com", "b@x.com"]] puts both chips in the first cell of "A1:C1"). - A dict or list of dicts with explicit properties (e.g., {"type": "drive", "uri": "..."}, {"type": "person", "email": "..."}). - A JSON-encoded string representing any of the above formats. | |
| values | No | 2D array of values to write/update. Can be a JSON string or Python list. Required unless clear_values=True or chips is provided. | |
| chip_type | No | Explicit chip type if passing raw strings in chips: "drive" (default for URLs/IDs) or "person" (default for emails). | |
| range_name | Yes | The range to modify (e.g., "Sheet1!A1:D10", "A1:D10"). Required. | |
| clear_values | No | If True, clears the range instead of writing values. Defaults to False. | |
| spreadsheet_id | Yes | The ID of the spreadsheet. Required. | |
| user_google_email | Yes | The user's Google email address. Required. | |
| value_input_option | No | How to interpret input values ("RAW" or "USER_ENTERED"). Defaults to "USER_ENTERED". | USER_ENTERED |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |