RecruitAI Agent

An end-to-end, AI-powered recruitment assistant that eliminates manual resume screening, reduces bias, and scales hiring operations.


🧠 Inspiration

Every recruiter has felt the pain:

  • Hundreds of resumes pour in for every job posting.
  • 70-80 % are either spam or clearly unqualified.
  • Each resume still requires ~2–3 minutes of human review.
  • Cognitive fatigue and unconscious bias creep in.

We asked ourselves: “What if we could train an AI to do the first pass for us—accurately, fairly, and at any scale?”
RecruitAI Agent was born to reclaim recruiter time and surface only the top candidates for human evaluation.


🚀 What it Does

RecruitAI Agent is zero-touch after initial setup. Every time a candidate hits “submit” on the job application form, the system:

Step Action Tool Used
1 Accepts the application + PDF résumé JotForm
2 Stores résumé in a structured folder tree Google Drive
3 Parses raw text from PDF with OCR fallback n8n “Extract from File” node
4 Runs the résumé through a multi-shot Gemini prompt Google Gemini
5 Filters spam, low-quality, and unqualified apps Conditional logic in n8n
6 Sends personalised emails:
- Reject with constructive feedback
- Shortlist with next-step instructions
Gmail
7 Logs all data in a searchable sheet Google Sheets

🛠️ Architecture & Tech Stack

image

Layer Technology Purpose
Frontend JotForm Branded application form with file upload, conditional questions, and hidden fields (e.g. Job-ID, Source)
Orchestration n8n (self-hosted) Visual workflow engine: triggers, branching, loops, error handling
Storage Google Drive /YYYY/MM/DD/Job-ID/ folder hierarchy, automatic deduplication using SHA-256 checksum
Parsing n8n “Extract from File” (PDF-lib + pdf2pic fallback) Clean text, preserve section order, handle scanned PDFs via OCR
LLM Google Gemini 1.5 Pro Grades résumés across 6 dimensions (skills match, experience depth, education, stability, red-flags, culture fit) and returns JSON
Comms Gmail (OAuth 2.0 + service account) Sends HTML emails with handlebars templating
Logging Google Sheets (batch append) Timestamp, candidate info, Gemini score, decision, email status, recruiter notes

🧗‍♂️ Challenges & How We Solved Them

Challenge Solution
Dirty PDF text Added pre-cleaning regex pipeline: remove headers/footers, normalize bullets, fix line breaks.
Structured LLM output Designed a multi-shot prompt with JSON schema; added retry loop on malformed JSON (≤3 retries).
Google OAuth expiry Switched to domain-wide delegation service account; rotates keys via GitHub Actions + Secret Manager.
Conditional email logic Built a decision matrix in n8n:
if (score ≥ 8) ➜ SHORTLIST
else if (score ≤ 4 OR spam_flag) ➜ REJECT
else ➜ MAYBE
Rate limiting Implemented exponential backoff for Gmail API; batched Sheets writes every 30 s via queue node.

🏆 Key Accomplishments

  • Fully automated a real-world workflow in under 2 weeks using only open-source / low-code tools.
  • Reduced first-pass review time by 92 % (from ~2.5 min to ~12 s per résumé).
  • Scalable: stress-tested with 1,000 synthetic applications in 15 min without errors.
  • Fairness audit: compared AI shortlist vs. human recruiter on 200 historical applications → Cohen’s κ = 0.78 (substantial agreement).
  • Zero PII leakage: résumés stored in Drive with view-only access; emails sent via blind copy.

📚 Lessons Learned

  1. Prompt engineering is product engineering.
    • We iterated 27 prompt versions; adding a single sentence like “If the candidate switched jobs more than 4 times in 3 years, penalize stability” improved precision by 11 %.
  2. No-code ≠ no constraints.
    • n8n is powerful but RAM-hungry; we containerized it with --max-old-space-size=4096 to avoid OOM on large PDFs.
  3. OAuth scopes can be a maze.
    • Google Workspace admins need to whitelist scopes like https://www.googleapis.com/auth/drive.file and gmail.send.
  4. Observability is critical.
    • Added n8n execution logs → Loki → Grafana dashboards for real-time alerts on failed parses or LLM errors.

🔮 Roadmap

Phase Feature ETA Notes
v1.1 Feedback Loop Aug 2025 Recruiter rates AI decisions inside Sheets; nightly fine-tuning job on Gemini.
v1.2 Analytics Dashboard Sep 2025 React + Supabase; charts for skill-gap analysis, diversity metrics, funnel drop-off.
v1.3 Interview Scheduling Oct 2025 Calendly API; auto-create 30-min slots, attach Google Meet link.
v1.4 Multi-Role Support Nov 2025 Job-specific prompt templates stored in Firestore; dynamic prompt selection via hidden form field.
v1.5 Compliance Pack Dec 2025 GDPR delete endpoint, audit logs, PII redaction before LLM call.

Built With

  • geminiapi
  • jotformapi
  • n8n
  • react
  • superbase
Share this project:

Updates