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 request, 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 go to the same business queue.
  1. Add a Question classification node and define three categories: billing, technical, general.
  2. Add a Conditional branch 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 and HTTP nodes should only receive necessary parameters; inject sensitive credentials with tool credential injection.
  1. Add Knowledge base retrieval with the query {message} and Top K of 5.
  2. Add an HTTP request, select POST, and use the test endpoint as the URL.
  3. In the request body, map customer_id, the classification result, and the knowledge base summary.
  4. Set a 30 second timeout and 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. Select Debug run and test a normal request, an unknown category, an API timeout, and a no-knowledge-base result separately.
  4. In the run drawer, review each node's inputs, outputs, and errors.

Step 5: Publish the Webhook

  1. Open Workflow settings, select the Webhook trigger, and save.
  2. Select Publish; in the run page presentation options, choose Form & results.
  3. In Access API, copy the URL.
  4. Send a JSON request with an API Key and use stream_url to view SSE execution events.

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 valid Bearer API Keys; run logs show node status, duration, and outputs.

How is this guide?

On this page