ComfyUI Node

POML Template

Five starter POML prompts so you can skip learning the syntax cold

By MushroomFleet·Created about a year ago·Updated about a year ago· 1
POML Template
    • poml_template
    template_nameAnalysis
    template_variables{"analysis_type": "business intelligence", "data_type": "quarterly reports"}

    The ZenkaiPOMLTemplate node is the training wheels for its sibling, the POML Processor. Instead of typing POML markup by hand, you pick one of five pre-built templates - Analysis, Creative Writing, Technical Documentation, Customer Support, or Data Analysis - and it hands you a ready-made POML string you can drop straight into a workflow.

    One important thing to get straight early: this node's output is POML markup, not a finished prompt. It's an intermediate step. The typical graph is POML Template → POML Processor → LLM node, so the template becomes the poml_template input of the Processor, which does the actual rendering. Don't wire the output straight into OpenRouter and wonder why nothing happens.

    How it works

    Under the hood it's a dictionary lookup. Each template name maps to a POML string with {{ variable }} placeholders baked in, and the node substitutes whatever you give it in template_variables. That's the whole mechanism - no parsing, no rendering, no network. It shares the same substitution logic as the Processor, so the two nodes behave consistently.

    Inputs and outputs

    • template_name - the only input you'll touch most of the time. Pick from the five built-ins.
    • template_variables - a JSON object with the variables that specific template expects. This is where people trip.

    Output is a single poml_template string. If you want to see what a template actually contains before wiring it up, let it run into a text display node or the Processor's debug render mode.

    The variable trap

    Here's the gotcha, and it's real because I read the source: the default template_variables value is the Analysis variable set (analysis_type, data_type). Switch to Creative Writing without changing it and the output keeps literal {{ genre }}, {{ theme }} placeholders - the substitution only replaces keys that exist, and unknown placeholders pass through untouched. So before you judge a template as broken, check that your variables match it. Each template wants its own set:

    • Analysis: analysis_type, data_type
    • Creative Writing: genre, content_type, theme, tone, length, style, audience
    • Technical Documentation: domain, subject
    • Customer Support: company, issue_type
    • Data Analysis: field, analysis_focus, dataset_name, table_data

    Two more things worth knowing. First, missing variables aren't an error - you just get placeholders in your output, so skim the rendered prompt before you send it to a model. Second, the Data Analysis template embeds a <table> tag with a {{ table_data }} placeholder, which means you're expected to supply the actual table content yourself; feed it nothing and you get an empty table section.

    When you'd actually reach for it

    Honestly? Mostly as a learning aid and a consistency tool. If you're new to POML, starting from a working template beats staring at a blank multiline widget. And if you're building a bunch of workflows that should all prompt in the same house style - same role framing, same output format - this forces the consistency in a way copy-pasting never does. For A/B testing prompt structures, swapping template names and re-rendering is a lot faster than hand-editing.

    Install

    Same pack as the POML Processor, same install. ComfyUI Manager (search "Zenkai-POML" or DJZ-POML), or:

    cd ComfyUI/custom_nodes
    git clone https://github.com/MushroomFleet/ComfyUI-DJZ-POML
    cd ComfyUI-DJZ-POML
    pip install -r requirements.txt
    

    Then restart ComfyUI and look under the Zenkai/POML category. No model downloads. The node itself only needs the poml SDK to be useful, but the Processor downstream will want the full requirements for tables, PDFs, and images.

    It's a thin node - a library picker, really - so expectations should match. It won't fix your prompts, but it gives you a clean place to start and a consistent baseline. This whole pack is young and largely unproven in the wild, so treat the templates as suggestions to customize rather than gospel.

    CategoryZenkai/POML

    Inputs (2)

    NameTypeDefaultDescription
    template_nameCOMBOAnalysis5 options: Analysis, Creative Writing, Technical Documentation, Customer Support, Data Analysis
    template_variablesoptSTRING{"analysis_type": "business intelligence", "data_type": "quarterly reports"}JSON with template-specific variables

    Outputs (1)

    NameTypeDescription
    poml_templateSTRING