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:Documentation Index
Fetch the complete documentation index at: https://docs.servflow.io/llms.txt
Use this file to discover all available pages before exploring further.
- Content Editor — Visual interface in the dashboard for building dynamic values with helper panels
- Template Syntax — Code-based expressions in YAML configuration files
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:- Click on any text input field in a node’s configuration panel
- Look for the expand icon (⋮⋮) in the corner of the field
- Click the icon to open the “Edit Content” popup

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
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
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)
${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 renderingrange— Iteration over collectionswith— 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.

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.

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 theparam function:
Request Headers
Access HTTP headers with theheader 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 thesecret function:
Available Functions
String Functions
| Function | Description | Example |
|---|---|---|
trimPrefix | Remove prefix from string | {{ header "Auth" | trimPrefix "Bearer " }} |
trimSuffix | Remove suffix from string | {{ .path | trimSuffix "/" }} |
upper | Convert to uppercase | {{ .name | upper }} |
lower | Convert to lowercase | {{ .email | lower }} |
replace | Replace substring | {{ replace .text "old" "new" -1 }} |
printf | Format string | {{ printf "%s-%d" .name .id }} |
strip | Strip whitespace | {{ .input | strip }} |
escape | Escape special characters | {{ .text | escape }} |
stringescape | Escape string for JSON | {{ param "query" | stringescape }} |
Comparison Functions
| Function | Description | Example |
|---|---|---|
eq | Equal | {{ eq .status "active" }} |
ne | Not equal | {{ ne .status "deleted" }} |
lt | Less than | {{ lt .age 18 }} |
le | Less than or equal | {{ le .price 100 }} |
gt | Greater than | {{ gt .count 0 }} |
ge | Greater than or equal | {{ ge .balance 0 }} |
Logical Functions
| Function | Description | Example |
|---|---|---|
and | Logical AND | {{ and .isActive .isVerified }} |
or | Logical OR | {{ or .isAdmin .isModerator }} |
not | Logical NOT | {{ not .isDeleted }} |
Collection Functions
| Function | Description | Example |
|---|---|---|
len | Get length | {{ len .items }} |
index | Get element by index | {{ index .items 0 }} |
first | Get first element | {{ first .items }} |
last | Get last element | {{ last .items }} |
pluck | Extract field from array | {{ pluck .users "email" }} |
Data Functions
| Function | Description | Example |
|---|---|---|
jsonout | JSON encode value | {{ jsonout .data }} |
jsonraw | Raw JSON output | {{ jsonraw .data }} |
default | Default value if empty | {{ default .name "Unknown" }} |
now | Current timestamp | {{ now }} |
Validation Functions
These functions are primarily used in conditionals and collect validation errors:| Function | Description | Example |
|---|---|---|
email | Validate email format | {{ email (param "email") "Email" }} |
empty | Check if empty | {{ empty .field "Field" }} |
notempty | Check if not empty | {{ notempty (param "name") "Name" true }} |
bcrypt | Compare bcrypt hash | {{ bcrypt (param "password") .user.hash "Password" }} |
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:Common Patterns
Authentication Token Extraction
Default Values
Safe Strings for JSON
Combining Multiple Values
Conditional Display
Checking Collection Length
Best Practices
-
Use direct action access — Prefer
.actionIDsyntax for accessing action results -
Escape user input — Always use
stringescapefor user input in JSON or database queries -
Provide defaults — Use the
defaultfunction for optional values to prevent empty outputs - Keep templates simple — Move complex logic to JavaScript actions when templates become difficult to read
-
Use multi-line YAML — For complex templates, use
|for better readability:
- 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.