Workflows
Classify
Sort a piece of text into one of your categories and route the run down that category's branch.
The Classify node (classify) asks a model which of your categories a piece of text belongs to, and continues the run down the matching branch. Each category is an output handle on the node; wire each one to what should happen for it.
Configuration
| Field | Type | Default | Description |
|---|---|---|---|
llm_config_id | string | — | The LLM provider connection to use. |
model_id | string | — | The model on that connection. |
inputPrompt | string | {{ trigger.body.text }} | The text to classify, with {{ }} references. Empty forwards what reached the node. |
categories | list of { id, name, description } | — | At least one. name is what the model picks between and description tells it when to pick it. id is stable, so renaming a category keeps its branch wired. |
allowMultipleClasses | boolean | false | Let the model pick several categories. Every matching branch then runs. |
noMatchAction | discard | other_branch | discard | When nothing matches: discard stops this branch of the run; other_branch continues down the node's Other handle. |
systemPromptTemplate | string | — | Replace the platform's classification prompt. Empty uses the default. |
enableAutoFixing | boolean | false | When the model's answer is not exactly one of your category names, match it case-insensitively, then as a substring, before treating it as no match. No second model call is made. |
Output
| Field | Type | Description |
|---|---|---|
inputText | string | The text that was classified. |
assignedCategories | string[] | The ids of the categories picked. Empty when nothing matched. |
discarded | boolean | true when nothing matched and noMatchAction is discard. |
modelUsed | string | The model that answered. |
tokenUsage.prompt | number | Prompt tokens. |
tokenUsage.completion | number | Completion tokens. |
latencyMs | number | How long the call took. |
autoFixApplied | boolean | Whether auto-fixing placed an answer the exact match could not. |
Branches that were not picked show as skipped in the run trace, as does everything only they lead to.
Limits and errors
- The node fails when no LLM configuration or model is selected, or the configuration belongs to another organization.
- With
allowMultipleClassesoff, only the first category the model picks is used. - No match is not an error: the node completes and either discards the item or takes the Other branch. There is no confidence score.
Example
Route support email to billing or technical:
name: Route support
description: Sends each support request to the right queue.
graph:
nodes:
- id: request
type: trigger_http
position: { x: 0, y: 0 }
data:
method: POST
fields:
- { name: text, type: string, required: true }
- id: route
type: classify
position: { x: 280, y: 0 }
data:
llm_slot: router-model
model_id: gpt-4o-mini
inputPrompt: '{{ trigger.body.text }}'
categories:
- { id: billing, name: Billing, description: Invoices, payments, refunds. }
- { id: technical, name: Technical, description: Faults, errors, how-to questions. }
allowMultipleClasses: false
noMatchAction: other_branch
enableAutoFixing: true
- id: billing-queue
type: variable
position: { x: 560, y: -80 }
data: { name: queue, type: string, initialValue: billing }
- id: technical-queue
type: variable
position: { x: 560, y: 80 }
data: { name: queue, type: string, initialValue: technical }
edges:
- { id: request-to-route, source: request, target: route }
- { id: route-billing, source: route, target: billing-queue, sourceHandle: category-billing }
- {
id: route-technical,
source: route,
target: technical-queue,
sourceHandle: category-technical,
}Each category's handle is category-<id>; the no-match handle is category-other.
In a Package
- Travels:
model_id,inputPrompt,categories,allowMultipleClasses,noMatchAction,systemPromptTemplate,enableAutoFixing - Converted:
llm_config_id→llm_slot(anllmSlot id) - Never carried: none
slots:
- id: router-model
type: llm
required: true