Skip to main content

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)
Fields marked * are required. Dots are connection handles.

Inputs

Each input can be typed in directly or connected to another node's output.

InputTypeRequiredDescription
Input JSONTextRequiredJSON object to use as data source
TemplateText (multiline)RequiredTemplate with ${json.path} placeholders, conditionals, loops, and fallbacks

Output

Type: Text (text)