Google Photos Album Lister π
Dump every album out of your Google account
- album_list
Every album workflow in the Google Photos Loader pack starts here. The Album Lister asks Google for your full album list, and it's the node that makes the Album Selector's dropdown possible - because while the Selector looks like it should just know your albums, the thing that actually fetches them is this node.
How it works
The Lister authenticates with your saved Google token and calls the Photos Library API's /v1/albums endpoint, paging through 50 albums at a time until it's pulled everything. Then it does two things:
- Writes
albums_list.jsoninto the pack's folder - the file the Album Selector reads to build its dropdown. This is the real output of the node, even though it's invisible on the canvas. - Emits a human-readable STRING (
album_list) with one line per album:[ 0001 | album_id | count: 123 | "Trip to Lisbon" ].
That string is handy for eyeballing what you have, and you can pipe it anywhere a string goes - but the JSON side is what the rest of the album chain depends on.
The inputs
client_secrets_file(STRING) - path to your OAuth credentials; defaults toclient_secrets.jsonin the pack's own folder. Correct as-is unless you keep credentials elsewhere.print_log(BOOLEAN, defaultfalse) - mirrors the listing (and the node's logging) to the ComfyUI console. Useful when things go quiet.
No other inputs. Run it, read the list, done.
A few honest notes on scope
- Only real albums. Photos that live in your library without being in an album don't show up here - that's the Images Loader's job.
mediaItemsCountis Google's count, so it's only as current as Google's index of that album.- The JSON gets overwritten every run. Add albums, re-run the Lister, and the Selector's options refresh (which is also why a stale dropdown is usually a "you haven't re-run the Lister" problem).
- It's read-only, like everything in this pack - it lists, never modifies.
How to install it
cd ComfyUI/custom_nodes
git clone https://github.com/lazniak/comfyui-google-photos-loader.git
pip install -r requirements.txt
# restart ComfyUI
Or ComfyUI Manager β "Google Photos Loader" (by PabloGFX) β Install β restart. No model downloads. First run will trigger the OAuth browser flow if you haven't logged in yet - you need the Google Cloud setup (Library API enabled, an OAuth desktop client saved as client_secrets.json in the pack folder) done beforehand; the Login/Logout article has the full walkthrough.
Troubleshooting
- Empty or no list β almost always auth. Check
client_secrets.jsonexists with the "s" in the name, in the right folder, and reset the token with the Login/Logout node if it's stale. - Selector dropdown is empty or stale β you haven't run the Lister yet, or you added albums since the last run. Re-run it.
- Only some albums appear β that's the API's album definition; shared-with-you or "auto" content isn't listed. Filter by categories with the Images Loader instead if that's what you're after.
Inputs (2)
| Name | Type | Default | Description |
|---|---|---|---|
| client_secrets_file | STRING | /tmp/ComfyUI/custom_nodes/comfyui-google-photos-loader/client_secrets.json | β |
| print_log | BOOLEAN | false | β |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| album_list | STRING | β |