AI · 03 — Classify & route

A support message is labeled by the ◈-wired Classify node (urgent / normal) and an If routes it: urgent tickets one way, everything else the other. Edit the Inject text and re-Test to watch it change lanes.

What’s inside

6 nodes — every type links to its full reference page.

StepNodeType
Ticket Inject input.inject
Classify AI Classify ai.classify
Ollama (local) AI Model ai.model
Urgent? IF logic.if
Escalate Console utility.console
Queue it Console utility.console

Import it

  1. Studio → Import — paste the JSON below (or the URL /docs/templates/ai-03-classify-route.json).
  2. Or ask the AI Copilot with the JSON pasted after the phrase:
    import this workflow json into a new workflow named "AI · 03 — Classify & route"
  3. Any credentials the nodes need are ${credential.…} references — add them once in Admin → Credentials and the template picks them up. Nothing secret ships in a template.
The workflow document (flowdrome.workflow.v1, 5 node types)
{
  "schemaVersion": "flowdrome.workflow.v1",
  "id": "",
  "name": "AI · 03 — Classify & route",
  "version": "0",
  "status": "draft",
  "nodes": [
    {
      "id": "seed",
      "type": "input.inject",
      "label": "Ticket",
      "category": "trigger",
      "config": {
        "contentType": "application/json",
        "payload": {
          "text": "Our production server is down and customers cannot check out!"
        }
      },
      "position": {
        "x": 0,
        "y": 23
      }
    },
    {
      "id": "label",
      "type": "ai.classify",
      "label": "Classify",
      "category": "ai",
      "config": {
        "instructions": "Classify the support message by severity. Label it 'urgent' when it describes an outage, downtime, data loss, a security incident, or blocked customers. Label it 'normal' for questions, requests and minor issues. Classes are urgent, normal.",
        "labels": [
          "urgent",
          "normal"
        ],
        "outputSchema": {
          "type": "object",
          "properties": {
            "label": {
              "type": "string",
              "enum": [
                "urgent",
                "normal"
              ]
            },
            "reason": {
              "type": "string"
            }
          },
          "required": [
            "label"
          ]
        },
        "provider": "ollama",
        "baseUrl": "",
        "apiKey": "",
        "model": "qwen2.5:1.5b",
        "timeoutMs": 120000
      },
      "position": {
        "x": 530,
        "y": 23
      },
      "attachments": {
        "model": "llm"
      }
    },
    {
      "id": "llm",
      "type": "ai.model",
      "label": "Ollama (local)",
      "category": "ai",
      "config": {
        "provider": "ollama",
        "baseUrl": "",
        "apiKey": "",
        "model": "qwen2.5:1.5b",
        "models": [],
        "temperature": 0.2,
        "maxTokens": 512
      },
      "position": {
        "x": 530,
        "y": 245
      }
    },
    {
      "id": "route",
      "type": "logic.if",
      "label": "Urgent?",
      "category": "flow",
      "config": {
        "path": "label",
        "operator": "equals",
        "value": "urgent"
      },
      "position": {
        "x": 1060,
        "y": 23
      }
    },
    {
      "id": "hot",
      "type": "utility.console",
      "label": "Escalate",
      "category": "utility",
      "config": {
        "message": "🚨 label={{ $json.label }} → page the on-call"
      },
      "position": {
        "x": 1590,
        "y": 0
      }
    },
    {
      "id": "norm",
      "type": "utility.console",
      "label": "Queue it",
      "category": "utility",
      "config": {
        "message": "📋 label={{ $json.label }} → file in the queue"
      },
      "position": {
        "x": 1590,
        "y": 178
      }
    }
  ],
  "edges": [
    {
      "id": "e0",
      "sourceNodeId": "seed",
      "sourcePort": "output",
      "targetNodeId": "label",
      "targetPort": "input"
    },
    {
      "id": "e1",
      "sourceNodeId": "label",
      "sourcePort": "output",
      "targetNodeId": "route",
      "targetPort": "input"
    },
    {
      "id": "e2",
      "sourceNodeId": "route",
      "sourcePort": "true",
      "targetNodeId": "hot",
      "targetPort": "input"
    },
    {
      "id": "e3",
      "sourceNodeId": "route",
      "sourcePort": "false",
      "targetNodeId": "norm",
      "targetPort": "input"
    }
  ],
  "triggers": [
    {
      "id": "t0",
      "nodeId": "seed"
    }
  ],
  "meta": {
    "snippets": [],
    "source": "template-gallery",
    "description": "A support message is labeled by the ◈-wired Classify node (urgent / normal) and an If routes it: urgent tickets one way, everything else the other. Edit the Inject text and re-Test to watch it change lanes."
  }
}

Generated from the verified demo corpus — this exact document seeds and runs on a fresh Flowdrome. Raw JSON: ai-03-classify-route.json.