> ## Documentation Index
> Fetch the complete documentation index at: https://docs.markifact.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Clear Data

> Removes all data from specified ranges in Google Sheets

Removes all data from specified ranges in Google Sheets

| | |
| - | - |
| **App** | Google Sheets |
| **Operation ID** | `sheets_clear_data` |
| **Type** | Action |
| **Connection** | `drive` (optional) |
| **Credits per run** | 1 |
| **Agent / MCP tool** | Yes |

## Inputs

| Field | Type | Required | Default | Description |
| - | - | - | - | - |
| `spreadsheet` | string | Yes | - | Google Sheets spreadsheet URL or ID. You must ask the user for it if not provided. |
| `sheet` | string or SelectItem | Yes | - | The sheet to clear data from. You can provide this in several ways: 1. If user provides just a sheet name, fill the object like this \{'label': 'Sheet1', 'value': 'Sheet1'} 2. If user provides only a sheet ID: Format as \{'label': '123456', 'value': '123456'} 3. If user provides dynamic values: Use the template syntax (e.g., '\{\{nodeId\_data\_sheet}}') 4. If user selects from dropdown: they will ge this format \{'label': 'Sheet1', 'value': '123456'}  If user doesn't provide sheet information, ask them to specify the sheet name or select from available sheets using the dropdown menu. |
| `clear_all_data` | boolean | No | `True` | Whether to clear all data from the entire sheet. true = clear all data from the sheet false = clear specific range or cell based on selection\_type |
| `selection_type` | string or SelectableOption | No | - | Type of selection when not clearing all data. Available options: 'range' - Clear a specific range of cells 'cell' - Clear a single cell Only used when clear\_all\_data is false. |
| `range` | string | No | - | Range to clear when using range selection (e.g., 'A1:D10', 'A:A', 'A:C'). REQUIRED when selection\_type is 'range'. Examples: 'A1:D10' for specific range, 'A:A' for entire column A, '1:1' for entire row 1. |
| `cell` | string | No | - | Single cell to clear when using cell selection (e.g., 'A1', 'B5'). REQUIRED when selection\_type is 'cell'. Must be a valid cell reference like 'A1', 'B5', 'Z100'. |

### SelectItem

| Field | Type | Required | Default | Description |
| - | - | - | - | - |
| `value` | string | Yes | - | The value of the selectable item. |
| `label` | string | Yes | - | The label of the selectable item, used for display purposes. If not provided, defaults to the value. |

### SelectableOption

| Field | Type | Required | Default | Description |
| - | - | - | - | - |
| `value` | string | Yes | - | |
| `label` | string | Yes | - | |

## Output

**Type**: `str`

Returns success message with cleared range.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.