Nodes/SF ComfyUI Nodes/SF Google Sheet Prompt Queue
ComfyUI Node

SF Google Sheet Prompt Queue

Keep 200 prompts in a Google Sheet, tick them off as ComfyUI works through them

By Stillfront·Created 3 months ago·Updated 3 days ago· 1
SF Google Sheet Prompt Queue
    • prompt
    ◄urlhttps://docs.google.com/spreadsheets/d/.../edit►
    ◄sheet_gid0►
    ◄prompt_colA►
    ◄status_colB►
    ◄skip_first_rowtrue►
    ◄max_rows10►

    The batch problem, solved in a spreadsheet

    Sooner or later you stop running one prompt at a time. Maybe it's 40 variations of a character, maybe it's a caption list for a LoRA set. ComfyUI's answer is usually a text file and a "load prompts from file" node, which works fine until you want to see where you got to - and then you're grepping a txt file to remember which line produced the image you liked.

    SF Google Sheet Prompt Queue moves that list into a sheet. Prompts in column A, an empty column B, and you mark a row off by typing done - or x, or anything - into column B as you review them. Next run skips those. Clear a cell and that row comes back. No state file, no checkpoint to corrupt, and the progress list is something you can edit from your phone between batches.

    How the dispatch works

    It is not using the Google Sheets API and it doesn't need a key or an OAuth dance. It converts your URL into a Google CSV export - .../gviz/tq?tqx=out:csv&gid=<gid> - fetches it with requests, and parses it. That's the entire mechanism, and it's why the sheet has to be shared as Anyone with the link → Viewer: you're reading a public URL, nothing more.

    Then it walks the rows: starting after row 1 (if skip_first_row is on), it stops dead at the first empty prompt cell, skips any row whose status cell has text in it, and collects up to max_rows pending prompts. Those go out as a single list output, which is the part to understand. The node declares its output as a list, so ComfyUI runs everything downstream of it once per prompt - no loop nodes, no scripting. One wire into a CLIP Text Encode and a Save Image, hit Run, come back to a folder of images.

    It also never caches (IS_CHANGED returns NaN, the standard idiom for "always rerun"), so the sheet is re-read fresh on every queue, and browser edits show up without a reload. There's a Refresh sheet button too - that hits a small server route and just reports how many prompts are pending and how many rows it found, without running the graph.

    The fields that matter

    url wants the full sheet URL, not the ID, and the sharing setting above. sheet_gid is the tab number from #gid= in the address bar as a string - 0 for the first tab - and if you're reading the wrong tab you'll get a confusing emptiness rather than an error. prompt_col and status_col take letters (A, B, and AA/AB work too); they have to differ, and mixing them up throws. skip_first_row defaults on, which is right if row 1 is a header - leave it on with a headerless sheet and you'll silently lose your first prompt. max_rows (default 10, up to 500) caps how many go out per run, so the workflow is naturally resumable: run it again and the next ten go.

    Output is a single prompt STRING, as a list.

    Install

    Same pack either way - ComfyUI Manager, search "SF ComfyUI Nodes", or:

    cd ComfyUI/custom_nodes
    git clone https://github.com/Stillfront/comfyui-sf-nodes.git
    cd comfyui-sf-nodes
    pip install -r requirements.txt
    

    Restart ComfyUI. No API key needed for this one, despite the pack's config.ini ceremony (that's for WaveSpeed). Note what you're actually pulling in: roughly sixty nodes' worth of dependencies, including google-genai and google-cloud-storage for the VertexAI half, and a hard numpy<2.0.0 pin. If pip wants to downgrade numpy on your install, that pin is why - check it isn't fighting another pack before you let it.

    Where it bites

    • HTTP error on fetch. The sharing setting is wrong. Share → Anyone with the link → Viewer.
    • "No prompts found." Wrong column letter, wrong GID, or skip_first_row eating your only row.
    • "Nothing left to run." Everything is marked. Clear the status cells you want re-queued.
    • Gaps stop the scan. The walk halts at the first empty prompt cell, so don't leave a blank row in the middle of a list expecting it to carry on below.
    • Only 10 came out. That's max_rows. Raise it or run again.
    • Your PNGs won't carry the resolved prompt. When a prompt comes from an external source, the workflow embedded in the image records this node and your sheet URL, not the sentence it read that run - a long-standing complaint about file-driven batching, and it applies here. Keep a Show Text node on the list output, or note the sheet for the run.
    • The node isn't in the menu. The pack loads each py/ file separately and prints [comfyui-stillfront] Failed to load <file> for any that fail, so the rest of the pack still works while one node vanishes. Usually a skipped pip install -r requirements.txt - check the console output.
    CategoryStillfront/Utils

    Inputs (6)

    NameTypeDefaultDescription
    urlSTRINGhttps://docs.google.com/spreadsheets/d/.../editFull Google Sheets URL. The sheet must be shared: Share → Anyone with the link → Viewer.
    sheet_gidSTRING0Sheet tab GID — the number after '#gid=' in the URL. Use 0 for the first tab.
    prompt_colSTRINGAColumn holding the prompts (e.g. A).
    status_colSTRINGBColumn you mark by hand when a prompt is finished. Any text at all (done, x, executed) means skip that row.
    skip_first_rowBOOLEANtrueIgnore row 1, which is usually a header.
    max_rowsINT101–500Most prompts to send in a single run.

    Outputs (1)

    NameTypeDescription
    promptSTRING—