StyloDocs
Workflow blocks

Classify

Classify content into predefined categories using AI

View as Markdown

ai/classify — Classify content into predefined categories using AI.

Where it appears

The Classify block lives in the AI group of the Workflow Builder.

Fields

FieldTypeRequiredDefaultDescription
prompttext (multi-line, supports references)YesText the model should classify. Include the content to evaluate (e.g. ticket subject, customer message) using <StepName.field> references.
categoriescategoriesYesDefine the possible classification outcomes. Each category has an ID used in downstream references and a label shown in the UI.
defaultCategorytextNoCategory ID to select when the model cannot confidently match any defined category. Leave empty to return no category on low-confidence inputs.

Inputs and outputs

Inputs are the configurable fields above. The block produces these outputs:

Outputs

Reference an output downstream with <Classify.field>.

NameTypeDescription
successbooleanWhether classification succeeded
categorystringSelected category ID
categoryLabelstringSelected category label
reasoningstringAI reasoning for the selection
errorstringError message if failed

Example

A minimal configuration for this block:

{
  "type": "ai/classify",
  "config": {
    "prompt": "<PreviousStep.field>",
    "categories": "..."
  }
}

Limits and failure modes

  • Required fields (prompt, categories) must be set, or the block fails validation before it runs.
  • On failure the error output is populated; downstream blocks that reference other outputs may not receive values.

On this page