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.
Related Templates
Track Demo Bookings with Google Calendar to Meta Conversions API Integration
Who is this workflow for? If you're using Meta Ads to generate new leads to your sales pipeline, this workflow is for yo...
Transcribe & Summarize Audio with Whisper and GPT, from Google Drive to Notion
This workflow contains community nodes that are only compatible with the self-hosted version of n8n. Overview This work...
Reusable and Independently Testable Sub-workflow
Reusable and Independently Testable Sub-workflow This n8n workflow provides a standardized structure for building and te...
🔒 Please log in to import templates to n8n and favorite templates
Workflow Visualization
Loading...
Preparing workflow renderer
Comments (0)
Login to post comments