
Webhook Trigger
The workflow starts when Lovable sends a POST request to the n8n MCP webhook with a job description and one or more resumes (text or files).
Preprocessing & Validation
The job description and resume text are cleaned, truncated to safe token limits, and validated to ensure required inputs are present.
AI Agent Evaluation (Gemini)
Each resume is sent to the Gemini AI agent with a strict JSON-only prompt.
The agent returns a structured evaluation including fit score, summary, matched skills, mismatches, and a recommended action.
Structured Output Parsing
n8n parses and validates the AI response to ensure schema correctness before any downstream action is taken.
Decision Logic (Human-in-the-Loop)
Based on the recommended action:
Response to Frontend
The final structured results are returned to Lovable, enabling a fully clickable UI showing rankings, insights, and next steps.
n8n orchestrates input ingestion, AI evaluation, decision logic, and optional automation—turning raw resumes into structured hiring insights with human control at every step.