> ## 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.

# List Sheets

> Retrieve and manage all sheets within a Google Sheets workbook

The **List Sheets** node retrieves information about all sheets (tabs) within a Google Sheets workbook. Perfect for discovering sheet structure and managing multi-sheet workbooks. This is an **AI-powered node** that can understand natural language instructions.

***

## When to Use It

* Discover all sheets in a workbook before processing
* Get sheet names and IDs for dynamic workflows
* Analyze workbook structure and organization
* Validate sheet existence before operations
* Build workflows that work with multiple sheets
* Audit and manage large workbooks with many tabs

***

## Inputs

| Field           | Type | Required | Description                         |
| --------------- | ---- | -------- | ----------------------------------- |
| **Spreadsheet** | Text | Yes      | Google Sheets spreadsheet URL or ID |

### Spreadsheet Input Options

**URL Format:**

```
https://docs.google.com/spreadsheets/d/1BxiMVs0XRA5nFMdKvBdBZjgmUUqptlbs74OgvE2upms/edit
```

**Spreadsheet ID Format:**

```
1BxiMVs0XRA5nFMdKvBdBZjgmUUqptlbs74OgvE2upms
```

***

## Output

Returns detailed information about all sheets in the workbook:

```json theme={"dark"}
{
  "spreadsheet_id": "1BxiMVs0XRA5nFMdKvBdBZjgmUUqptlbs74OgvE2upms",
  "spreadsheet_title": "Marketing Dashboard 2024",
  "total_sheets": 4,
  "sheets": [
    {
      "sheet_id": 0,
      "sheet_name": "Overview",
      "index": 0,
      "row_count": 1000,
      "column_count": 26,
      "is_hidden": false,
      "tab_color": null
    },
    {
      "sheet_id": 123456789,
      "sheet_name": "Q4 Data",
      "index": 1,
      "row_count": 500,
      "column_count": 15,
      "is_hidden": false,
      "tab_color": {
        "red": 0.2,
        "green": 0.6,
        "blue": 0.9
      }
    },
    {
      "sheet_id": 987654321,
      "sheet_name": "Archive",
      "index": 2,
      "row_count": 2000,
      "column_count": 20,
      "is_hidden": true,
      "tab_color": null
    }
  ]
}
```

### Output Fields:

| Field                  | Description                         |
| ---------------------- | ----------------------------------- |
| **spreadsheet\_id**    | Unique Google Sheets spreadsheet ID |
| **spreadsheet\_title** | Title of the workbook               |
| **total\_sheets**      | Number of sheets in the workbook    |
| **sheets**             | Array of sheet details              |

### Sheet Details:

| Field             | Description                           |
| ----------------- | ------------------------------------- |
| **sheet\_id**     | Unique numerical ID for the sheet     |
| **sheet\_name**   | Display name of the sheet tab         |
| **index**         | Position of the sheet (0-based)       |
| **row\_count**    | Maximum number of rows                |
| **column\_count** | Maximum number of columns             |
| **is\_hidden**    | Whether the sheet is hidden from view |
| **tab\_color**    | RGB color of the sheet tab (if set)   |

***

## Credit Cost

* **Cost per run**: 1 credit

***

## Common Workflows

**Dynamic Sheet Processing:**

```
[List Sheets] → [Filter by Name Pattern] → [Process Each Sheet] → [Combine Results]
```

**Workbook Analysis:**

```
[List Sheets] → [Get Sheet Sizes] → [Identify Large Sheets] → [Optimize or Archive]
```

**Multi-Sheet Reports:**

```
[List Sheets] → [Read Data from Each] → [Combine Data] → [Generate Summary Report]
```

**Sheet Management:**

```
[List Sheets] → [Find Hidden Sheets] → [Unhide or Delete] → [Reorganize Workbook]
```

***

## Use Cases

### Sheet Discovery

**Find specific sheets by pattern:**

```
- List all sheets
- Filter names containing "2024"
- Process only current year data
```

### Workbook Validation

**Ensure required sheets exist:**

```
- List all sheets
- Check for "Data", "Summary", "Archive" sheets
- Create missing sheets if needed
```

### Dynamic Processing

**Process all data sheets:**

```
- List sheets
- Skip sheets named "Template" or "Config"
- Read data from remaining sheets
- Combine into master dataset
```

### Organization Audit

**Analyze workbook structure:**

```
- List sheets
- Count hidden vs visible sheets
- Identify sheets with custom colors
- Generate workbook organization report
```

***

## Tips

**Sheet Identification:**

* **Use sheet\_id** for programmatic operations (more reliable)
* **Use sheet\_name** for user-friendly workflows
* **Check is\_hidden** to skip hidden sheets in processing
* **Use index** to understand sheet order

**Workflow Integration:**

* **Always list sheets first** in multi-sheet workflows
* **Cache sheet list** if processing multiple operations on same workbook
* **Filter sheets** based on naming patterns or properties
* **Handle empty workbooks** gracefully (check total\_sheets > 0)

**Performance:**

* **Quick operation** - lists metadata only, doesn't read sheet content
* **Use before expensive operations** to validate targets
* **Combine with conditional logic** to process only relevant sheets
