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

  1. Open a new workflow canvas in n8n.

  2. Add a Webhook node.

Webhook Settings:

  • HTTP Method: POST

  • Webhook URL Type: Product URL

  • Path: 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.

scorableai

After creation, copy the following values:

  • Judge ID

  • API Key

kod

Step 3: Configure the HTTP Request Node

Add an HTTP Request node in n8n.

req

Basic Configuration:

  • Method: POST

  • URL:

    (Replace JUDGE_ID with your own judge ID)

Headers:

Enable Send Headers and add:

Name
Value

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:

Name
Value

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.

flow end

Last updated