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.