AutomationFlowsAI & RAG › Prompt Qa Lab Openai

Prompt Qa Lab Openai

prompt-qa-lab-openai. Uses lmChatOpenAi, slack. Webhook trigger; 7 nodes.

Webhook trigger★★★★☆ complexityAI-powered7 nodesOpenAI ChatSlack
AI & RAG Trigger: Webhook Nodes: 7 Complexity: ★★★★☆ AI nodes: yes Added:

This workflow follows the OpenAI Chat → Slack recipe pattern — see all workflows that pair these two integrations.

The workflow JSON

Copy or download the full n8n JSON below. Paste it into a new n8n workflow, add your credentials, activate. Full import guide →

Download .json
{
  "name": "prompt-qa-lab-openai",
  "nodes": [
    {
      "id": "a7b8c9d0-0001-4000-8000-000000000001",
      "name": "Webhook Trigger",
      "type": "n8n-nodes-base.webhook",
      "typeVersion": 2,
      "position": [
        0,
        300
      ],
      "parameters": {
        "httpMethod": "POST",
        "path": "prompt-qa-lab",
        "responseMode": "onReceived",
        "options": {}
      }
    },
    {
      "id": "a7b8c9d0-0002-4000-8000-000000000002",
      "name": "Run Prompt: GPT-4o",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "typeVersion": 1,
      "position": [
        220,
        160
      ],
      "parameters": {
        "model": "gpt-4o",
        "messages": {
          "values": [
            {
              "role": "system",
              "content": "={{ $json.system_prompt }}"
            },
            {
              "role": "user",
              "content": "={{ $json.user_input }}"
            }
          ]
        }
      },
      "credentials": {
        "openAiApi": {
          "name": "<your credential>"
        }
      }
    },
    {
      "id": "a7b8c9d0-0003-4000-8000-000000000003",
      "name": "Run Prompt: GPT-4o-mini",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "typeVersion": 1,
      "position": [
        220,
        440
      ],
      "parameters": {
        "model": "gpt-4o-mini",
        "messages": {
          "values": [
            {
              "role": "system",
              "content": "={{ $('Webhook Trigger').item.json.system_prompt }}"
            },
            {
              "role": "user",
              "content": "={{ $('Webhook Trigger').item.json.user_input }}"
            }
          ]
        }
      },
      "credentials": {
        "openAiApi": {
          "name": "<your credential>"
        }
      }
    },
    {
      "id": "a7b8c9d0-0004-4000-8000-000000000004",
      "name": "Collect Outputs",
      "type": "n8n-nodes-base.set",
      "typeVersion": 3,
      "position": [
        440,
        300
      ],
      "parameters": {
        "mode": "manual",
        "fields": {
          "values": [
            {
              "name": "prompt_label",
              "type": "expression",
              "value": "={{ $('Webhook Trigger').item.json.prompt_label }}"
            },
            {
              "name": "system_prompt",
              "type": "expression",
              "value": "={{ $('Webhook Trigger').item.json.system_prompt }}"
            },
            {
              "name": "user_input",
              "type": "expression",
              "value": "={{ $('Webhook Trigger').item.json.user_input }}"
            },
            {
              "name": "rubric",
              "type": "expression",
              "value": "={{ $('Webhook Trigger').item.json.rubric }}"
            },
            {
              "name": "output_gpt4o",
              "type": "expression",
              "value": "={{ $('Run Prompt: GPT-4o').item.json.message.content }}"
            },
            {
              "name": "output_gpt4o_mini",
              "type": "expression",
              "value": "={{ $('Run Prompt: GPT-4o-mini').item.json.message.content }}"
            }
          ]
        }
      }
    },
    {
      "id": "a7b8c9d0-0005-4000-8000-000000000005",
      "name": "Score Outputs",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "typeVersion": 1,
      "position": [
        660,
        300
      ],
      "parameters": {
        "model": "gpt-4o",
        "messages": {
          "values": [
            {
              "role": "system",
              "content": "You are a prompt quality evaluator. Score two model outputs against a rubric. Return ONLY valid JSON:\n{\n  \"scores\": {\n    \"gpt_4o\": {\"score\": 8, \"rationale\": \"one sentence\"},\n    \"gpt_4o_mini\": {\"score\": 6, \"rationale\": \"one sentence\"}\n  },\n  \"winner\": \"gpt_4o\",\n  \"recommendation\": \"one sentence on which model to use and why\"\n}"
            },
            {
              "role": "user",
              "content": "Rubric: {{ $json.rubric }}\n\nOutput A (gpt-4o):\n{{ $json.output_gpt4o }}\n\nOutput B (gpt-4o-mini):\n{{ $json.output_gpt4o_mini }}"
            }
          ]
        }
      },
      "credentials": {
        "openAiApi": {
          "name": "<your credential>"
        }
      }
    },
    {
      "id": "a7b8c9d0-0006-4000-8000-000000000006",
      "name": "Build Report",
      "type": "n8n-nodes-base.set",
      "typeVersion": 3,
      "position": [
        880,
        300
      ],
      "parameters": {
        "mode": "manual",
        "fields": {
          "values": [
            {
              "name": "report",
              "type": "expression",
              "value": "={{ JSON.parse($json.message.content) }}"
            },
            {
              "name": "prompt_label",
              "type": "expression",
              "value": "={{ $('Collect Outputs').item.json.prompt_label }}"
            },
            {
              "name": "output_gpt4o",
              "type": "expression",
              "value": "={{ $('Collect Outputs').item.json.output_gpt4o }}"
            },
            {
              "name": "output_gpt4o_mini",
              "type": "expression",
              "value": "={{ $('Collect Outputs').item.json.output_gpt4o_mini }}"
            }
          ]
        }
      }
    },
    {
      "id": "a7b8c9d0-0007-4000-8000-000000000007",
      "name": "Post Results to Slack",
      "type": "n8n-nodes-base.slack",
      "typeVersion": 2,
      "position": [
        1100,
        300
      ],
      "parameters": {
        "operation": "post",
        "select": "channel",
        "channelId": {
          "value": "#prompt-lab"
        },
        "text": "Prompt QA Results: {{ $json.prompt_label }}\n\nGPT-4o: {{ $json.report.scores.gpt_4o.score }}/10 - {{ $json.report.scores.gpt_4o.rationale }}\nGPT-4o-mini: {{ $json.report.scores.gpt_4o_mini.score }}/10 - {{ $json.report.scores.gpt_4o_mini.rationale }}\n\nWinner: {{ $json.report.winner }}\nRecommendation: {{ $json.report.recommendation }}",
        "otherOptions": {}
      },
      "credentials": {
        "slackApi": {
          "name": "<your credential>"
        }
      }
    }
  ],
  "connections": {
    "Webhook Trigger": {
      "main": [
        [
          {
            "node": "Run Prompt: GPT-4o",
            "type": "main",
            "index": 0
          },
          {
            "node": "Run Prompt: GPT-4o-mini",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Run Prompt: GPT-4o": {
      "main": [
        [
          {
            "node": "Collect Outputs",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Run Prompt: GPT-4o-mini": {
      "main": [
        [
          {
            "node": "Collect Outputs",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Collect Outputs": {
      "main": [
        [
          {
            "node": "Score Outputs",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Score Outputs": {
      "main": [
        [
          {
            "node": "Build Report",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Build Report": {
      "main": [
        [
          {
            "node": "Post Results to Slack",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  },
  "settings": {
    "executionOrder": "v1"
  },
  "staticData": null,
  "tags": [],
  "triggerCount": 1,
  "updatedAt": "2026-05-17T00:00:00.000Z",
  "versionId": "v1"
}

Credentials you'll need

Each integration node will prompt for credentials when you import. We strip credential IDs before publishing — you'll add your own.

Pro

For the full experience including quality scoring and batch install features for each workflow upgrade to Pro

About this workflow

prompt-qa-lab-openai. Uses lmChatOpenAi, slack. Webhook trigger; 7 nodes.

Source: https://github.com/sondersos/n8n-workflows/blob/main/workflows/05-prompt-qa-lab/prompt-qa-lab-openai.json — original creator credit. Request a take-down →

More AI & RAG workflows → · Browse all categories →

Related workflows

Workflows that share integrations, category, or trigger type with this one. All free to copy and import.

AI & RAG

cold-outbound-engine-openai. Uses httpRequest, lmChatOpenAi, airtable, slack. Webhook trigger; 10 nodes.

HTTP Request, OpenAI Chat, Airtable +1
AI & RAG

meeting-intelligence-openai. Uses lmChatOpenAi, notion, slack. Webhook trigger; 6 nodes.

OpenAI Chat, Notion, Slack
AI & RAG

proposal-assistant-openai. Uses lmChatOpenAi, googleDrive, slack. Webhook trigger; 5 nodes.

OpenAI Chat, Google Drive, Slack
AI & RAG

strategy-generator-openai. Uses lmChatOpenAi, notion, slack. Webhook trigger; 5 nodes.

OpenAI Chat, Notion, Slack
AI & RAG

The Ultimate Scraper for n8n uses Selenium and AI to retrieve any information displayed on a webpage. You can also use session cookies to log in to the targeted webpage for more advanced scraping need

OpenAI Chat, HTTP Request, Information Extractor +1