π Google Sheets Fetcher
Grab CSV text straight from a published Google Sheet
- csv_text
One input, one output, zero ceremony: give the Google Sheets Fetcher a published-sheet URL and it returns the raw CSV text. It's the most unglamorous node in the sifatrads/comfyui-bulk-prompt pack, and it's genuinely useful for two kinds of people - people who keep their prompt lists in a spreadsheet they edit from anywhere, and people debugging why their Sheets-backed batch isn't parsing.
What it does and why you'd use it
The Bulk Prompt Loader already has a "Google Sheets URL" source built in, so at first glance this node looks redundant. It isn't - it's the loader's raw ingredient, exposed separately. The fetcher does only the network part: it GETs the URL and hands you the plain CSV text on the csv_text output. You'd reach for it when you want to:
- See what the sheet actually returns. If your batch is failing to parse, connect the fetcher to a text preview node and look at the raw CSV. Nine times out of ten the sheet has an extra column, a header row you forgot, or a URL that isn't actually the CSV export.
- Separate fetching from parsing. Grab the data once, feed it into your own parsing or processing, and keep the loader for the loop mechanics.
- Chain it into something the loader's built-in parse can't handle. The raw text is just a string, so any CSV/text node in your graph can consume it.
Mechanically it's a stdlib urllib GET - no API key, no Google auth, no google-api-python-client blob to install. That's also its ceiling: because there's no authentication, it only works on sheets that are published to the web as CSV. Private sheets, or anything behind a Google login, return a fetch error. It shares the pack's always-rerun habit (IS_CHANGED returns NaN) so it re-fetches on every execution - which means your sheet edits show up on the next queue without restarting anything.
The one input and the one gotcha
The only input is url, defaulting to the .../pub?output=csv shape. That default is the whole trick: the URL you want is not the docs.google.com/spreadsheets/d/.../edit link you're used to sharing. To get the right one:
- In the sheet: File β Share β Publish to web.
- Choose Comma-separated values (.csv) as the format.
- Click Publish and copy the generated URL - it ends in
pub?output=csv.
The published-CSV URL is a public, unauthenticated endpoint, which is exactly what a keyless node can read. Getting this wrong is the #1 failure mode: people paste the edit URL, get a fetch error, and blame the node.
Installing it
Same as the rest of the pack - no extra dependencies, nothing to pip install:
cd ComfyUI/custom_nodes
git clone https://github.com/sifatrads/comfyui-bulk-prompt.git
Restart ComfyUI and it appears under BulkPrompt. ComfyUI Manager also finds the pack if you search "bulk prompt".
Where people get burned
- "Fetch failed" / RuntimeError - almost always the URL. Confirm it's the
pub?output=csvexport, not the edit link, and that the sheet is actually published (not just "anyone with the link can view" - publishing is a separate step). - Data changed but the node returns the old text - the fetch is cached by the browser tab in practice if you don't re-run; re-queueing (or re-executing the node) forces a fresh GET because of the always-rerun marker.
- Only the first column comes through - that's not the fetcher, that's whatever you're parsing the CSV with. The fetcher is deliberately dumb: raw text out, no parsing opinion.
The pattern this enables - a prompt list you can edit from your phone, then batch-generate from - is a real one people ask for constantly, and this is the least-machinery version of it. It's a fetch-only node, so manage expectations: it won't auth, it won't sync, it won't parse. It grabs text and gets out of the way.
Inputs (1)
| Name | Type | Default | Description |
|---|---|---|---|
| url | STRING | https://docs.google.com/spreadsheets/d/.../pub?output=csv | β |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| csv_text | STRING | β |