Skip to main content
Dynamic content allows your workflows to respond to real data — request parameters, action results, headers, and more. Instead of hardcoding values, you use template syntax to reference and transform data at runtime. You can create dynamic content in two ways:
  • Content Editor — Visual interface in the dashboard for building dynamic values with helper panels
  • Template Syntax — Code-based expressions in YAML configuration files
Any text input field that displays the expand icon (⋮⋮) supports dynamic content.

The Content Editor

The Content Editor is a popup interface that helps you build dynamic content with access to variables, functions, and control structures.

Opening the Content Editor

To open the Content Editor:
  1. Click on any text input field in a node’s configuration panel
  2. Look for the expand icon (⋮⋮) in the corner of the field
  3. Click the icon to open the “Edit Content” popup
Content Editor popup showing variables panel and code editor

Editor Layout

The Content Editor has two main areas:
  • Left panel — Collapsible sections for Variables, Functions, and Control Structures
  • Right panel — Code editor where you write your dynamic content
Use the Search field to filter available options. Click Apply to save your changes or Cancel to discard them.

Variables Panel

The Variables panel lists all action results available from previous steps in your workflow. Each variable shows:
  • Name — The action’s display name (e.g., “AI Agent’s Result”)
  • Variable reference — The internal ID to use in templates
  • Description — What data the variable contains
Click a variable to insert it into the editor. Hover over a variable to see its documentation.
Variables are only available from actions that execute before the current step in your workflow. If you don’t see an expected variable, check that the action is connected earlier in the flow.

Functions Panel

The Functions panel lists 19 available functions for transforming and validating data. Functions are organized by purpose:
  • String manipulation (strip, upper, lower, escape)
  • Data transformation (jsonout, pluck)
  • Comparison and validation (eq, notempty, email)
Click a function to insert it with placeholder syntax like ${1:string}. Replace the placeholder with your actual value.

Control Structures Panel

The Control Structures panel provides 4 structures for conditional logic:
  • if / else — Conditional rendering
  • range — Iteration over collections
  • with — Scoped variable access

Template Syntax

ServFlow uses Go’s text/template syntax for dynamic values. The syntax you use depends on where you’re editing.

Full Template Mode

Most input fields use full template mode, where expressions must be wrapped in {{ }} delimiters.
Full template mode showing expressions with curly brace delimiters

Expression Mode

Structured conditional fields (Field and Comparison inputs) use expression mode, where you write raw expressions without {{ }} delimiters. The system automatically wraps your expression.
Expression mode in structured conditionals without curly braces
See the Conditionals documentation for details on structured vs template conditionals.

Accessing Data

Dynamic content can reference data from multiple sources throughout your workflow.

Action Results

Access results from previous actions using the action ID with a dot prefix:

Request Parameters

Access request body fields and query parameters with the param function:

Request Headers

Access HTTP headers with the header function:

Tool Parameters

When an action is called from an AI agent’s workflow tool, access tool parameters:

Secrets

Access securely stored environment variables with the secret function:

Available Functions

String Functions

Comparison Functions

Logical Functions

Collection Functions

Data Functions

Validation Functions

These functions are primarily used in conditionals and collect validation errors:

Pipelines

Chain multiple functions together using the pipe operator |. Data flows left to right through each function:

Control Structures

If/Else

Conditionally render content based on a value:

With Block

Create a scoped context for nested access:

Range (Iteration)

Iterate over collections:
For complex array processing, consider using a JavaScript action instead of range loops in templates.

Common Patterns

Authentication Token Extraction

Default Values

Safe Strings for JSON

Combining Multiple Values

Conditional Display

Checking Collection Length


Best Practices

  1. Use direct action access — Prefer .actionID syntax for accessing action results
  2. Escape user input — Always use stringescape for user input in JSON or database queries
  3. Provide defaults — Use the default function for optional values to prevent empty outputs
  4. Keep templates simple — Move complex logic to JavaScript actions when templates become difficult to read
  5. Use multi-line YAML — For complex templates, use | for better readability:
  1. Validate early — Use conditionals to validate inputs before processing them in actions

Next Steps

Actions

Learn about actions — the building blocks of workflows.

Conditionals

Add branching logic to your workflows.

Configuration Reference

See the complete ServFlow configuration options.

Secrets Management

Securely store credentials for your workflows.