Quick Overview
This workflow monitors Gmail for incoming job applications with resume attachments, extracts text from the PDF, and uses Google Gemini to screen candidates against your role requirements. It logs every result to Supabase, then either emails the recruiter, creates a rejection draft, or labels the email for manual review.
How it works
- Triggers every minute when a new Gmail message arrives that matches the query
has:attachment.
- Loads role requirements (job title, required skills, minimum experience, recruiter email, and review label ID) from a configuration step.
- Extracts text from the first attached PDF resume and sends it to Google Gemini to identify candidate details, assess skills and experience, and return a structured decision.
- Inserts the candidate name, experience, matched/missing skills, decision, and reason into a Supabase table for tracking.
- If Gemini decides “shortlist”, it sends an email to the recruiter with the candidate summary.
- If Gemini decides “reject”, it saves a rejection response as a Gmail draft in the same email thread for human approval.
- If Gemini decides “needs_human_review”, it applies a Gmail label to the application email for manual follow-up.
Setup
- Add Gmail OAuth2 credentials and select them for the Gmail trigger and all Gmail actions (send email, create draft, and add label).
- Add a Google Gemini (PaLM) API credential for the screening chat model.
- Add Supabase credentials, and create a
candidates table (including fields like candidate_name, years_experience, matched_skills, missing_skills, decision, reason, and created_at).
- Update the configuration values for job title, required skills, minimum years, recruiter email, and the Supabase table name.
- Create a Gmail label for manual review, copy its label ID, and set it in the configuration so the workflow can label ambiguous applications.