Workflows quickstart

Build a simple agent that greets users and gathers basic information using Vapi workflows.

Overview

Build a simple voice agent using Vapi’s visual workflow builder that greets users, collects their information, and demonstrates core workflow concepts like variable extraction, conditional routing, and global nodes.

Vapi Workflows

Agent Capabilities:

  • Greet users and ask about their voice agent needs
  • Extract and store user information (name and city)
  • Use variables in dynamic responses
  • Handle escalation to human agents at any point

What You’ll Build:

  • Multi-node conversation flow with branching logic
  • Variable extraction and liquid template usage
  • Global escalation nodes for human transfer
  • End-call automation with natural conversation termination

Prerequisites

Scenario

We will create a simple information-gathering workflow that demonstrates the core features of Vapi’s workflow builder. This workflow will showcase conversation flow, variable extraction, and escalation patterns that form the foundation of more complex workflows.

Workflows vs Assistants: Workflows are visual conversation flows with branching logic and variable extraction. Assistants are single AI agents with tools and continuous conversation. This guide covers workflows specifically.


1. Create a Workflow

1

Open the Vapi Dashboard

Go to dashboard.vapi.ai and log in to your account.

3

Create a new workflow

  • Click Create Workflow.
  • Enter workflow name: Information Gathering Demo.
  • Select the blank template.
  • Click Create Workflow.

2. Configure the Start Node

1

Configure the conversation node

The blank template includes a conversation node. Click on it and configure:

First Message:

Hey there!

Prompt:

Ask users what kind of voice agent they want to build. Be friendly and conversational.
2

Test the basic setup

Click Call in the top right to test your initial setup. The agent should greet you and ask about voice agents.

You can change the node type by selecting a different type from the dropdown at the top of the node configuration panel. For example, you can change the start node type to API Request to trigger an HTTP request as soon as the call is connected.


3. Add Information Collection Flow

1

Add a second conversation node

  • Click the + button below the first node
  • Select Conversation Node
  • Configure the new node:

Prompt:

Acknowledge the user's voice agent use case, then ask for information about the user. Ask for their first name and what city they're in.

Extract Variables (expand this section):

  • Variable 1:
    • Name: first_name
    • Type: string
    • Description: the user's first name
  • Variable 2:
    • Name: city
    • Type: string
    • Description: the user's city
2

Configure the connecting edge

Click on the edge between the two nodes and configure:

  • Condition: User describes their voice agent
  • Click Save

4. Add Dynamic Response Node

1

Add a third conversation node

Add another Conversation Node with this prompt:

Say "Thanks {{first_name}}, {{city}} is great!"
Then say a few nice words about the {{city}}. Keep it brief. After that, ask the user if there's anything you can help with and help them, unless they no longer need help.
2

Remove the edge condition

Click on the edge leading to this node and:

  • Remove any condition text (leave it blank)
  • Click Save

This allows automatic flow after the variables are extracted.


5. Add Global Escalation Node

1

Create a global node for human escalation

Add a new Conversation Node and configure:

Global Node: Toggle this ON

Conversation Prompt:

Confirm that the user wants to speak to a human and ask them what would they like to talk to the human about.

Condition Prompt:

User wants to speak to a human
2

Add transfer call node

Add a Transfer Call Node below the global node:

  • Destination: Enter your phone number or +1-555-DEMO-123
  • Configure Transfer Plan with a brief summary message

Developers can specify a phone number destination and a transfer plan, 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 call.


6. Add Call Termination

1

Add an End Call node

Add an End Call Node at the end of your main flow:

First Message:

Alright, have a nice day!
2

Configure the final edge

Update the edge leading to the End Call node:

  • Condition: User does not need any help
  • Click Save

7. Test Your Workflow

1

Test the complete flow

Click Call in the top right to test your workflow:

  • Verify the greeting works
  • Test variable extraction by providing your name and city
  • Confirm the dynamic response uses your information
  • Test the global escalation by saying “I want to speak to a human”
2

Review your workflow structure

Your final workflow should have:

  • Start Node: Greeting and use case inquiry
  • Collection Node: Information gathering with variable extraction
  • Response Node: Dynamic response using extracted variables
  • Global Node: Human escalation available from anywhere
  • Transfer Node: Routes to human agent when needed
  • End Node: Natural conversation termination

Next Steps