Search Pinterest from inside a ComfyUI node, browse your own Boards with a
Pinterest API token, click a thumbnail, and load that pin's full-resolution
image as an IMAGE output. Infinite-scroll grid, single selection, selection
is saved into the workflow.
cd ComfyUI/custom_nodes
git clone https://github.com/Boy-II/pinterest_galleryThen install the one runtime dependency into the same Python ComfyUI runs on:
python -m pip install -r pinterest_gallery/requirements.txt # just: requestsFor the ComfyUI-aki portable build on Windows the embedded interpreter is
E:\ComfyUI-aki-v2\python\python.exe (some builds name it python_embeded):
"E:\ComfyUI-aki-v2\python\python.exe" -m pip install requestsRestart ComfyUI. The node appears as Pinterest Gallery Loader under
image/pinterest.
Search mode works without a token. To enable My Boards, create a Pinterest App and generate a sandbox or production access token with read access to Boards and standard Pins. Set the token only in the environment of the Python process that launches ComfyUI:
PowerShell:
$env:PINTEREST_ACCESS_TOKEN = "your-token"
$env:PINTEREST_API_ENV = "sandbox" # use "production" for a production token
python main.pyDo not put the token in a workflow, source file, fixture, log, or browser request. The node sends it only from the Python backend to Pinterest's API.
The first version reads Boards and Pins only. It does not create, edit, delete, or publish Pinterest content, and it does not support Secret Boards.
Sandbox tokens must use the Sandbox API environment. Production tokens must use
the production API environment; set PINTEREST_API_ENV accordingly.
PINTEREST_API_ENV only accepts sandbox or production. If it's unset,
misspelled, or any other value, My Boards returns a clear error but
Search still works — a bad value never takes down the whole node.
cd ComfyUI/custom_nodes/pinterest_gallery && git pull- Add Pinterest Gallery Loader.
- Type a query — thumbnails load in a 3-column grid.
- Scroll the grid — more results load automatically.
- Click a thumbnail — green border marks the selection.
- Wire the
IMAGEoutput onward and queue the prompt; the full original-size image is downloaded at run time. - To browse your account, switch the mode selector to My Boards, choose a Board, and scroll the grid to load more Pins.
Running with nothing selected raises a clear node error.
python -m venv .venv && .venv/bin/pip install -r requirements-dev.txt
.venv/bin/python -m pytest -qscripts/manual_search_check.py "<query>" hits the live Pinterest endpoint to
sanity-check the request/parse path outside ComfyUI.