Signpost AI Logo
WorkersTools

Template

📸 Screenshots

Here are visual examples of this section:

Template - Worker Configuration Interface Template - Worker Configuration Interface

1. Overview and Purpose

The Template worker creates dynamic text output by combining a Handlebars template with values from user-defined input fields. It allows you to create flexible text generation workflows where content can be customized based on runtime inputs. The worker supports Handlebars syntax including custom helpers like includes for string matching.

2. Configuration Parameters

This worker uses dynamic input fields created by the user rather than fixed configuration parameters. The template field accepts Handlebars template syntax with placeholders that correspond to the names of input handles you create.

3. Input/Output Handles

  • template: Input handle - accepts the Handlebars template string with placeholders
  • output: Output handle - returns the rendered template with values substituted
  • User-defined inputs: Dynamic input handles created by the user that provide values for template placeholders

4. Usage Examples with Code

// Template input example:
// "Hello {{name}}, your order #{{orderNumber}} is {{status}}"

// With user-defined input handles:
// name: "John Doe"
// orderNumber: "12345" 
// status: "shipped"

// Output:
// "Hello John Doe, your order #12345 is shipped"

// Using the includes helper:
// "{{#if (includes status 'ship')}}Your order is on the way!{{/if}}"

5. Integration Examples

This worker is commonly used in content generation pipelines where you need to create personalized messages, reports, or documents. It works well downstream from data extraction workers that provide the values for template substitution.

6. Best Practices

  • Use descriptive names for your input handles that match your template placeholders exactly
  • Test your Handlebars syntax with sample data before deploying
  • Consider using the includes helper for conditional text based on string content
  • Keep templates readable by using meaningful variable names

7. Troubleshooting Tips

  • Ensure input handle names exactly match the placeholder names in your template
  • Check that all required input fields have values before the template executes
  • Verify Handlebars syntax is correct if output appears malformed
  • Remember that empty input values are skipped during template rendering