AI Recruitment Agent for ERPNext using Google Gemini
Integrates with:
Overview
Overview
This n8n AI Agent revolutionizes your recruitment process by automating the initial screening of job applicants within ERPNext. Triggered by a new application, it intelligently fetches the candidate's resume (primarily PDF) and the corresponding job description. Using Google Gemini, the AI Agent performs a sophisticated analysis, comparing the resume against the job requirements to assess skills, experience, and overall fit. It then assigns a fit level, score, rating, and provides a detailed justification. This rich assessment data, along with an updated applicant status (e.g., Accepted, Rejected, Hold), is seamlessly pushed back to ERPNext. The workflow can also be configured to notify candidates via email or WhatsApp.
This AI-driven automation empowers your HR team to focus on qualified candidates, significantly reducing manual screening time and improving hiring efficiency.
Key Features & Benefits
- Seamless ERPNext Integration: Triggers on new job applicants, fetches necessary data (resumes, job descriptions), and updates applicant records with AI assessment and status.
- AI-Powered Candidate Screening: Leverages Google Gemini (via a Langchain Agent node) for in-depth analysis of resumes against job descriptions.
- Automated Scoring & Justification: Generates a fit level (e.g., Strong, Moderate, Weak), a numerical score, a star rating, and a textual justification for each candidate's assessment.
- Efficient Resume Processing: Downloads resumes from links and extracts text (current focus on PDF, adaptable for other formats like DOCX, TXT using different extractor nodes).
- Conditional Workflow Logic: Includes steps to validate resume presence and job opening linkage, automatically rejecting or holding applicants if prerequisites aren't met.
- Customizable AI Behavior: The AI's analysis criteria and output format can be fine-tuned by adjusting the prompt within the 'Recruitment AI Agent' node.
- Automated ERPNext Updates: Updates candidate status (e.g., Accepted, Rejected) and populates custom fields in ERPNext with AI-generated scores and justifications.
- Optional Candidate Notifications: Includes pathways to notify applicants about their status via Microsoft Outlook (email) or WhatsApp.
Use Cases
- Automating the initial screening of job applications submitted through ERPNext.
- AI-driven shortlisting of candidates based on how well their resume matches the job description.
- Significantly reducing manual effort and time spent on reviewing large volumes of applications.
- Providing consistent, AI-generated scores and justifications for screening decisions to ensure fairness.
- Streamlining the candidate status update process within ERPNext based on AI evaluation.
- Automatically notifying candidates about their application status.
Prerequisites
- An n8n instance (Cloud or self-hosted).
- ERPNext instance with REST API enabled.
- ERPNext API credentials (API Key and Secret or Token) with permissions to read Job Applicant, Job Opening, and update Job Applicant records.
- Custom fields in ERPNext 'Job Applicant' DocType for:
custom_justification_by_ai
(Text/Small Text),custom_fit_level
(Data/Select),custom_score
(Int/Data).applicant_rating
(Rating) is usually standard. - Google Cloud Project with the Vertex AI API enabled and a Google Gemini API Key or appropriate service account credentials.
- (Optional) Microsoft Outlook account and credentials (OAuth2 recommended) if using email notifications.
- (Optional) WhatsApp Business Cloud account, Phone Number ID, and Permanent Access Token if using WhatsApp notifications.
Setup Instructions
- Download the n8n workflow JSON file.
- Import the workflow into your n8n instance.
- Configure ERPNext Webhook: In the 'Webhook' node, copy the Test URL. In your ERPNext instance, navigate to 'Webhook' list, create a new Webhook for the 'Job Applicant' DocType, set 'Webhook Event' to 'on_insert' (or 'on_submit' depending on your process). Paste the n8n Test URL into the 'Request URL' field. Save and enable the webhook. Create a test Job Applicant in ERPNext to trigger the webhook and pin the data in the n8n Webhook node.
- Configure ERPNext Credentials: For all 'ERPNext' nodes (e.g., 'Get Job Opening', 'ERPNext - Reject if Resume not Attached') and 'HTTP Request' nodes that interact with ERPNext (e.g., 'Update Applicant Data'), select or create your ERPNext API credentials. Ensure the ERPNext instance URL in the HTTP Request nodes (e.g.,
https://your.erpnext.com/api/resource/...
) is correct. - Configure Google Gemini: In the 'Google Gemini Chat Model' node, select or create your Google Gemini API credentials.
- Review AI Prompt: In the 'Recruitment AI Agent' node (Langchain Agent), carefully review the
text
parameter. This is the system prompt that instructs the AI. Customize it if you need to adjust the analysis focus, scoring criteria, or output format expectations. - Resume Handling: The 'Download PDF Resume' node fetches resumes via a URL. Ensure your ERPNext setup (or the webhook payload) provides a direct, publicly accessible download link for resumes in the
body.resume_link
field. The 'PDF to Text' node extracts text. You can extend file type support by adding other 'Extract from File' nodes and routing via the 'File Type' Switch node. - Field Mapping for ERPNext Update: The 'Convert to Fields' Code node parses the AI's output. Verify that the JSON fields it produces (e.g.,
fit_level
,score
,applicant_rating
,justification_by_ai
) correctly map to your custom field names in the ERPNext 'Job Applicant' DocType used in the 'Update Applicant Data' HTTP Request node. Create these custom fields in ERPNext if they don't exist (see Prerequisites). - Configure Score-based Decision: In the 'If score less than 80' node, adjust the threshold (default 80) for accepting or rejecting candidates based on the AI's score.
- (Optional) Configure Notifications: If using, configure the 'Microsoft Outlook' and/or 'WhatsApp Business Cloud' nodes with your respective credentials and customize the message content.
- Test the entire workflow thoroughly with various sample job applications.
- Activate the workflow.
Want your own unique AI agent?
Talk to us - we know how to build custom AI agents for your specific needs.
Schedule a Consultation