Skip to main content
Workflows define multi-step processes your agent can execute. Unlike FAQs (which are single question-answer pairs), workflows handle complex interactions with branching logic. Use workflows for:
  • Appointment scheduling
  • Patient intake collection
  • Multi-step qualification processes
  • Anything requiring back-and-forth conversation

Example: Creating a Workflow

Here’s how to create a basic workflow using the API:
const response = await fetch(
  "https://api.helloannie.com/v1/bots/YOUR_BOT_ID/workflows",
  {
    method: "POST",
    headers: {
      "Authorization": "Bearer YOUR_API_KEY",
      "Content-Type": "application/json"
    },
    body: JSON.stringify({
      title: "Collect Patient Information",
      description: "Gathers basic patient details for new callers",
      enabled: true,
      steps: [
        {
          title: "Get Name",
          order: 0,
          description: null,
          instructions: "Ask for the patient's full name.",
          examples: [
            "Can I get your full name?",
            "What name should I have on file?"
          ]
        },
        {
          title: "Get Date of Birth",
          order: 1,
          description: null,
          instructions: "Ask for the patient's date of birth to verify their identity.",
          examples: [
            "And what's your date of birth?",
            "Can you confirm your birthday for me?"
          ]
        },
        {
          title: "Get Reason for Call",
          order: 2,
          description: null,
          instructions: "Ask why they're calling today.",
          examples: [
            "How can I help you today?",
            "What are you calling about?"
          ]
        }
      ]
    })
  }
)

const { data } = await response.json()
console.log(data.workflow)
Realistically, you’ll want to add more steps to handle the full interaction, such as additional qualifying questions or follow-up steps. You can add more steps to the workflow as needed.

Workflow Structure

Each step has:
  • title — What the step is called
  • description — Optional description of the step (can be null)
  • instructions — Guidance for Annie on what to do
  • examples — Sample phrases Annie might use
  • order — The sequence of steps (starting at 0)
  • action — Optional action tool to execute
  • actionMetadata — Optional metadata for the action
  • childSteps — Optional nested steps for branching logic

A Note on Actions

Actions allow Annie to perform tasks during a workflow step, such as searching for appointments, booking, or transferring calls. Actions integrate with your practice management system to execute real operations.
Actions are not yet fully documented. We recommend testing workflows without actions (non-scheduling use cases) until more documentation is released on configuring custom actions that integrate with your systems.

Listing Workflows

const response = await fetch(
  "https://api.helloannie.com/v1/bots/YOUR_BOT_ID/workflows",
  {
    headers: { "Authorization": "Bearer YOUR_API_KEY" }
  }
)

const { data } = await response.json()
// data.workflows contains an array of workflow objects
Workflows are powerful but complex to configure from scratch. We recommend starting with templates, which give you pre-built workflows you can customize.

Workflows API

See the full API reference for workflow endpoints.