
Template node configuration interface
Jinja2 Templating
Template nodes use Jinja2 templating syntax to create dynamic content that adapts based on workflow data. This provides programming-like capabilities including loops, conditionals, and filters for sophisticated text generation.Variable Substitution
Reference workflow variables using double curly braces:{{ variable_name }}. You can access nested object properties and array elements using dot notation and bracket syntax.
Conditional Logic
Show different content based on data values using if-else statements:Loops and Iteration
Process arrays and objects with for loops to generate repetitive content:
Template processing knowledge retrieval results
Data Formatting
Filters
Jinja2 filters transform data during template rendering:Error Handling
Handle missing or invalid data gracefully using default values and conditional checks:Interactive Forms
Templates can generate interactive HTML forms for structured data collection in chat interfaces:
Interactive form rendered in chat interface
Output Limits
Template output is limited to 80,000 characters (configurable viaTEMPLATE_TRANSFORM_MAX_LENGTH). This prevents memory issues and ensures reasonable processing times for large template outputs.