Extensions/ComfyUI-XAV-Google-Sheets
ComfyUI Extension

ComfyUI-XAV-Google-Sheets

Convenient and fast nodes for loading and retrieving values ​​from Google Sheets.

By XAV-Games·Created 4 months ago·Updated 4 months ago· 2
XAV-Games/ComfyUI-XAV-Google-Sheets
Nodes2
On cloudLocal install
CategoryXAV/google
Stars2
Updated4 months ago
Readme

ComfyUI XAV Google Sheets

Two simple nodes that load a public Google Sheet and let you pick text from any cell by row and column index.

Features

  • XAV Google Sheets Loader – downloads a sheet from a public Google spreadsheet and outputs it as a matrix of text rows (list of lists).
  • XAV Google Sheets Cell Selector – retrieves the text value from that matrix at the given row and col (0‑based indices).

Installation

  1. Navigate to the custom_nodes folder of your ComfyUI installation.

  2. Clone this repository or create a new folder manually:

    cd ComfyUI/custom_nodes git clone https://github.com/XAV-Games/ComfyUI-XAV-Google-Sheets.git

    Alternatively, just copy the files __init__.py and nodes.py into a new folder, e.g. comfyui_google_sheets.

  3. Restart ComfyUI.

How to Use

1. Prepare your Google Sheet

  • Open your spreadsheet in Google Sheets.
  • Click Share and set the access to “Anyone with the link” as a Viewer.
  • Copy the full URL from your browser’s address bar.

2. Add the “XAV Google Sheets Loader” node

  • In the ComfyUI interface, find the node under the category XAV/google or by searching XAV Google Sheets Loader.
  • Paste the spreadsheet URL into the url field.
  • (Optional) Enter a sheet_gid value.
    The default "0" represents the first sheet. To load a different sheet:
    • Click on the desired sheet tab.
    • Look at the URL – it contains gid=XXXXXXXXX. Copy the number after gid= and paste it into the sheet_gid field.
  • Queue a prompt – the node will download the sheet as CSV and output a matrix (you can inspect it in the console/logs).

3. Extract a cell value

  • Connect the table output of the loader to the table input of the Google Sheets Cell Selector node.
  • Set the integer values for row and col.
    Indexing starts at 0:
    The first row of data is row 0, the first column is col 0.
  • The node returns the text string from that cell. If the indices are out of range, it returns an empty string.

Example Workflow

[XAV Google Sheets Loader] --table--> [XAV Google Sheets Cell Selector] --text--> [Show Text]

Use the standard Show Text node to display the selected value.

<p align="center"> <img src="img/workflow.png" alt="Node view" width="100%"/> </p>

Data Type

A custom type TABLE is used internally to pass the matrix between these two nodes. It is not directly compatible with other nodes; if you need further processing, you can use a Python script node to manipulate the list.

Limitations

  • Only public spreadsheets (Anyone with the link) are supported.
    For private sheets, Google API authorization would be required (can be added upon request).
  • Indices are always zero‑based.
  • Downloading is synchronous – very large sheets may cause a slight delay in the workflow.

License

MIT