Gate AI answers against source docs with Groq and n8n data tables
Ready for 3.0Ready for 3.0. This template uses no nodes that n8n 3.0 removes. No removed nodes, versions or helpers found. Static check, last run 2026-12-01.
What this workflow does
This AI workflow has 14 nodes and runs when another workflow calls it (plus 1 other trigger). Along the way it connects Groq Chat Model.
How it runs
Trigger: When another workflow calls it (plus 1 other trigger).
- Mark Sub-Workflow Entry (Edit Fields (Set)): sets 3 fields: entry, answer, sources
- Mark Form Entry (Edit Fields (Set)): sets 3 fields: entry, answer, sources
- Set Gate Policy (Edit Fields (Set)): sets 4 fields: block_at, review_at, model_max_points…
- Run Deterministic Fact Checks (Code): runs custom JavaScript code
- Judge Claims With Groq (AI Agent): runs an AI agent, with model: Groq Chat Model; output parser: Parse Claim Judgement
- Combine Into Gate Verdict (Code): runs custom JavaScript code
- Record In Check Log (Data table): uses Data table
- Came From Test Form (If): checks a condition and branches into true / false
- Show Verdict Page (n8n Form): shows the next form page
- Return Verdict To Caller (Edit Fields (Set)): sets 3 fields: verdict, risk_score, reasons
Services it uses
Before you upgrade to n8n 3.0
Nothing in this workflow is removed in n8n 3.0, so it should import and run after the upgrade.
Nodes used (10)
- Execute Workflow Trigger
n8n-nodes-base.executeWorkflowTrigger - Edit Fields (Set)
n8n-nodes-base.set - n8n Form Trigger
n8n-nodes-base.formTrigger - Code
n8n-nodes-base.code - AI Agent
@n8n/n8n-nodes-langchain.agent - Groq Chat Model
@n8n/n8n-nodes-langchain.lmChatGroq - Structured Output Parser
@n8n/n8n-nodes-langchain.outputParserStructured - Data table
n8n-nodes-base.dataTable - If
n8n-nodes-base.if - n8n Form
n8n-nodes-base.form
From the author
Quick overview This workflow checks an AI-generated answer against its provided source text using deterministic rules and a Groq LLM judge, then returns a PASS/REVIEW/BLOCK verdict and logs the results to an n8n data table. How it works 1. Starts either when…