Skip to main content
Actions are the core building blocks of ServFlow workflows. They perform discrete operations such as fetching data from a database, calling external APIs, running AI agents, or transforming values. Every workflow consists of an entry point, one or more actions, and a response. You can configure actions in two ways:
  • Dashboard UI — Visual interface for building workflows by selecting action types and filling in configuration fields
  • YAML Configuration — Code-based configuration files for version control and advanced setups

Action Structure

Every action follows this structure in YAML:
actions:
  action_id:
    type: action_type
    config:
      # type-specific configuration
    next: action.next_step
    fail: response.error
The action_id is a unique identifier you choose for the action. You’ll use this ID to reference the action’s results in other parts of your workflow.

Common Fields

FieldTypeRequiredDescription
typestringYesThe action type identifier (e.g., fetch, http, agent)
configobjectNoType-specific configuration options
nextstringNoStep to execute on success
failstringNoStep to execute on failure

Chaining Actions

Use the next and fail fields to define your workflow’s execution path:
  • next — Routes to another step when the action succeeds
  • fail — Routes to an error handler when the action fails
The routing syntax follows the pattern type.identifier:
  • action.other_action — Route to another action
  • conditional.check_value — Route to a conditional branch
  • response.success — Route to a response

Accessing Action Results

When an action completes, its result is stored and can be referenced by subsequent nodes. Use the {{ .action_id }} syntax to access these values.
# Access the full result from action 'fetch_user'
value: "{{ .fetch_user }}"

# Access a nested field
value: "{{ .fetch_user.email }}"

# Use in expressions
expression: "{{ gt (len .fetch_user) 0 }}"
For example, if an action with ID get_user returns user data, you can access the email field in a later action with {{ .get_user.email }}.

Filter Syntax

Several actions use filters to query data. Filters follow this structure:
filters:
  - field: field_name
    operator: eq
    value: "comparison_value"

Available Operators

OperatorDescription
eqEqual to
neNot equal to
gtGreater than
gteGreater than or equal
ltLess than
lteLess than or equal
inValue in array
ninValue not in array
Example with multiple filters:
filters:
  - field: status
    operator: eq
    value: active
  - field: age
    operator: gte
    value: "18"
  - field: role
    operator: in
    value:
      - admin
      - moderator

Available Actions

ServFlow provides actions organized by category:

Data Operations

ActionDescription
fetchRetrieves data from a database table
storeStores a new record in a database table
updateUpdates existing records
deleteDeletes records from a database table
mongoqueryExecutes native MongoDB queries

Vector Operations

ActionDescription
storevectorStores vector embeddings
fetchvectorsQueries vectors for similarity search

HTTP & External APIs

ActionDescription
httpMakes HTTP requests to external APIs

Authentication & Security

ActionDescription
authenticateValidates JWT tokens and fetches user data
jwtEncodes or decodes JWT tokens
hashHashes values using bcrypt

Transformation & Logic

ActionDescription
javascriptExecutes custom JavaScript code
staticReturns a static or computed value

AI & Agents

ActionDescription
agentInteracts with AI models

Flow Control

ActionDescription
parallelExecutes multiple actions simultaneously

Communication

ActionDescription
emailSends email messages via SMTP

System

ActionDescription
commandExecutes shell commands

Memory

ActionDescription
memory_storeStores data in temporary memory
memory_fetchRetrieves data from temporary memory

Binance Trading

ActionDescription
binance/getpriceGets cryptocurrency price data
binance/accountbalanceQueries Binance account balances
binance/spotorderPlaces spot trading orders
binance/futuresorderPlaces futures orders
binance/pricedifferenceCalculates price changes
binance/tradeinfoGets order and position info

Next Steps

Data Operations

Learn how to fetch, store, update, and delete data.

HTTP Requests

Call external APIs from your workflows.

AI Agents

Integrate AI models into your workflows.

Authentication

Secure your APIs with JWT and authentication.