Skip to content

Update workflows overview #470

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jun 2, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion fern/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ navigation:
- page: Phone calls
icon: fa-solid fa-phone
path: quickstart/phone.mdx
- page: Web integration
- page: Web calls
icon: fa-light fa-browser
path: quickstart/web.mdx
- section: How Vapi works
Expand Down
83 changes: 40 additions & 43 deletions fern/workflows/overview.mdx
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
---
title: Workflows overview
subtitle: Learn to create robust, deterministic conversation flows with a visual builder.
slug: workflows/overview
---

## Introduction
Expand All @@ -11,16 +12,14 @@ Workflows is a visual builder designed for creating robust, deterministic conver
<img src="../static/images/workflows/workflows-overview.png" alt="Vapi Workflows" />
</Frame>

## Key Benefits

**Key Benefits:**
- **Visual Conversation Builder:** Easily prototype and demonstrate conversation flows visually.
- **Complex Flow Management:** Ideal for scenarios with numerous interaction paths, such as call centers, customer support, appointment scheduling, and onboarding processes.
- **Reliable Determinism:** Offers stronger control compared to single-prompt Assistants, ensuring predictable conversational paths even in highly complex flows.
- **Developer-Focused Flexibility:** Fully configurable via API, enabling selection of models, transcribers, and voices available throughout the Vapi platform.
- **Multilingual Support:** Seamlessly build multilingual conversation flows with language-specific nodes and prompts.

## Common Use Patterns

**Common Use Patterns:**
- **User Intent Manager:** Route user interactions based on specific intents.
- **Human Escalation Paths:** Allow users to transfer to human agents at any workflow stage.
- **Multilingual Flows:** Create dedicated conversation branches for different languages.
Expand All @@ -34,41 +33,35 @@ By default a Conversation Node is the start node, but it can be changed to a dif

## Node Types and Configuration

## Conversation Node
### Conversation Node

The Conversation Node is the default type of node. It's highly configurable and it's the main building block for conversation flows.

<Frame>
<img src="../static/images/workflows/workflows-conversation-node.png" alt="Create workflow interface" />
</Frame>

```yaml title="First Message"
Specify the initial spoken message when entering the node
```

### Configuration options

#### First Message

Specify the initial spoken message when entering the node. This configuration is helpful if developers want the agent to speak first without waiting for user to say something.
```yaml title="Prompt"
Detailed instructions guiding agent responses and conversation direction
```

#### Prompt
```yaml title="Model/Voice/Transcriber"
Individual AI model, voice, and transcription configuration
```

Provide detailed instructions guiding agent responses and conversation direction, including response style and content.
```yaml title="Extract Variables"
Gather variables from conversation using liquid syntax {{ variable_name }}
```

The prompt is the most important part of the Conversation Node. Building reliable and high-quality voice agents heavily depend on the quality of the prompt supplied.

#### Global Node

Allows routing to this node from any point in the workflow, commonly used for escalation purposes e.g. when user wants to jump from the pre-determined conversation flow to speaking to a human to address specific needs. This feature can be enabled via the Global toggle; developers must specify an Enter Condition that defines the condition for routing to the Global Node.

#### Model/Voice/Transcriber Settings

Individually configure the AI model, voice, and transcription services per node. This is similar to configuring Single Prompt Assistants.

#### Extract Variables

Extract Variables lets users gather/extract variables from a conversation. These variables can be used as dynamic variables for the rest of the workflow via liquid syntax `{{ variable_name }}`.

Variables can be configured by:

- Defining variable name and data type (String, Number, Boolean, Integer)
- Writing a clear extraction prompt (a description of the variable to help determine how/what data to extract)
- Setting enums for String-type variables to constrain values (to map to a specific set)
Expand All @@ -77,44 +70,48 @@ Variables can be configured by:
<img src="../static/images/workflows/workflows-extract-node.png" alt="Create workflow interface" width="250" />
</Frame>

## API Request Node
### API Request Node

The API Request Node allows developers to make HTTP Requests to their API, custom endpoints, or automation services like Make, n8n, or Zapier. Developers can configure it to perform GET and POST requests. Request bodies must be formatted in [JSON Schema](https://json-schema.org/) (the body UI builder automatically does this).

<Frame>
<img src="../static/images/workflows/workflows-api-node.png" alt="Create workflow interface" />
<img src="../static/images/workflows/workflows-api-node.png" alt="API Request Node interface" />
</Frame>

## Transfer Call Node
### Transfer Call Node

Transfer calls to another phone number, including human agents or specialized voice agents.

Developers can specify a phone number destination and a [transfer plan](/call-forwarding#call-transfers-mode), which lets them specify a message or a summary of the call to the person or agent picking up in the destination number before actually connecting the caller.

<Frame>
<img src="../static/images/workflows/workflows-transfer-node.png" alt="Create workflow interface" />
<Frame>
<img src="../static/images/workflows/workflows-transfer-node.png" alt="Transfer Call Node interface" />
</Frame>

## End Call Node
### End Call Node

Terminal node to end calls explicitly. Configure with an optional closing message (via the first message field) to users before termination.

<Frame>
<img src="../static/images/workflows/workflows-end-call-node.png" alt="Create workflow interface" />
<Frame>
<img src="../static/images/workflows/workflows-end-call-node.png" alt="End Call Node interface" />
</Frame>

<Warning>
Workflows without a defined End Call Node risk unintended minutes usage. Ensure all workflows have clear termination points to ensure the call eventually ends.
</Warning>

## Tool Node
### Tool Node

Integrate existing Tools library functionalities. Select tools previously created for use within Workflows, maintaining consistency with Assistant configurations.

<Frame>
<img src="../static/images/workflows/workflows-tools-node.png" alt="Create workflow interface" />
<Frame>
<img src="../static/images/workflows/workflows-tools-node.png" alt="Tool Node interface" />
</Frame>

### Global Node

Allows routing to this node from any point in the workflow, commonly used for escalation purposes e.g. when user wants to jump from the pre-determined conversation flow to speaking to a human to address specific needs. This feature can be enabled via the Global toggle; developers must specify an Enter Condition that defines the condition for routing to the Global Node.

## Edges

A node is connected to another node via an edge. Developers can specify a condition (within the edge) that must be true (satisfied) for the conversation to flow from one node to the next.
Expand All @@ -123,26 +120,28 @@ A node is connected to another node via an edge. Developers can specify a condit
<img src="../static/images/workflows/workflows-ai-edge.png" alt="Create workflow interface" />
</Frame>

#### AI-based conditions

### Types of conditions

**AI-based conditions** - Written in plain language and evaluated by LLMs:
Written in plain language and evaluated by LLMs:
```txt
User wanted to talk about voice agents
```

**Logical conditions** - For precise control using variables:
#### Logical conditions

For precise control using variables:
```txt
{{ city == "San Francisco" }}
```

**Combined conditions** - Mix logical operators with variables:
#### Combined conditions

Mix logical operators with variables:
```txt
{{ customer_tier == "VIP" or total_orders > 50 }}
```

### Best practices for conditions

**Best practices for conditions:**
* Use descriptive, natural language for AI-based conditions
* Format conditions as: "User [verb] [rest of condition]"
* Extract variables as enums to enable reliable branching
Expand Down Expand Up @@ -171,8 +170,6 @@ A useful combination of features is to extract variables as enums and use them t
* **Plan for scale** - Consider how workflows will perform with high call volumes
* **Version control** - Keep track of workflow changes and test before deploying

---

## Next steps

Ready to start building? Check out these resources:
Expand Down
Loading