AI Recruitment Assistant for ERPNext using n8n & Gemini
Integrates with:
Overview
Unlock Automated Candidate Screening with this AI Agent
This AI-driven n8n workflow revolutionizes your recruitment process by integrating directly with ERPNext. When a new candidate applies for a job, this agent automatically springs into action. It fetches the applicant's details, downloads their resume (currently optimized for PDF, but easily extendable for other formats like .doc or .jpg by adding relevant text extraction nodes), and then employs Google Gemini's powerful language model to perform an in-depth analysis. The AI meticulously compares the resume content against the specific job description, assessing skills, experience, and overall fit.
Key Features & Benefits
- Seamless ERPNext Integration: Triggers on new job applications in ERPNext and updates applicant records with AI insights (fit level, score, rating, justification).
- AI-Powered Resume Analysis: Leverages Google Gemini to score candidates, determine fit level (Strong, Moderate, Weak), provide a star rating, and generate a detailed justification for its assessment.
- Intelligent Document Processing: Extracts text from PDF resumes. The workflow structure allows easy addition of nodes for other file types (e.g., Word, images via OCR).
- Automated Candidate Status Updates: Automatically changes an applicant's status in ERPNext to 'Accepted' or 'Rejected' based on a configurable AI-generated score threshold.
- Configurable AI Behavior: The prompt for the Google Gemini AI agent is fully customizable, allowing you to define specific evaluation criteria, keywords, and the desired output format.
- Error & Edge Case Handling: Includes logic to manage scenarios such as applications without resumes or those not linked to a specific job opening, updating ERPNext status accordingly (e.g., 'Rejected', 'Hold').
- Extensible Notifications: Placeholder nodes for Microsoft Outlook and WhatsApp allow you to easily add automated notifications to applicants about their status.
- Time & Cost Savings: Significantly reduces manual screening time, allowing your HR team to focus on qualified candidates and strategic hiring.
Use Cases
- Automatically screen new job applicants logged in ERPNext.
- Accelerate time-to-hire by shortlisting relevant candidates faster using AI.
- Provide consistent, AI-driven initial assessment of resumes against job descriptions.
- Reduce manual effort in resume review and data entry for HR teams within ERPNext.
- Enrich ERPNext applicant profiles with AI-generated scores, fit levels, and justifications.
Prerequisites
- An n8n instance (Cloud or self-hosted).
- ERPNext instance with REST API access (API Key and API Secret for an ERPNext user with appropriate permissions for Job Applicant and Job Opening doctypes).
- Google Gemini API Key with access to a suitable model (e.g.,
gemini-2.0-flash-exp
or similar). - A Webhook configured in ERPNext on the 'Job Applicant' DocType, set to trigger 'on_submit' or 'after_insert', pointing to the n8n Webhook URL.
- Custom fields in ERPNext's 'Job Applicant' DocType:
custom_justification_by_ai
(Type: Long Text or Text Editor),custom_fit_level
(Type: Data or Select),custom_score
(Type: Int or Data). The standardapplicant_rating
field (Type: Rating) is also used. - (Optional) Credentials for Microsoft Outlook (OAuth2) and WhatsApp Business Cloud API if using the notification steps.
Setup Instructions
- Download the n8n workflow JSON file.
- Import the workflow into your n8n instance.
- Webhook Configuration:
- The 'Webhook' node has a pre-configured path (e.g.,
syncbricks-com-tutorial-candidate-shortlist
). Copy the full Test URL from this node after activating it once. - In ERPNext, create a new Webhook (Setup > Integrations > Webhook). Set 'Webhook Doctype' to 'Job Applicant', 'Webhook Event' to 'After Insert' (or 'On Submit' depending on your ERPNext version and preference). Paste the n8n Webhook URL into the 'Request URL' field. Ensure 'Request Structure' is JSON. Send a test event from ERPNext by creating/saving a Job Applicant, then Pin the data in the n8n Webhook node.
- The 'Webhook' node has a pre-configured path (e.g.,
- ERPNext Credentials & Node Configuration:
- Create or select your ERPNext API credentials in n8n.
- Assign these credentials to the 'ERPNext - Reject if Resume not Attached', 'ERPNext - Hold Applicant', and 'Get Job Opening' nodes.
- For the HTTP Request nodes ('Update Applicant Data', 'Reject Applicant', 'Accept Applicant'), select your ERPNext API credential under 'Authentication' (Predefined Credential Type: ERPNext API). Update the base URL in these nodes (e.g.,
https://YOUR_ERP_DOMAIN/api/resource/...
) to match your ERPNext instance.
- Google Gemini Configuration: In the 'Google Gemini Chat Model' node, select or create your Google Gemini API credentials and enter your API Key. Choose an appropriate model like
models/gemini-2.0-flash-exp
. - AI Agent Prompt: Review the prompt in the 'Recruitment AI Agent' (Langchain Agent) node. Customize the system prompt, particularly the input variables for Job Description and Resume Text, and the desired output format (FitLevel, Score, Rating, Justification), if needed.
- ERPNext Custom Fields: Ensure the custom fields mentioned in 'Prerequisites' are created in your ERPNext 'Job Applicant' DocType. These fields will store the AI's analysis.
- File Handling Logic: The workflow uses a 'Switch' node ('File Type') to route based on resume file extension. It's pre-configured for PDF resumes using the 'PDF to Text' node. To support other formats (e.g., .doc, .docx, .txt, image files via OCR):
- Add new outputs to the 'File Type' switch node for each new extension.
- Connect these new outputs to appropriate 'Extract from File' nodes or other services for text extraction.
- Ensure the output of these new extraction paths feeds into the 'Merge1' node correctly.
- (Optional) Notifications: If you wish to use email or WhatsApp notifications:
- Configure the 'Microsoft Outlook' node with your Outlook credentials and customize the email content.
- Configure the 'WhatsApp Business Cloud' node with your WhatsApp API credentials and customize the message template.
- Test Thoroughly: Create a test Job Opening in ERPNext. Apply for this job with a sample PDF resume to trigger the workflow. Verify data flow through n8n and check that the Job Applicant record in ERPNext is updated correctly with AI analysis and status changes.
- Activate Workflow: Once testing is successful, activate the workflow in n8n to process live job applications.
Want your own unique AI agent?
Talk to us - we know how to build custom AI agents for your specific needs.
Schedule a Consultation