# Google Sheets

The **Google Sheets Node** allows you to interact with and modify a Google Sheet, or to set a trigger when a Sheet is updated with new data.

***

### Configure a Sheets Tool

Right click to add a node, select **Google Sheets**, then choose your tool, whether it's a trigger for your workflow (e.g. **On Sheet Update**), an information extractor (e.g. **Get Spreadsheet Details**), or an action for your Sheet (e.g. **Write to Sheet**).

<figure><img src="https://3697023207-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FFSlso1Kjob5CLDrh0dVn%2Fuploads%2F7A1TKAeIschXt99Hs6Yz%2Fcreate_gsheet.gif?alt=media&#x26;token=2b64bd85-9cb9-4f3b-b889-a4a353dff348" alt=""><figcaption></figcaption></figure>

Here is the list of tools that you can select.

<table><thead><tr><th width="138.375">Tool Name</th><th width="82.953125">Type</th><th>Description</th></tr></thead><tbody><tr><td><strong>On Sheet Update</strong></td><td>Trigger</td><td>Trigger a workflow when any changes occur on your Sheet.</td></tr><tr><td><strong>Create Column Headers</strong></td><td>Action</td><td>Write specific column headers in the first row of your Sheet.</td></tr><tr><td><strong>List Column Headers</strong></td><td>Extract</td><td>Get the column headers from the first row of your Sheet</td></tr><tr><td><strong>Create Sheet</strong></td><td>Action</td><td>Create a new worksheet (tab) in your existing Google Sheet</td></tr><tr><td><strong>Create Spreadsheet</strong></td><td>Action</td><td>Create a new Google Sheet with a specific title</td></tr><tr><td><strong>Get Spreadsheet Details</strong></td><td>Extract</td><td>Get information (e.g. dimension) and metadata about your Google Sheet</td></tr><tr><td><strong>Delete Row</strong></td><td>Action</td><td>Delete a specific row from the Sheet using its row number</td></tr><tr><td><strong>Get Row by Index</strong></td><td>Extract</td><td>Get a specific row from the Sheet using its row number</td></tr><tr><td><strong>List Worksheets</strong></td><td>Extract</td><td>Get a detailed list of all worksheets (tabs) in your Google Sheet </td></tr><tr><td><strong>Read from Sheet</strong></td><td>Action</td><td>Read data from your sheet by specific range</td></tr><tr><td><strong>Update Cell</strong></td><td>Action</td><td>Update a specific cell value in your Sheet by cell address (e.g. C1)</td></tr><tr><td><strong>Update Sheet</strong></td><td>Action</td><td>Update data in your Sheet by specific range or criteria</td></tr><tr><td><strong>Write to Sheet</strong></td><td>Action</td><td>Write data to your Sheet</td></tr></tbody></table>

***

### Create a Connection to Google Sheets

Click the node to open its settings, then select **Connect Google Sheets.**

On the dropdown menu under Select a Connection, click **New connection**, where you will be taken to a page to link your Google workspace to StackAI.

<figure><img src="https://3697023207-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FFSlso1Kjob5CLDrh0dVn%2Fuploads%2FBGk6uJ6SgE9HuUnE1GUl%2Fgsheets.gif?alt=media&#x26;token=9b36a22f-5af3-49e4-a434-2a42ac95481b" alt=""><figcaption></figcaption></figure>

Once you're connected to your Google workspace, you can select any Sheet you'd like to modify using the StackAI workflow.

### Featured Tools

***

#### **Write to Sheet**

**Description:**\
Appends data to a specified Google Sheet.

**Input Fields**

* **Data Format**
  * Select whether you're inputting data manually or using a CSV file URL link.
* **Data**
  * If you selected manual entry, select the data that you're writing to the Sheet (must be **JSON object** with column names as keys).
  * If your data comes from an AI Agent node, make sure the prompt for the AI agent asks it to format the output as a JSON object for writing to your Sheet, as seen below:

<figure><img src="https://3697023207-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FFSlso1Kjob5CLDrh0dVn%2Fuploads%2F6MUVqnWNhWB1t6lMQAMa%2FScreenshot%202025-12-04%20at%203.05.11%E2%80%AFPM.png?alt=media&#x26;token=8ac42afe-a636-4565-a80f-3951ccc2f752" alt=""><figcaption></figcaption></figure>

Here is a demo for selecting an AI Agent node's output as your data within the Google Sheets node.

<figure><img src="https://3697023207-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FFSlso1Kjob5CLDrh0dVn%2Fuploads%2FIRegLvyzArLgHYdSox6O%2Fsheets_input.gif?alt=media&#x26;token=935d1a58-6c52-4184-be97-6c4fd9738890" alt=""><figcaption></figcaption></figure>

* **CSV URL**
  * If you selected CSV file upload, add the file URL to parse.
* **Starting Cell**
  * Select the cell number in your Sheet that you'd like to write your first datapoint to (e.g. A1).

**Configurations Fields**

* **Spreadsheet (required)**
  * Select your Google Sheet.
* **Sheet (required)**
  * Select the tab of your Google Sheet to write to.

***

**Best Practices**

* Always use structured JSON for the data input for best results.
* Ensure you have the correct permissions to access and write to the selected Google Sheet.
* Use clear sheet and spreadsheet names to avoid confusion in multi-sheet documents.

***

**Automate your data workflows with the GSheets node in StackAI for seamless Google Sheets integration.**
