Automating Candidate Shortlisting with n8n & ERPNext Integration

This workflow automates candidate shortlisting by integrating ERPNext with n8n and AI agents, eliminating manual resume reviews. It uses smart AI scoring to accept or reject applicants, saving hours in recruitment processes.
erpNext
agent
httpRequest
+9
Learn how to Build this Workflow with AI:
Workflow Identifier: 1059
NODES in Use: Sticky Note, Code, Set, ERPNext, If, Switch, HTTP Request, Extract From File, Langchain Agent, Microsoft Outlook, WhatsApp, Webhook

Press CTRL+F5 if the workflow didn't load.

Visit through Desktop for Best experience

Opening Problem Statement

Meet Amjid Ali, a recruitment specialist managing hiring through ERPNext. Every day, he wastes countless hours manually sorting through job applicants’ resumes to find suitable candidates. Many resumes are missing or not properly linked, causing frustrating delays and errors. Amjid’s team struggles with inconsistent candidate evaluations, leading to slow hiring decisions and potential loss of top talent. This specific challenge of manually handling job applications and resume screening not only consumes time but also risks poor recruitment quality and operational bottlenecks.

Amjid needs a solution that automatically evaluates each job application based on the attached resume, matches candidates against job descriptions, and updates their status without manual intervention. This automation must also notify candidates about their application outcome reliably via email or WhatsApp, ensuring professional communication.

What This Automation Does

This n8n workflow automates the entire candidate shortlisting process connected with ERPNext recruitment module.

  • ✅ Automatically receives job applicant data via a webhook triggered on new applications entry in ERPNext.
  • ✅ Validates if a resume attachment exists and if the application targets a specific job opening.
  • ✅ Downloads the applicant’s resume (PDF only supported in current config), converts it from PDF to text for processing.
  • ✅ Uses an AI agent (Google Gemini Langchain) to analyze and score the candidate fit against the job description.
  • ✅ Converts AI output into structured ERPNext fields (fit_level, score, rating, justification).
  • ✅ Automatically updates candidate status in ERPNext (Accepted, Rejected, Hold) based on AI scoring rule (score threshold 80).
  • ✅ Sends notification to applicants via Microsoft Outlook email or WhatsApp Business Cloud messaging based on their status.

This automation can save hours of manual screening daily, reduce human bias and errors, improve candidate experience, and maintain smooth recruitment operations with real-time updates.

Prerequisites ⚙️

  • n8n account with access to use persistent workflows 🔑
  • ERPNext account with API access configured for Job Applicant and Job Opening DocTypes 🔐
  • Google Gemini (PaLM) API account for AI recruitment agent integration 🔌
  • Microsoft Outlook account enabled for sending notification emails 📧
  • WhatsApp Business Cloud API credentials for candidate WhatsApp messaging 💬
  • Basic understanding of webhooks to receive ERPNext application events ⏱️
  • Optional: Self-host n8n to better manage workflow privacy and performance (https://buldrr.com/hostinger)

Step-by-Step Guide

1. Create Webhook to Receive Job Applications

Navigate to ERPNext Admin → Webhooks → Create a webhook on Job Applicant DocType with the trigger on insert event. Set the webhook to POST job application data to the n8n webhook URL /syncbricks-com-tutorial-candidate-shortlist. Test triggering the webhook and pin it in n8n Webhook node for live use.

Visual: You should see incoming JSON data with applicant details when testing. Common mistake is forgetting to pin webhook after test, causing no real-time triggers.

2. Extract Application Data Using Code and Set Nodes

Use the Code Node to add or initialize any required custom fields on the incoming data. Then the Set Node named ApplicantData extracts the body property from webhook JSON input for easier referencing downstream.

3. Validate Resume Link and Job Opening

Use the If Node Resume Link Provided to check if the resume link starts with “http”. Next, If Node Applied Against Job verifies if the application is for a specific job opening (not “None”).

If either check fails, use ERPNext nodes to update the status to Rejected or Hold respectively.

4. Download and Convert Resume File

Use the Switch Node File Type to route based on file extension. This workflow currently supports only PDFs. For PDFs, the HTTP Request Node downloads the resume file URL, followed by the Extract From File Node to convert the PDF contents into text.

Visual: You should see text extracted from the PDF if successful. Common errors include unsupported file types or inaccessible URLs.

5. Fetch Job Opening Details from ERPNext

Use the ERPNext Get Node Get Job Opening to retrieve job description by referencing the job opening name from the applicant data. This description will be used as a reference for AI analysis.

6. AI Recruiter Agent Analysis

Pass the extracted job description and resume text to the Google Gemini Chat Model Node linked to Recruitment AI Agent. This AI compares skills, experience, and fit, then outputs a structured text response with fit level, score, rating, and justification following the defined prompt instructions.

7. Parse AI Output to Structured Fields

Use the Code Node Convert to Fields to extract values from the AI text output using JavaScript regex and create ERPNext-compatible fields: fit_level, score, applicant_rating, and justification_by_ai.

// Input text from the AI output
const textOutput = $json.output || '';

function extractFields(text) {
  const fields = {};
  const fitLevelMatch = text.match(/FitLevel:s*(.+)n/);
  const scoreMatch = text.match(/Score:s*(d+)n/);
  const ratingMatch = text.match(/Rating:s*(d+)n/);
  const justificationMatch = text.match(/Justification:s*([sS]+)/);
  fields.fit_level = fitLevelMatch ? fitLevelMatch[1].trim() : null;
  fields.score = scoreMatch ? scoreMatch[1].trim() : null;
  fields.applicant_rating = ratingMatch ? ratingMatch[1].trim() : null;
  fields.justification_by_ai = justificationMatch ? justificationMatch[1].trim() : null;
  return fields;
}

return { json: extractFields(textOutput) };

8. Update Applicant Data in ERPNext

Use the HTTP Request Node Update Applicant Data to PUT updated fields back to ERPNext for the specific Job Applicant document, updating AI-based fit level, score, and justification fields.

9. Decide Candidate Status Based on Score

Add an If Node If score less than 80 to check the numeric score. If score is below 80, use the Reject Applicant HTTP request node to update ERPNext status to “Rejected” and send notification email. If 80 or above, use Accept Applicant node to mark status “Accepted” and notify via WhatsApp.

10. Notify Applicant via Email or WhatsApp

Upon status update, the workflow sends notifications using either Microsoft Outlook Node for email notifications or WhatsApp Business Cloud Node for instant WhatsApp messages, ensuring candidates are informed promptly.

Customizations ✏️

  1. Support More Resume Formats: Add handlers for DOC, JPG resume attachments by extending File Type Switch node and adding corresponding conversion nodes like OCR for images.
  2. Custom AI Scoring Thresholds: Adjust the score cutoff (currently 80) in the If score less than 80 node to fit your recruitment policy.
  3. Additional Notifications: Extend the notification logic to include SMS or Slack by adding respective nodes and credentials.
  4. Enhance AI Prompts: Modify the prompt in the Recruitment AI Agent node for role-specific evaluation criteria or language preferences.
  5. Applicant Data Enrichment: Add more ERPNext field mappings or enrich AI output with extra metadata for comprehensive candidate profiles.

Troubleshooting 🔧

  • Problem: “Webhook not triggering on new job application”
    Cause: Webhook not pinned or misconfigured path
    Solution: Verify webhook URL path and ensure it’s pinned in n8n.
  • Problem: “Resume file download failed”
    Cause: Invalid or restricted URL in applicant resume link
    Solution: Confirm resume links are accessible and use valid HTTP(S) URLs.
  • Problem: “AI Agent returns incomplete fields”
    Cause: Unexpected AI output format or parsing errors
    Solution: Check AI prompt output format and update regex parsing in Convert to Fields code node.
  • Problem: “ERPNext API update fails with authorization error”
    Cause: Expired or incorrect ERPNext API credentials
    Solution: Reconfigure ERPNext credentials under n8n and verify permissions on Job Applicant DocType.
  • Problem: “Notifications not sent”
    Cause: Invalid Microsoft Outlook or WhatsApp credentials
    Solution: Validate credentials and test sending messages independently using respective nodes.

Pre-Production Checklist ✅

  • Test ERPNext webhook triggers with sample job application insertions.
  • Verify resume links are properly included and accessible.
  • Check that AI agent returns correctly formatted output.
  • Confirm updates to job applicant status and custom fields in ERPNext.
  • Send test notifications via Outlook and WhatsApp.
  • Backup existing ERPNext data before deployment.

Deployment Guide

Activate the workflow in n8n and ensure webhook node is pinned and accessible. Monitor workflow execution logs for any errors and set up alerts if needed. Schedule periodic reviews of API credentials validity and performance metrics.

FAQs

  • Q: Can I use other AI providers instead of Google Gemini?
    A: Yes, n8n supports multiple AI nodes. Adjust prompt and credentials accordingly.
  • Q: Does this workflow consume a lot of API credits?
    A: AI and ERPNext API calls are limited to each job application event, typically low usage per day.
  • Q: Is candidate data safe with n8n integration?
    A: Yes, if self-hosted or secured properly, your data privacy is maintained.
  • Q: Can this handle bulk applications?
    A: Yes, but monitor API rate limits and scale n8n resources accordingly.

Conclusion

By implementing this automation, Amjid Ali successfully eliminated manual resume screening bottlenecks, accelerated candidate shortlisting, and improved consistency in recruitment decisions. This workflow saved several hours weekly and ensured candidates were promptly notified about their application status, enhancing their experience.

Next, you could expand this automation to include onboarding automation, integrate with more advanced document OCR for diverse resume formats, or enrich candidate profiles with social media data for deeper insights. With n8n and ERPNext, your recruitment processes become smarter, faster, and more reliable.

Let’s automate hiring and make recruitment more efficient together!

Related Workflows

Automate Viral UGC Video Creation Using n8n + Degaus (Beginner-Friendly Guide)

Learn how to automate viral UGC video creation using n8n, AI prompts, and Degaus. This beginner-friendly guide shows how to import, configure, and run the workflow without technical complexity.
Form Trigger
Google Sheets
Gmail
+37
Free

AI SEO Blog Writer Automation in n8n (Beginner Guide)

A complete beginner guide to building an AI-powered SEO blog writer automation using n8n.
AI Agent
Google Sheets
httpRequest
+5
Free

Automate CrowdStrike Alerts with VirusTotal, Jira & Slack

This workflow automates processing of CrowdStrike detections by enriching threat data via VirusTotal, creating Jira tickets for incident tracking, and notifying teams on Slack for quick response. Save hours daily by transforming complex threat data into actionable alerts effortlessly.
scheduleTrigger
httpRequest
jira
+5
Free

Automate Telegram Invoices to Notion with AI Summaries & Reports

Save hours on financial tracking by automating invoice extraction from Telegram photos to Notion using Google Gemini AI. This workflow extracts data, records transactions, and generates detailed spending reports with charts sent on schedule via Telegram.
lmChatGoogleGemini
telegramTrigger
notion
+9
Free

Automate Email Replies with n8n and AI-Powered Summarization

Save hours managing your inbox with this n8n workflow that uses IMAP email triggers, AI summarization, and vector search to draft concise replies requiring minimal review. Automate business email processing efficiently with AI guidance and Gmail integration.
emailReadImap
vectorStoreQdrant
emailSend
+12
Free

Automate Email Campaigns Using n8n with Gmail & Google Sheets

This n8n workflow automates personalized email outreach campaigns by integrating Gmail and Google Sheets, saving hours of manual follow-up work and reducing errors in email sequences. It ensures timely follow-ups based on previous email interactions, optimizing communication efficiency.
googleSheets
gmail
code
+5
Free