ComfyUI-XAV-Google-Sheets
Convenient and fast nodes for loading and retrieving values from Google Sheets.
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
rowandcol(0‑based indices).
Installation
-
Navigate to the
custom_nodesfolder of your ComfyUI installation. -
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__.pyandnodes.pyinto a new folder, e.g.comfyui_google_sheets. -
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/googleor by searchingXAV Google Sheets Loader. - Paste the spreadsheet URL into the
urlfield. - (Optional) Enter a
sheet_gidvalue.
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 aftergid=and paste it into thesheet_gidfield.
- 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
tableoutput of the loader to thetableinput of the Google Sheets Cell Selector node. - Set the integer values for
rowandcol.
Indexing starts at 0:
The first row of data is row0, the first column is col0. - 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.
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