Nodes

AI Classify

The AI Classify node uses AI to categorize input into predefined categories. It's perfect for sentiment analysis, intent detection, priority classification, and spam filtering.

Overview

AI Classify uses AI SDK v6 generateObject with enum output for reliable, structured classification. It guarantees the output will be one of your defined categories.

Configuration

Model Selection

ProviderModelsCredential Type
OpenAIGPT-4.1, GPT-4.1 Mini, GPT-4o, o1, o3OpenAI
AnthropicClaude Sonnet 4, Claude 3.7, Claude 3.5 HaikuAnthropic
GoogleGemini 2.5 Pro, Gemini 2.5 Flash, Gemini 2.0 FlashGoogle AI

Settings

FieldDescriptionDefault
NameNode identifier for output reference"AI Classify"
ModelAI model to usegpt-4o-mini
CredentialStored credential for the AI providerOptional
System PromptClassification instructions"Classify the input..."
PromptDirect text input-
Input VariableVariable from workflow context-
CategoriesClassification optionsPositive/Negative/Neutral
Include ConfidenceAdd confidence score (0-1)true
Include ReasoningAdd explanation for classificationfalse
TemperatureCreativity level (0-2)0.1

Categories

Define your classification categories:

Categories:
  - value: positive
    label: Positive
    description: Positive sentiment or outcome
  - value: negative
    label: Negative
    description: Negative sentiment or outcome
  - value: neutral
    label: Neutral
    description: Neutral or unclear

Built-in Templates

Sentiment Analysis

Categories: positive, negative, neutral
Use Case: Customer feedback, reviews, social media

Intent Detection

Categories: question, request, complaint, feedback, other
Use Case: Customer support routing, chatbot classification

Priority Classification

Categories: urgent, high, medium, low
Use Case: Ticket triage, task prioritization

Spam Detection

Categories: spam, not_spam
Use Case: Email filtering, content moderation

Output

The node outputs structured classification data:

{
  "AI Classify": {
    "category": "positive",
    "label": "Positive",
    "confidence": 0.92,
    "reasoning": "The text expresses satisfaction with the product.",
    "usage": {
      "promptTokens": 80,
      "completionTokens": 25,
      "totalTokens": 105
    }
  }
}

Example Workflows

Customer Support Triage

[Webhook] → [AI Classify: Priority] → [Switch] → [Route to Team]

Configuration:

Categories:
  - value: urgent
    label: Urgent
    description: System down, security issue, data loss
  - value: high
    label: High
    description: Major feature broken, blocking issue
  - value: medium
    label: Medium
    description: Feature request, minor bug
  - value: low
    label: Low
    description: Question, documentation
Include Confidence: true
Include Reasoning: true

Sentiment-Based Response

[Form Input] → [AI Classify: Sentiment] → [Condition] → [Positive/Negative Response]

Content Moderation

[User Post] → [AI Classify: Spam] → [Condition] → [Approve/Reject]

Best Practices

  1. Use low temperature - Classification benefits from deterministic outputs (0.1-0.3)
  2. Write clear descriptions - Help the AI understand each category
  3. Enable confidence scores - Useful for handling uncertain classifications
  4. Use reasoning for debugging - Understand why classifications are made
  5. Choose efficient models - GPT-4o-mini or Claude 3.5 Haiku work well for classification

Comparison with Other AI Nodes

FeatureAI ClassifyAI GenerateAI Agent
Output TypeStructured enumFree textFree text
Tool CallingNoNoYes
Guaranteed FormatYesNoNo
Best ForCategorizationContent creationComplex tasks

On this page