An intelligent, fully automated HR screening pipeline built on n8n - powered by OpenAI GPT-4, Gmail, Google Sheets, and Google Calendar. Screens CVs, routes candidates, handles follow-ups, and ranks shortlisted applicants - all without human intervention.
Developed as a 4th Semester Artificial Intelligence Lab project, this system automates the entire candidate screening pipeline - from CV submission to interview booking - using a multi-workflow n8n agent system backed by GPT-4. Traditional HR screening is slow, inconsistent, and expensive; this project eliminates those bottlenecks end-to-end.
The system handles:
- Receiving and parsing CVs via webhook
- Validating completeness and routing by job role
- Emailing candidates for missing information
- Shortlisting, rejecting, or flagging for manual review
- Listening for candidate replies and re-evaluating updated CVs
- Ranking all shortlisted candidates every 6 hours via a scheduled engine
The pipeline is split into 3 interconnected workflows:
[CV Upload Webhook]
β
βΌ
βββββββββββββββββββββββββββββββββββ
β WORKFLOW 1 - CV Intake & β
β Role Router β
β β
β β’ Extracts & validates CV text β
β β’ GPT-4 completeness check β
β β’ Decision: Shortlist / β
β Reject / Review / Follow-Up β
β β’ Books interview via Calendar β
β β’ Sends Gmail notifications β
β β’ Logs all results to Sheets β
ββββββββββββββ¬βββββββββββββββββββββ
β triggers
βΌ
βββββββββββββββββββββββββββββββββββ
β WORKFLOW 3 - AI Ranking Engine β
β β
β β’ Runs every 6 hours β
β β’ Fetches all shortlisted CVs β
β β’ GPT-4 comparative ranking β
β β’ Writes fresh rankings to β
β Google Sheets β
βββββββββββββββββββββββββββββββββββ
[Gmail Reply Trigger] βββΊ WORKFLOW 2 - Follow-Up Listener
β’ Watches for candidate email replies
β’ Re-evaluates with updated CV
β’ Updates Sheets: Pending β Resolved
β’ Re-routes through decision pipeline
Trigger: Webhook (CV file upload)
| Node | Purpose |
|---|---|
| Webhook - CV Upload | Receives incoming CV submissions |
| Validate Input & Extract Metadata | Sanitises input, extracts file metadata |
| Extract CV Text | Parses PDF/DOCX into plain text |
| CV Completeness Analyzer | Checks for required fields (education, experience, skills) |
| Message a model (GPT-4) | AI screening against job role requirements |
| Decision Router | Routes to: Shortlist / Reject / Review / Follow-Up |
| Calendar: Book Interview | Auto-books slot for shortlisted candidates |
| Email: Interview Invitation | Sends personalised invite via Gmail |
| Email: Polite Rejection | Sends rejection email |
| Email: Request Missing Info | Requests incomplete data from candidate |
| Sheets: Log * | Logs all outcomes to respective Google Sheets tabs |
| Trigger Ranking Engine | Calls Workflow 3 after shortlisting |
Trigger: Gmail Watch (incoming candidate reply)
| Node | Purpose |
|---|---|
| Gmail: Watch Candidate Replies | Listens for replies to screening emails |
| Extract Reply & Session Context | Parses reply content and session ID |
| Sheets: Find Pending Application | Looks up original candidate record |
| Merge Reply with Original Context | Combines original CV + new reply |
| Has Updated CV? | Checks if candidate attached a new CV |
| Extract Updated CV Text | Parses new CV if attached |
| Message a model (GPT-4) | Re-evaluates candidate with updated info |
| Parse Re-Evaluation Result | Structures AI output |
| Sheets: Update Pending β Resolved | Updates application status |
| Send to Decision Pipeline | Re-routes through Workflow 1 logic |
Trigger: Schedule (every 6 hours) + Sub-workflow call
| Node | Purpose |
|---|---|
| Schedule: Run Every 6 Hours | Periodic autonomous trigger |
| Sheets: Fetch All Shortlisted | Pulls all shortlisted candidates |
| Group & Prepare Candidates | Batches candidates per job role |
| Message a model (GPT-4) | Comparative ranking with scoring rationale |
| Parse & Flatten Rankings | Structures ranking output |
| Sheets: Clear Old Rankings | Removes stale rankings |
| Sheets: Write Fresh Rankings | Writes updated ranked list |
| Layer | Technology |
|---|---|
| Workflow Automation | n8n (self-hosted or cloud) |
| AI / LLM | OpenAI GPT-4 |
| Gmail (via Google OAuth) | |
| Database | Google Sheets |
| Scheduling | Google Calendar + n8n Scheduler |
| CV Parsing | n8n Extract from File node |
| Trigger | n8n Webhook |
- n8n instance (self-hosted or n8n Cloud)
- OpenAI API key (GPT-4 access)
- Google account with Gmail, Sheets, and Calendar APIs enabled
- Google OAuth credentials configured in n8n
git clone https://github.com/OwaisTanoli71/ai-hr-screening-agent.git- Open your n8n instance
- Go to Workflows β Import from file
- Import in this order:
WORKFLOW 3 - AI Candidate Ranking Engine.json(import first - others call it)WORKFLOW 2 - Multi-Step Agent_ Follow-Up Listener & Re-Evaluator.jsonWORKFLOW 1 - CV Intake & Role Router.json
In n8n, set up the following credentials:
| Credential | Used In |
|---|---|
| OpenAI API Key | All 3 workflows |
| Google OAuth (Gmail) | Workflow 1, 2 |
| Google OAuth (Sheets) | Workflow 1, 2, 3 |
| Google OAuth (Calendar) | Workflow 1 |
Create a Google Sheet with the following tabs:
| Tab Name | Purpose |
|---|---|
Shortlisted |
Candidates approved for interview |
Rejected |
Declined applications |
For Review |
Flagged for manual HR review |
Pending Follow-Up |
Awaiting candidate response |
Rankings |
AI-generated ranked candidate list |
- Activate Workflow 3 first
- Activate Workflow 2
- Activate Workflow 1 last
- Copy the webhook URL from Workflow 1 - this is your CV submission endpoint
ai-hr-screening-agent/
βββ WORKFLOW 1 - CV Intake & Role Router.json
βββ WORKFLOW 2 - Multi-Step Agent_ Follow-Up Listener & Re-Evaluator.json
βββ WORKFLOW 3 - AI Candidate Ranking Engine.json
βββ README.md
Muhammad Owais Arshad
- GitHub: @OwaisTanoli71
Β© 2026 Muhammad Owais Arshad. All rights reserved.
This project was independently conceived and developed as an academic semester project. No part of this project - including workflows, logic, or documentation - may be copied, reused, or redistributed without explicit written permission from the author.
- Abdullah Sajid - Lab Instructor, Artificial Intelligence - for guidance and support throughout this project
- n8n - workflow automation platform
- OpenAI - GPT-4 language model