n8n
This guide demonstrates how to integrate Scorable Judges into an n8n workflow to evaluate and refine AI-generated responses before delivering them to users.
Architecture Overview
The flow is as follows: User → Website Chatbot → n8n Webhook → HTTP Request (Scorable Judge) → Refined AI Response → Website
Prerequisites
An n8n instance (Cloud or Self-hosted)
A Scorable account
A website where the chatbot will be embedded
Step 1: Create a Webhook Node in n8n
Open a new workflow canvas in n8n.
Add a Webhook node.
Webhook Settings:
HTTP Method:
POSTWebhook URL Type:
Product URLPath: Copy and paste the last segment of the Product URL
CORS Configuration:
Enable Allowed Origins (CORS)
Add your website domain (e.g.,
https://yourwebsite.com)
Step 2: Create a Judge on Scorable
Create a Judge on Scorable and define the chatbot's scope, tone of voice, and evaluation rules.
After creation, copy the following values:
Judge ID
API Key
Step 3: Configure the HTTP Request Node
Add an HTTP Request node in n8n.
Basic Configuration:
Method:
POSTURL:
(Replace
JUDGE_IDwith your own judge ID)
Headers:
Enable Send Headers and add:
Content-Type
application/json
authorization
Api-Key YOUR_API_KEY
Step 4: Configure the Request Body
Enable Send Body and configure the request as JSON.
Step 5: Respond to the Webhook
Add a Respond to Webhook node.
Response Body:
Response Headers:
Content-Type
application/json
Final Result
The n8n workflow will now handle user messages, send them to Scorable for evaluation and refinement, and return only the approved responses.
Last updated