Get Prompt Template
Hydrates a managed prompt template with dynamic variables.
Loads a managed prompt template from the backend, replaces its {{ key }} placeholders with variables, and returns the prompt plus the provider and model of the template. It does not call any LLM.
Instead of hardcoding prompts in your workflow, use this operator to fetch versioned, managed templates from the Prompt Registry and fill them with workflow data.
Benefits:
- Separation of Concerns: Prompts can be tuned by Prompt Engineers without changing code.
- Version Control: Use specific versions of a prompt.
- Reusability: Share standard system prompts across workflows.
How it works
- Resolves the node config: expressions in config keys are evaluated against the run; the incoming item is used as-is.
- Merges the incoming item with the resolved config and requires
template_id. - Fetches the template record from the backend prompt registry and takes its body from
template_body,contentortemplate, in that order. - Replaces every
{{ key }}(spaces optional) with the value ofvariables.key. Placeholders without a variable stay as they are. - If the template has an
llm_provider_id, reads that provider record to fillconfig.provider(its slug) andconfig.model(deployment name or default model); a failure here only logs and leaves themnull. - Returns
{ prompt, config }without a port, so the engine routes it toout.
In a workflow
The node as it appears in a workflow file (draft_nodes[]), and the envelope of a successful run.
{
"node_id": "node-load-prompt",
"label": "Load complaint prompt",
"operator_slug": "ai.prompt",
"operator_version": "1.0.0",
"config": {
"template_id": "<prompt_template_id>",
"version": "latest"
}
}{
"ok": true,
"port": "out",
"data": {
"prompt": "Summarize the complaint from Ana Ruiz in two sentences.",
"config": {
"provider": "azure-openai",
"model": "gpt-4o-mini",
"language": "en",
"format": "text"
}
}
}Configuration
-
template_idstring Required -
ID of the managed prompt template.
-
versionstring Optional -
Specific version tag or "latest".
Its configuration shows the shared execution settings, but this node does not apply retries (retryOnFail, maxTries) yet. continueOnFail is not applied by any node.
Behaviour in the code
What the implementation does with these keys beyond what the schema says.
-
version - Declared but ignored: the current record of the template is always used.
-
variables - Read from the incoming item; a
variableskey in the config (undeclared, may be an expression) overrides it. Values are inserted as strings, so objects become[object Object]. Keys are used inside a regular expression without escaping, so use plain names (letters, digits,_).
Output ports
success default Never fires. On success the worker returns no port, the engine uses out, and out is not declared by this node: edges drawn from success do not run, so the workflow stops here.
{
"prompt": "Summarize the complaint from Ana Ruiz in two sentences.",
"config": {
"provider": "azure-openai",
"model": "gpt-4o-mini",
"language": "en",
"format": "text"
}
}error Validation or a backend call failed. data is { error }, plus response with the backend body when the HTTP call failed.
{
"error": "Prompt Template <template_id> not found"
}In expressions
What a later node can read from this node's output with $("Get Prompt Template").item.json.<path> (write your node's label instead of Get Prompt Template). Editor marks the paths the workflow editor suggests under Previous Nodes (the output contract); Worker marks the paths the worker really returns through success, from the output shown in Ports.
| Expression | Editor | Worker |
|---|---|---|
$("Get Prompt Template").item.json.promptThe fully hydrated prompt string. | ||
$("Get Prompt Template").item.json.configModel configuration associated with the prompt. | ||
$("Get Prompt Template").item.json.config.provider | — | |
$("Get Prompt Template").item.json.config.model | — | |
$("Get Prompt Template").item.json.config.language | — | |
$("Get Prompt Template").item.json.config.format | — |
— Worker: The worker returns it but the editor does not suggest it: write it by hand. Keys inside objects can depend on your data or configuration (for example one key per label).
Errors
| Message | Port | Cause and fix |
|---|---|---|
Missing 'template_id' | error | template_id is empty. |
Prompt Template <template_id> not found | error | The registry has no template with that id. |
Template <template_id> has no content | error | The template record has no body. |
Request failed with status code <status> | error | The backend answered the template lookup with a non-2xx status. |
Input contract
-
variablesobject Required -
Key-value pairs to inject into the template placeholders.
Output contract
-
promptstring Optional -
The fully hydrated prompt string.
-
configobject Optional -
Model configuration associated with the prompt.
Contracts (JSON Schema)
The definition exactly as the orchestrator declares it. All is the whole *.definition.js; compare it with the sections above to spot differences between the documentation and the schema. Use it to validate a node before you publish.
{
"slug": "ai.prompt",
"name": "Get Prompt Template",
"category": "ai",
"version": "1.0.0",
"description": "Hydrates a managed prompt template with dynamic variables.\n\n Instead of hardcoding prompts in your workflow, use this operator to fetch versioned, managed templates from the Prompt Registry and fill them with workflow data.\n\n **Benefits:**\n - **Separation of Concerns:** Prompts can be tuned by Prompt Engineers without changing code.\n - **Version Control:** Use specific versions of a prompt.\n - **Reusability:** Share standard system prompts across workflows.",
"capabilities": [
"prompt-engineering",
"template",
"ai"
],
"config_schema": {
"type": "object",
"required": [
"template_id"
],
"properties": {
"template_id": {
"type": "string",
"title": "Template ID",
"description": "ID of the managed prompt template.",
"ui_widget": "prompt_picker"
},
"version": {
"type": "string",
"title": "Version",
"default": "latest",
"description": "Specific version tag or \"latest\"."
},
"execution": {
"type": "object",
"title": "Execution Settings",
"properties": {
"alwaysOutputData": {
"type": "boolean",
"title": "Always Output Data",
"description": "Always output data, even on error (if configured).",
"default": false
},
"retryOnFail": {
"type": "boolean",
"title": "Retry On Fail",
"description": "Retry the execution if it fails.",
"default": false
},
"maxTries": {
"type": "integer",
"title": "Max Retries",
"description": "Number of retries.",
"default": 3,
"displayOptions": {
"show": {
"retryOnFail": [
true
]
}
}
},
"waitBetweenTries": {
"type": "integer",
"title": "Wait Between Retries (ms)",
"default": 1000,
"displayOptions": {
"show": {
"retryOnFail": [
true
]
}
}
},
"continueOnFail": {
"type": "boolean",
"title": "Continue On Fail",
"description": "Do not crash workflow on error.",
"default": false
},
"timeout_ms": {
"type": "integer",
"title": "Timeout (ms)",
"description": "Max execution time for this node before it is killed, in milliseconds. Honored by long-running operators (e.g. OCR/extraction, inline code). Default 300000 (5 min).",
"default": 300000
}
}
}
}
},
"input_contract_schema": {
"type": "object",
"properties": {
"variables": {
"type": "object",
"description": "Key-value pairs to inject into the template placeholders."
}
},
"required": [
"variables"
]
},
"output_contract_schema": {
"type": "object",
"properties": {
"prompt": {
"type": "string",
"description": "The fully hydrated prompt string."
},
"config": {
"type": "object",
"description": "Model configuration associated with the prompt."
}
}
},
"ports": [
{
"port_id": "success",
"label": "Success",
"is_default": true
},
{
"port_id": "error",
"label": "Error"
}
],
"execution_mode": "sync",
"tags": [
"prompt",
"template",
"registry"
],
"is_stateful": false,
"publisher": {
"identity": "org_sommatic_ai",
"profile": {
"name": "Sommatic AI",
"verified": true,
"url": "https://me.veripass.com/sommatic",
"logo_url": null
}
}
}{
"type": "object",
"required": [
"template_id"
],
"properties": {
"template_id": {
"type": "string",
"title": "Template ID",
"description": "ID of the managed prompt template.",
"ui_widget": "prompt_picker"
},
"version": {
"type": "string",
"title": "Version",
"default": "latest",
"description": "Specific version tag or \"latest\"."
},
"execution": {
"type": "object",
"title": "Execution Settings",
"properties": {
"alwaysOutputData": {
"type": "boolean",
"title": "Always Output Data",
"description": "Always output data, even on error (if configured).",
"default": false
},
"retryOnFail": {
"type": "boolean",
"title": "Retry On Fail",
"description": "Retry the execution if it fails.",
"default": false
},
"maxTries": {
"type": "integer",
"title": "Max Retries",
"description": "Number of retries.",
"default": 3,
"displayOptions": {
"show": {
"retryOnFail": [
true
]
}
}
},
"waitBetweenTries": {
"type": "integer",
"title": "Wait Between Retries (ms)",
"default": 1000,
"displayOptions": {
"show": {
"retryOnFail": [
true
]
}
}
},
"continueOnFail": {
"type": "boolean",
"title": "Continue On Fail",
"description": "Do not crash workflow on error.",
"default": false
},
"timeout_ms": {
"type": "integer",
"title": "Timeout (ms)",
"description": "Max execution time for this node before it is killed, in milliseconds. Honored by long-running operators (e.g. OCR/extraction, inline code). Default 300000 (5 min).",
"default": 300000
}
}
}
}
}{
"type": "object",
"properties": {
"variables": {
"type": "object",
"description": "Key-value pairs to inject into the template placeholders."
}
},
"required": [
"variables"
]
}{
"type": "object",
"properties": {
"prompt": {
"type": "string",
"description": "The fully hydrated prompt string."
},
"config": {
"type": "object",
"description": "Model configuration associated with the prompt."
}
}
}[
{
"port_id": "success",
"label": "Success",
"is_default": true
},
{
"port_id": "error",
"label": "Error"
}
]Execution
- Execution
sync- Stateful
- No
- Retries (
retryOnFail) - No
- Capabilities
prompt-engineeringtemplateai- Tags
prompttemplateregistry
Notes and limits
- This node is partial: until the success port is fixed, do not connect nodes after it. Use the template body directly in an
ai.*node instead. - Backend requests have no timeout set.
- The engine does not apply
execution.retryOnFail,maxTries,waitBetweenTriesorcontinueOnFailto this node. Handle failures by wiring theerrorport.
Reviewed against the orchestrator code · 31e874b · 2026-11-26