Google Sheets

This guide walks you through how to create a new connection to Google Sheets and automate your reporting and data-writing.

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

Here is the list of tools that you can select.

Tool Name
Type
Description

On Sheet Update

Trigger

Trigger a workflow when any changes occur on your Sheet.

Create Column Headers

Action

Write specific column headers in the first row of your Sheet.

List Column Headers

Extract

Get the column headers from the first row of your Sheet

Create Sheet

Action

Create a new worksheet (tab) in your existing Google Sheet

Create Spreadsheet

Action

Create a new Google Sheet with a specific title

Get Spreadsheet Details

Extract

Get information (e.g. dimension) and metadata about your Google Sheet

Delete Row

Action

Delete a specific row from the Sheet using its row number

Get Row by Index

Extract

Get a specific row from the Sheet using its row number

List Worksheets

Extract

Get a detailed list of all worksheets (tabs) in your Google Sheet

Read from Sheet

Action

Read data from your sheet by specific range

Update Cell

Action

Update a specific cell value in your Sheet by cell address (e.g. C1)

Update Sheet

Action

Update data in your Sheet by specific range or criteria

Write to Sheet

Action

Write data to your Sheet


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.

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


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:

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

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

Last updated

Was this helpful?