Understanding Actions in ServFlow — the building blocks of your API workflows
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 drag-and-drop interface for building workflows
YAML Configuration — Code-based configuration files for version control and advanced setups
When you click to add an action, a sidebar panel displays all available action types. Each action shows its name and a brief description of what it does.
When an action completes, its result is stored and can be referenced by subsequent nodes. Use the {{ .Variable }} syntax in any input field to access these values.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 }}.
For code-based workflows, actions are defined in YAML configuration files. This approach is ideal for version control, complex workflows, and programmatic configuration.
Action results are stored under the action’s ID and can be accessed using template syntax:
Copy
# Access the full result from action 'fetch_user'value: "{{ .fetch_user }}"# Access a nested fieldvalue: "{{ .fetch_user.email }}"# Use in expressionsexpression: "{{ gt (len .fetch_user) 0 }}"
Here’s an example of chaining actions where the second action uses data from the first:
ServFlow provides a comprehensive set of actions organized by category. Click through to the detailed reference pages for full configuration options and examples.