Home AI Studio Building Workflows

Building Workflows

Last updated on Apr 12, 2026

Workflows are scripted conversation paths. Every message in a workflow is pre-written by you. The agent follows the script exactly, sending fixed messages, presenting choices, and collecting input.

                                                                                                                                                                              Use workflows when you need a predictable, structured interaction, for example collecting a customer's details before looking up their order, or presenting a menu of options at the start of a conversation.                                                                                                                                                   

Accessing workflows

Navigate to Agent Studio in the sidebar. The Workflows panel is in the left panel on desktop. Click Create Workflow to open the visual editor.

How the editor works

The workflow editor is a visual canvas where you place nodes and connect them with lines. Each node is a step in the conversation. The flow moves from top to bottom, followingthe connections you draw between nodes.

Every workflow starts with a Start node and ends with an End node. You add steps in between to build the conversation.

To add a node, click the + button or right-click on the canvas and select the type of node you want.

To connect two nodes, drag a line from one node's output handle to the next node's input handle.

To configure a node, click on it. The settings panel will appear on the right side where you can edit its properties.

Types of nodes

Conversation / Collect Input

                                                                                                                                                                              This is the main building block. A conversation node can contain one or more "cards" that do different things.                                                                

Talk cards send content to the customer:

  • Send message sends a text message you have written

  • Send image sends an image you upload

  • Send attachment sends a file (PDF, audio, video, etc.)

  • Listen cards wait for the customer to respond:

  • Collect choice presents a set of options for the customer to pick from (like buttons). You define each option and where it leads. The workflow pauses until the customer selects one.

  • Collect freeform input waits for the customer to type a response. You can add validation rules such as email, phone number, URL, number, date, or a custom pattern.

When a listen card collects a response, it saves the value to a variable that you can use later in the workflow.

Rules for cards within a single node:

  • Only one message card per node

  • Only one image card per node

  • Only one listen card (choice or freeform input) per node

  • A message or image card should come before a listen card

Branch

A branch node splits the flow based on conditions. You define one or more conditions that check the value of a variable, and the workflow follows the matching path.

For example, if you collected the customer's issue type in a previous step, you can branch on it:

  • If issue type equals "billing", go to the billing flow

  • If issue type equals "technical", go to the technical flow

  • Otherwise (else), go to a general flow

Available comparisons include: equals, not equals, contains, does not contain, starts with, ends with, greater than, less than, is empty, is not empty, and matches a pattern.

Tool

A tool node runs one of your configured tools during the workflow. For example, it can look up an order, check an account status, or call an external API.

You select which tool to run, provide any required inputs (which can reference variables collected earlier), and optionally save the result to a variable for use in later steps.

Attachment

An attachment node sends a file to the customer. You upload the file and optionally add a caption. Supported types include images, video, audio, and documents.

Trigger Workflow

This node starts a different workflow from within the current one. Use this to break complex flows into smaller, reusable pieces. For example, a main welcome workflow could trigger a "collect shipping address" workflow and then continue after it completes.

End

The end node marks the end of the workflow. Once the workflow reaches this node, the agent returns to free-response mode and can answer further questions using its Knowledge Base and tools.

Variables

Variables let you store and reuse information throughout a workflow. When a listen card collects input from the customer, you save it to a variable. You can then reference that variable in messages, branch conditions, or tool inputs.

To insert a variable in a text field, type {{ and select from the list.

Workflow variables are values you collect or set during the flow, for example vars.email or vars.order_id.

System variables are built-in values available automatically:

  • contact.name - the customer's name

  • contact.email - the customer's email address

  • contact.phone - the customer's phone number

  • conversation_id - the current conversation ID

You can also use a Set Variable node to manually set a variable to a specific value at any point in the workflow.

Saving your workflow

When you are ready, click Save. You will be asked to give the workflow a name and an optional description.

The editor will check for common issues before saving:

  • The Start node must be connected to at least one other node

  • Message cards cannot be empty

  • Listen cards must save their response to a variable

  • Choice options cannot be empty

  • Tool nodes must have a tool selected

  • Trigger Workflow nodes must have a target workflow selected

If any issues are found, you will see a message explaining what needs to be fixed.

Assigning a workflow to an agent

After saving, the workflow appears in the Workflows panel but is not active until you assign it to an agent.

  1. Go to Agents, select your agent, and click Edit.

  2. Scroll to the Workflows section.

  3. Toggle on the workflows you want this agent to use.

  4. To make a workflow run at the start of every conversation, click the star icon next to it to mark it as the entrypoint.

  5. Save.

Example: Collecting customer details before starting

Here is a simple workflow you could use as an entrypoint:

  1. Start node connects to a Conversation node.

  2. The Conversation node sends a message: "Hi! Before I help you, can I get your email address?"

  3. A listen card (freeform input with email validation) waits for the response and saves it to vars.email.

  4. Connect to another Conversation node that sends: "Thanks! How can I help you today?"

  5. A listen card (freeform input) collects their question and saves it to vars.question.

  6. Connect to an End node.

After the workflow ends, the agent switches to free-response mode and answers the customer's question using its Knowledge Base, already knowing their email.