AI Recruiter and Multi-CV Analysis using GPT-4o-mini - n8n Workflow

Deploy an advanced n8n workflow for HR automation. This n8n template uses a specialized AI Recruiter Agent with OpenAI GPT-4o-mini to analyze multiple CVs against a Job Description, providing structured fit scores and recommendations via a robust n8n trigger.

Workflow Preview

Ready to automate?

Download this n8n workflow template and start using it instantly.

Who is this best for?


  • HR Professionals and Recruiters: Seeking to automate the initial screening phase.

  • Automation Engineers: Looking for advanced n8n templates involving complex AI agents and structured JSON outputs.

  • Technical Leaders: Needing a custom n8n workflow to handle file processing (PDF extraction) and LLM logic.

  • Users of n8n: Interested in seeing how to combine file handling, custom code, and LangChain agents in a single n8n node flow.

Overview

Manually screening dozens of resumes against a specific Job Description (JD) is time-consuming and prone to human bias. This comprehensive n8n workflow solves this challenge by leveraging advanced AI automation capabilities. The process begins with an external n8n trigger (a Webhook) receiving the JD and multiple CVs (often PDF files). The flow meticulously handles file extraction, even attempting to distinguish between text-based and scanned PDFs. The extracted content is then passed to a highly-configured AI Recruiter Agent, built using the Langchain n8n node. This agent operates on detailed scoring rubrics and role ontologies to generate precise, structured insights, including a percentage fit score, strengths, weaknesses, and a final decision for every candidate. This robust n8n workflow provides tremendous value by significantly speeding up the initial screening phase of recruitment, offering a powerful example of advanced n8n templates.

How it Works

The automation begins with the Webhook n8n trigger, which receives the Job Description and base64 encoded CV files via a POST request. The ListFile n8n node parses this payload, separating the JD from the individual CV items. Each CV item then passes through the Detect PDF Type n8n node, which performs a basic check to determine if the PDF contains a readable text layer, influencing the subsequent extraction steps.

CV files are converted from base64 to binary format using the Convert Base64 to Binary n8n node, making them ready for the Extract from File n8n node, which pulls all text content. The ReattachMetadataAfterExtract n8n node enhances this text data by running custom code logic to automatically infer the candidate's name and potential professional role type (e.g., Manager, Technical).

All enriched CV data is aggregated by the CombineCandidatesFor_AI n8n node into a single input array. This array is fed into the core AI Recruiter Agent n8n node. This Langchain n8n node utilizes a precise system prompt—complete with scoring rules, required output JSON format, and anti-leak logic—to compare the JD against all candidates using an OpenAI model (gpt-4o-mini).

Finally, the Parse Recruiter Output custom n8n node cleans the AI’s JSON response, implementing tie-breaker logic to select the best candidate based on multiple criteria (score, domain match, keywords, years of experience). The entire structured result is then returned to the requesting application using the Respond to Webhook n8n node, completing the n8n workflow execution.

Installation Guide


  1. Import the n8n workflow: Copy the provided JSON and import it into your n8n instance using the 'New' button or 'Import from JSON' option.

  2. Setup OpenAI Credentials: Locate the AI Recruiter Agent n8n node and the OpenAI Chat Model n8n node (which serves as the LLM resource). Ensure they are configured with valid OpenAI API credentials that support the GPT models (preferably gpt-4o-mini).

  3. Configure Webhook n8n trigger: The Webhook n8n node is configured on the path /chat-new. After saving the n8n workflow, activate it to obtain the public webhook URL.

  4. Input Structure: The webhook expects a POST request payload containing:

- message (string, the Job Description text).
- files (array of objects, each containing name (filename) and data (base64 encoded file data, typically a PDF CV)).

  1. Review Code Nodes: For localization, review the logic within the custom Code n8n nodes (ReattachMetadataAfter_Extract, Parse Recruiter Output) as they contain Vietnamese string matching and processing logic relevant to the target context.

Node Details

Webhook (n8n trigger):
Function: Starts the n8n workflow by listening for a POST request, providing the endpoint for JD and CV uploads.
Key Configuration: Path is set to chat-new, Method is POST, Response Mode is set to Response Node.
ListFile (Code n8n node):
Function: Parses the incoming Webhook body to separate the Job Description text and extract the base64 data and filenames of all submitted CVs.
Detect PDF Type (Code n8n node):
Function: Analyzes the raw base64 data to determine if the PDF has a text layer or is a scanned image, guiding subsequent extraction.
Convert Base64 to Binary (Code n8n node):
Function: Converts the base64 data into the native binary object format required by file processing n8n nodes.
Extract from File (n8n node):
Function: Extracts the full readable text content from the PDF binary files (the CVs).
Reattach
MetadataAfterExtract (Code n8n node):
Function: Custom logic that uses regex on the extracted text to auto-identify the candidate's name and primary professional role, enriching the data before AI analysis.
AI Recruiter Agent (Langchain Agent n8n node):
Function: The central intelligence of this n8n workflow. It uses GPT-4o-mini with extensive system instructions (ontology, scoring rules) to compare the JD against the consolidated CV data and output a structured JSON evaluation.
Key Configuration: Uses gpt-4o-mini, features a very detailed system message defining classification and scoring logic, ensuring structured output.
Parse Recruiter Output (Code n8n node):
Function: Post-processes the AI's complex JSON output, handles parsing errors, standardizes fields, and executes a tie-breaker algorithm to select the single most qualified candidate. This custom n8n node is vital for flow control.
Respond to Webhook (n8n node):
Function: Sends the final, aggregated, and summarized evaluation back to the client, concluding the execution of the n8n workflow.

Related n8n Workflows

Free

Nodes: 10 Nodes
Updated: December 26 2025
View all
Created by

AI & Automation Developer at SCAVI Vietnam. Building intelligent HR and SAP workflows with n8n, OpenAI, and Supabase to transform business data into smart decisions.