10 Caption Pack Generator
Turn a generation into a ready-to-post caption — ZMongo 10 Caption Pack Generator
- text_agent_config
- caption_text
- json
- ledger_document_id
- success
10 Caption Pack Generator is the publishing node in ZMongo's text-agent layer: it takes the prompt (and optionally a context pack) behind an image or video you generated, asks Gemini to write the whole social post - title options, short caption, description, hashtags, alt text, plus an internal note - and returns it as one caption_text string. It's the "I made the thing, now help me post the thing" node.
If you batch-generate content, captions are the tedious tax on top of the actual work. This node is ZMongo's attempt to make that step one node instead of twenty minutes of copywriting. It's opinionated about platform and tone so you can tune it to YouTube Shorts vs. Instagram vs. whatever, and it defaults to a refreshingly non-clickbait tone.
How it works
It needs a text_agent_config from 07 Text Agent Session (which bundles your session, model, project, and collection names). Give it a source_prompt - the prompt you generated with - and it:
- Builds a prompt asking Gemini for a structured caption pack: title options, short caption, description, hashtags/tags, alt text, and a one-line internal note about what memory should be saved.
- Optionally injects a
context_pack(from10 Build Context Pack) so the captions stay consistent with your project history. - Folds in the
platform(default "YouTube Shorts") andtone(default "clear, energetic, non-clickbait") as instructions. - If
save_to_ledgeris on (default true), saves the whole pack to the ledger collection and returns its ID.
Outputs: caption_text (the finished text), json (the payload), ledger_document_id (if saved), and success.
The inputs that matter
text_agent_config- required; wire from07 Text Agent Session.source_prompt- required; the prompt you generated with.context_pack- optional; paste a context pack to keep tone/consistency.platform,tone- the two levers that shape the output.save_to_ledger- keep on if you want a searchable history of what you posted and why.
Install
Standard:
cd ComfyUI/custom_nodes
git clone https://github.com/CentralFloridaAttorney/ComfyUI-ZMongo
cd ComfyUI-ZMongo
pip install -r requirements.txt
or ComfyUI Manager → "ComfyUI-ZMongo" → restart. It needs a Gemini-capable session, so configure your API key and make sure google-genai installed with the pack.
Troubleshooting
success: falseand emptycaption_text- Gemini failed. Check the session/key and the model in07 Text Agent Session;jsoncarries the error.- Captions feel generic - feed it a
context_packor a richersource_prompt. Garbage in, generic out; the node can only editorialize what you give it. - Hashtags/platform don't match - you're on a different platform than the default. Set
platformexplicitly. ledger_document_idempty - eithersave_to_ledgeris off or the ledger write failed; checkjson.
Caption Pack Generator is the pay-off node in the text-agent stack - the one that converts a finished generation into something you can actually post. It won't write your personality, but it'll clear the blank-page tax.
Inputs (7)
| Name | Type | Default | Description |
|---|---|---|---|
| text_agent_config | ZMONGO_TEXT_AGENT_CONFIG | — | |
| source_prompt | STRING | — | |
| context_packopt | STRING | — | |
| platformopt | STRING | YouTube Shorts | — |
| toneopt | STRING | clear, energetic, non-clickbait | — |
| save_to_ledgeropt | BOOLEAN | true | — |
| refresh_tokenopt | STRING | — |
Outputs (4)
| Name | Type | Description |
|---|---|---|
| caption_text | STRING | — |
| json | STRING | — |
| ledger_document_id | STRING | — |
| success | BOOLEAN | — |