Building Your First Workflow: A Lead Qualification Example

AI WorkflowsUpdated May 7th, 2026

Building Your First Workflow

The fastest way to learn the workflow editor is to build something small and test it. In this guide we will build a lead qualification workflow: when a visitor on your pricing page asks about plans, the workflow asks a few questions, decides whether they look like a hot lead, and either books a sales demo or sends them to a self-serve article.

Step 1: Open the editor

In the main sidebar, click AI Workflows. You will see your existing workflows (if any) and two ways to start a new one:

  • New Workflow opens an empty canvas.
  • Install from preset drops in one of the built-in templates which you can then edit. This is a great shortcut for common patterns.

For this guide, click New Workflow.

Step 2: Configure the trigger

The canvas opens with a Trigger node already in place. Click it to open the configuration panel and:

  1. Set the trigger type to Conversation.
  2. Describe in the trigger criteria when this workflow should run, for example: "Customer is asking about pricing, plans, or buying."
  3. Give the workflow a name like Lead Qualification and a short description.

The name and description are admin-only. Customers never see them.

Step 3: Ask for the use case

Drag an Ask node onto the canvas and connect the trigger's output handle to it. Configure:

  • Message: "Happy to help! Could you tell me a bit about what you are looking to do with us?"
  • Variable name: use_case

The customer's reply will be stored in use_case and available to all later nodes.

Step 4: Classify the lead

Drag a Classify node next. Configure two labels:

  • hot - "The visitor describes a clear, near-term business need with a budget or timeline."
  • cold - "The visitor is browsing or has a small/personal use case with no urgency."

Classify will read use_case (and the rest of the conversation) and decide which branch to take.

Step 5: Branch on the result

From the Classify node, you now have two output handles, one per label.

On the hot branch:

  1. Add an Ask node: "Great! What is the best email to reach you on?" Variable: email.
  2. Add an Action node that calls a Create CRM lead AI Action. Map email and use_case to the action's parameters.
  3. Add a Handoff node so a sales agent can pick up the conversation in the inbox.

On the cold branch:

  1. Add an End node with a final message: "If you want to dig deeper, check out our pricing guide."

Step 6: Save and turn it on

Click Save in the editor toolbar, then toggle the workflow to Active. Inactive workflows are not evaluated, so this last step matters.

Step 7: Test in the simulator

Open the Simulator tab from the workflow editor. The simulator gives you a sandbox conversation where you can:

  • Send messages as a fake customer.
  • See exactly which node is currently executing.
  • Inspect the variables the workflow has captured.
  • Replay or reset the run.

Send "I'm looking for an enterprise plan for my 200-person team" and watch it route through the hot branch. Then reset and send "Just looking, thanks" to see the cold branch.

Step 8: Watch real runs

Once it is live, every execution is recorded as a WorkflowRun with its full event history (which node ran, what variables were captured, what the AI returned). Open any conversation that triggered the workflow and click into the run to debug.

Where to go next

Was this article helpful?

Need more help?

Our support team is available to assist you with any questions.

Contact Support