Skip to main content

Markdown Text

Uncontrolled node

Overview​

The Markdown Text node is a versatile text composition tool that uses Handlebars templating syntax to combine static text with dynamic data from your workflow. It allows you to create templates with placeholders like {{variableName}} that get replaced with actual values at runtime.

This node is particularly useful for:

  • Building prompts for AI nodes
  • Creating email templates
  • Formatting messages or reports
  • Combining multiple data sources into a single text output

The node automatically detects variables in your template (wrapped in double curly brackets {{}}) and creates corresponding input sockets for each unique variable found.

Templating Syntax​

Use double curly brackets to reference variables: {{variableName}}. The node will automatically create input sockets for each unique variable name detected in your text.

Inputs​

InputTypeDescriptionDefault
TextRichTextThe template text containing Handlebars expressions (e.g., Hello {{name}}). Variables are automatically detected and added as inputs.-
DynamicDataFor each {{variable}} found in the text template, a corresponding input socket is created with the variable name.-

Outputs​

OutputTypeDescription
OutputTextThe compiled text with all Handlebars expressions replaced by their corresponding input values.

Runtime Behavior​

The Markdown Text node is uncontrolled, meaning it runs automatically whenever any of its inputs change. It uses the Handlebars templating engine to compile the text:

  1. The node scans the text content for Handlebars expressions ({{variableName}})
  2. It creates input sockets for each unique variable detected
  3. At runtime, it compiles the template using the current values of all inputs
  4. Variables are resolved from:
    • Direct inputs to the node
    • Parent workflow variables
    • Root workflow variables

If a referenced variable is not found, the placeholder is replaced with an empty string.

Example​

Basic Template​

Text Content:

Dear {{customerName}},

Thank you for your order of {{product}} on {{date}}.

Best regards,
{{senderName}}

Connected Inputs:

  • customerName: "Alice Smith"
  • product: "Premium Widget"
  • date: "2024-01-15"
  • senderName: "Support Team"

Output:

Dear Alice Smith,

Thank you for your order of Premium Widget on 2024-01-15.

Best regards,
Support Team

AI Prompt Building​

Text Content:

You are a helpful assistant. Please analyze the following data and provide insights:

{{data}}

Focus on: {{focusArea}}

This pattern is commonly used to build dynamic prompts for the AI Write node, allowing you to inject data and instructions into AI workflows.