Nodes/WorkflowX Configurator/JsonX - Prompt Template Importer
ComfyUI Node

JsonX - Prompt Template Importer

Turn a finished prompt into a reusable template

By haroonaslam·Created 4 months ago·Updated 7 days ago· 10
JsonX - Prompt Template Importer
    • template_payload_json
    template_name
    source_prompt_json{}
    import_reportPaste final prompt JSON and use Open JsonX Template Importer UI for convert/preview/save.

    Reverse-engineering a good prompt into something reusable is the chore nobody enjoys. JsonX - Prompt Template Importer is the node that does it for you: paste in a finished prompt JSON and it converts it into a JsonX template - the structured, editable form the Visual Builder and Template Randomizer work with. It's the bridge from "this one prompt worked" to "this is now a template I can vary."

    Think of it as the inverse of the builder. The Visual Builder turns a tree into JSON; the importer turns JSON into a tree. That round-trip is what makes the JsonX system a workflow rather than a dead-end: build → export → reuse → vary.

    How it works

    The node takes source_prompt_json (your finished prompt JSON) and runs it through a converter that walks the structure and rebuilds it as the JsonX template payload - a tree of fields, groups, and arrays. The template_name and import_report inputs are part of the contract but the heavy lifting is done by the converter on the source JSON.

    The result comes back as template_payload_json with two possible shapes. On success, the template structure. On failure, an error payload with a report and warnings describing what couldn't be converted - the node refuses to silently drop fields you care about. The importer's own default text hints at the workflow: "Paste final prompt JSON and use Open JsonX Template Importer UI for convert/preview/save." The frontend importer UI is where you preview the converted tree and save it into your template library.

    This matters because of how JsonX templates are stored: saved locally as files in the pack's directory, so a converted template is something you can load in the Template Randomizer later and vary field-by-field.

    Inputs and outputs

    • template_name (STRING, optional) - intended name for the template.
    • source_prompt_json (STRING) - the finished prompt JSON to convert.
    • import_report (STRING) - informational; the UI populates it.
    • Output: template_payload_json (STRING) - the converted template, or an error payload with report/warnings.

    Install

    Ships in WorkflowX-Configurator. ComfyUI Manager → search WorkflowX Configurator, or:

    cd ComfyUI/custom_nodes
    git clone https://github.com/haroonaslam/WorkflowX-Configurator
    

    Restart and hard-refresh the browser - the importer UI is a frontend extension.

    Common issues

    • Error payload with a report. The converter hit something it couldn't map - nested structures, odd types, empty fields. Read the warnings; usually the fix is cleaning the source JSON before converting.
    • Converted template is missing fields. The importer reports accepted vs. skipped rather than quietly dropping them - check the warnings, and prefer well-formed prompt JSON.
    • The converted template won't load in the randomizer. Make sure you actually saved it through the importer UI into the template library; converting without saving produces a one-shot payload, not a stored template.

    Where it fits: the JsonX toolchain is LLM-to-JsonX → Visual Builder → Template Importer → Template Randomizer, and the importer is the step that turns one-off successes into reusable assets. It's a younger, less battle-tested piece of a young pack, so budget a little patience with malformed inputs - but the convert-preview-save loop is exactly what a prompt-library habit needs.

    CategoryWorkflowX/Prompting/JsonX

    Inputs (3)

    NameTypeDefaultDescription
    template_nameoptSTRING
    source_prompt_jsonoptSTRING{}
    import_reportoptSTRINGPaste final prompt JSON and use Open JsonX Template Importer UI for convert/preview/save.

    Outputs (1)

    NameTypeDescription
    template_payload_jsonSTRING