π¬ Score client toxicity from form submissions with GPT-4o Mini and n8n Forms
β‘ 13 views Β· π¬ Document Extraction & Analysis
Description
Quick Overview
This workflow collects a clientβs message via an n8n Form, analyzes it with OpenAI (GPT-4o Mini) to score toxicity and identify warning signs, then generates a styled HTML report showing the score, verdict, flags, and protection tips on the form completion page.
How it works
- Receives a client message or project brief through an n8n Form submission.
- Sends the text to OpenAI (GPT-4o Mini) to return strict JSON containing a 0β100 toxicity score, a verdict, red/yellow/green flags, and protection tips.
- Parses the AIβs JSON and renders a formatted HTML report with color-coded sections and an overall verdict.
- Displays the generated report directly on the n8n Form completion page.
Setup
- Add an OpenAI API credential and select it in the GPT-4o Mini node.
- Activate the workflow and open the formβs Production URL from the Form Trigger.
- (Optional) Customize the analysis prompt, verdict thresholds, or the HTML styling in the code step to match your criteria.
π Nodes Used
Basic LLM Chain, OpenAI Chat Model, n8n Form Trigger, n8n Form
π₯ Import
Download workflow.json and import into n8n:
Workflow menu β Import from File