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

# Google Sheets

> Spreadsheet operations using Google Sheets API

## Overview

Enables spreadsheet data operations and automation using the Google Sheets API.

## Key Features

* `GOOGLE_SHEETS_EDIT_SHEET`
  * Edit a Google Sheet by providing the spreadsheet ID, range, and values.
* `GET_SHEET`
  * Retrieve data from a Google Sheet by specifying the spreadsheet ID and range.

## Authentication

For further details, [click here](/en/pages/credentials/google-oauth).

To use the Google Sheets API, you need navigate to the [Jinba secrets dashboard](https://flow.jinba.io/workspace/secrets) and authenticate with your Google account. This will create a new OAuth token for you.

**Note**: Treat API keys as sensitive information and never commit them to public repositories.

### Example: Edit and Get Sheet Data

```yaml theme={null}
- id: edit_sheet
  tool: GOOGLE_SHEETS_EDIT_SHEET
  config:
    - name: token
      value: "{{secrets.GOOGLE_SHEETS_OAUTH_TOKEN}}"
  input:
    - name: spreadsheet_id
      value: "0123456789"
    - name: range
      value: Sheet1!A1:D5
    - name: values
      value: '[["A1", "B1"], ["A2", "B2"]]'
- id: get_sheet
  tool: GET_SHEET
  config:
    - name: token
      value: "{{secrets.GOOGLE_SHEETS_OAUTH_TOKEN}}"
  input:
    - name: spreadsheet_id
      value: "0123456789"
    - name: range
      value: Sheet1!A1:D5
```
