Validate AI ticket classifications with OpenRouter Gemini and schema checks

Validate AI-generated outputs before your workflow acts on them. This template sends a support ticket through AI classification, parses the JSON response, and checks that categories, urgency levels, and confidence scores are all within valid ranges.

What you'll do Send a support ticket to the AI for classification. Watch the Code node parse and validate the AI's JSON response against a defined schema. See how valid outputs continue through the workflow while invalid ones get flagged.

What you'll learn How to structure AI prompts to return valid JSON How Code nodes parse and validate AI output against expected schemas How to check confidence scores, valid categories, and urgency levels programmatically How to build retry and fallback paths for malformed AI responses

Why it matters AI models don't always return what you expect. A confidence score of "high" instead of 0.95, a missing category field, or a malformed JSON response can silently break downstream steps. This template catches those failures before they propagate.

0
Downloads
0
Views
7.57
Quality Score
beginner
Complexity
Author:Elvis Sarvia(View Original →)
Created:3/13/2026
Updated:3/13/2026

🔒 Please log in to import templates to n8n and favorite templates

Workflow Visualization

Loading...

Preparing workflow renderer

Comments (0)

Login to post comments