ClouisleClouisle

Tutorial: Workflow Automation

Build a workflow that receives requests, classifies them, calls APIs, and returns results

This tutorial builds a “ticket routing” workflow: it receives user input, determines priority with a question classification node, calls a knowledge base and an external HTTP API, and finally outputs the ticket result.

Prerequisites

The current team has a chat model, at least one processed knowledge base, and a callable test HTTP endpoint. To publish the Webhook, create an API Key and have workflow publishing permissions.

Final Result

The published workflow has an input variable, classification branches, knowledge base retrieval, an HTTP tool call, an output node, and run tracing.

Ticket routing workflow final result
Ticket routing workflow final result

Step 1: Define the Start Inputs

Define the input contract clearly so later nodes get stable types through the variable selector.

Create a workflow and select the User Input start node, then add: customer_id (text, required), message (paragraph, required), priority (dropdown option, optional, default normal).

Step 2: Classify & Branch

Classify before side-effecting operations so not all requests follow the same processing path.
  1. Add a Question Classifier node and define three categories: billing, technical, general.
  2. Add a Condition to route high-priority or technical issues to the knowledge base and API branch.
  3. Connect inputs and classification outputs with the variable selector.
Workflow conditional branches
Workflow conditional branches

Step 3: Retrieve & Call the HTTP API

Tool nodes should only receive necessary parameters; put sensitive values such as API keys in the tool's headers, never in the parameters.
  1. Add Knowledge Retrieval with the query {message} and Top K of 5.
  2. The editor's node panel does not offer a bare HTTP node. Instead, create an HTTP tool under Capabilities > Tools > Create Tool > HTTP API: select POST, use the test endpoint as the URL, and keep Timeout at its default 30.
  3. Back in the workflow, add a Tool node and select the HTTP tool you just created.
  4. In the parameter configuration, map customer_id, the classification result, and the knowledge base summary to the tool's inputs, then test the failure branch.

Step 4: Define Outputs & Debug

  1. Add an Output node and map category, ticket_id, answer, and sources.
  2. Open the Checklist and fix all errors.
  3. In the editor select Run to open the Test Run drawer, then use Debug (use draft) to test a normal request, an unknown category, an API timeout, and a no-knowledge-base result separately.
  4. Review each node's inputs, outputs, duration, and errors in the drawer's Trace tab.

Step 5: Publish the Webhook

  1. Open Workflow Settings > Trigger, set Trigger Method to Webhook, and save.
  2. Select Publish; in the run page presentation options, choose Form and result.
  3. In Access API, copy the Webhook URL and the sample request.
  4. Replace the placeholder in the sample with your own API key and send the JSON request; follow progress and results on the Logs page or in the run drawer.

Acceptance criteria

Normal requests return a ticket ID; conditional branches run per category; HTTP failures can be located in the tracing; the Webhook only accepts requests carrying a valid API key; the logs show node status, duration, and outputs.

How is this guide?

On this page