> ## Documentation Index
> Fetch the complete documentation index at: https://www.bolna.ai/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Workflows introduction

> Build multi-step outreach sequences that combine voice agent calls, WhatsApp messages, API calls, waits and retries, driven entirely through the Bolna API.

> [!NOTE]
>
> Workflows are in beta. The APIs documented here are stable to build against, but details may evolve before general availability — check the [changelog](https://www.bolna.ai/docs/changelog/august-2026.md) for updates.

## What are workflows?

A workflow is a graph of nodes connected by routing rules — each node's ordered `cases` decide what runs next. It orchestrates a whole sequence per contact: call them, branch on whether they picked up, retry twice with a 2-minute gap if they didn't, extract what they said if they did, push the result to your CRM, and follow up on WhatsApp — each contact walking the graph independently. Running the same sequence over many contacts at once uses a [campaign](https://www.bolna.ai/docs/workflows/campaigns.md) — a concept kept deliberately separate from agent [batch calling](https://www.bolna.ai/docs/outbound/batch-calling.md), which places a single call per contact with no graph behind it.

Typical uses:

* **Lead qualification** — call, score the conversation from extracted fields, route hot leads to an API and cold leads to a WhatsApp nurture message.
* **Collections and reminders** — call, capture a promise-to-pay date, record it via your API, schedule the follow-up.
* **Unreachable-contact handling** — retry ladders with configurable gaps, then a fallback channel.

***

## Why workflows

> [card] One definition, every channel
>
> Calls, WhatsApp messages, HTTP calls, waits and retries live in a single graph instead of stitched-together automations across separate tools.

> [card] Safe iteration
>
> Drafts are private until published, and publishing again never changes a contact already mid-run on an older version — you can keep editing without risking what's live.

> [card] Built-in retry ladders
>
> Configurable delayed re-attempts live inside the graph itself via the `retry` node — no separate scheduler or cron job to babysit unreachable contacts.

> [card] Full execution replay
>
> Every contact's path through the graph is recorded node by node with its matched case and outputs, so "why didn't this fire" has a concrete answer instead of a guess.

***

## The object model

> [card] Workflow
>
> The named container. Holds one mutable draft and any number of immutable published versions.

> [card] Draft and versions
>
> You edit the draft, then publish it as a frozen version. Runs always execute published versions — publishing again never changes anything already running.

> [card] Campaign
>
> Runs one published version over a batch of uploaded contacts. Pins its version at creation time.

> [card] Execution
>
> One contact's journey through the graph — node attempts, matched cases, and a terminal outcome.

The lifecycle, end to end:

```mermaid theme={"system"}
flowchart TD
    create["Create workflow"] --> save["Save draft"]
    save --> validate["Validate"]
    validate --> publish["Publish (v1)"]
    publish --> run["Run one contact<br/>POST /workflows/:id/run"]
    publish --> campaign["Create campaign<br/>upload entries → :start"]
    run --> exec["Executions<br/>poll until terminal"]
    campaign --> exec
```

***

## Nodes at a glance

| Node type | What it does | Branches on |
| - | - | - |
| `start` | Entry point; declares the contact fields and any other input variables the workflow accepts | contact data (`entry.*`) |
| `agent` | Places a call with one of your Bolna agents | `call.status`, `call.duration_s`, `call.error` |
| `extraction` | Exposes fields extracted from the preceding call | `extraction.*` |
| `api` | Calls an external HTTP endpoint | `response.status`, mapped values |
| `callback` | Pauses until your system POSTs to the node's callback URL, or the timeout elapses | `callback.status`, mapped values |
| `aisensy_whatsapp` | Sends a WhatsApp template message via AiSensy | none yet — fire-and-forget, single exit |
| `time` | Waits for a delay or until a timestamp | single exit, no branching |
| `retry` | Re-runs an earlier node on a schedule, up to N attempts | evaluated once attempts are exhausted |
| `end` | Terminates the execution with a label and an outcome | terminal |

Each node routes onward through ordered **cases** — condition expressions over the execution's variables. See [Nodes](https://www.bolna.ai/docs/workflows/nodes.md) for every node's configuration, [Conditions and variables](https://www.bolna.ai/docs/workflows/conditions-and-variables.md) for the expression language, [Callback node](https://www.bolna.ai/docs/workflows/callback.md) for resuming an execution from your own system, and [AiSensy WhatsApp integration](https://www.bolna.ai/docs/workflows/aisensy-whatsapp.md) for connecting an AiSensy account to the `aisensy_whatsapp` node.

***

## Authentication and conventions

All workflow endpoints live on the standard API host and authenticate with your Bolna API key:

```bash theme={"system"}
curl --location 'https://api.bolna.ai/workflows' \
--header 'Authorization: Bearer <api_key>'
```

Three conventions to know:

* **List endpoints paginate with `limit`/`offset`** and return `{items, total, limit, offset}`.
* **Errors carry a machine-readable code** in `detail.code` (for example `revision_conflict`, `duplicate_run`, `invalid_state`), with any extra context alongside it.
* **Action endpoints use a `:verb` suffix** — for example `POST /workflow-campaigns/{id}:start` — with an empty JSON body.

***

## Next steps

> [card] [Quickstart](https://www.bolna.ai/docs/workflows/quickstart.md)
>
> Create, publish and run your first workflow, from the dashboard or with curl

> [card] [Using the editor](https://www.bolna.ai/docs/workflows/using-the-editor)
>
> A tour of the visual canvas, toolbar and validation

> [card] [Nodes](https://www.bolna.ai/docs/workflows/nodes.md)
>
> Every node type with its configuration and examples

> [card] [Conditions and variables](https://www.bolna.ai/docs/workflows/conditions-and-variables.md)
>
> The expression language behind branching

> [card] [Campaigns](https://www.bolna.ai/docs/workflows/campaigns.md)
>
> Run a workflow over thousands of contacts

> [card] [Pause until your system responds](https://www.bolna.ai/docs/workflows/callback-guide.md)
>
> Wait for an event from your own system with the callback node, end to end with curl


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.