JSON Template
Transform JSON data into text using templates with variables, conditionals, and fallbacks.
The JSON Template node generates text from a JSON data source and a template string.
Use ${json.path} to insert values, {% if json.path %}...{% endif %} for conditionals, and {% for item in json.array %}...{% endfor %} for loops. Fallbacks are supported via ${json.path:fallback}.
Useful for formatting dynamic content, building prompts, or generating structured text from JSON inputs.
JSON Template
Input JSON*Text
Template*Text (multiline)
Inputs
Each input can be typed in directly or connected to another node's output.
| Input | Type | Required | Description |
|---|---|---|---|
| Input JSON | Text | Required | JSON object to use as data source |
| Template | Text (multiline) | Required | Template with ${json.path} placeholders, conditionals, loops, and fallbacks |
Output
Type: Text (text)