Quick overview
This workflow watches Gmail for new emails with resume attachments, extracts text from PDF, and uses Google Gemini to evaluate candidates against role requirements. It logs each screening result to Supabase, then either emails the recruiter, saves a rejection as a Gmail draft, or labels the email for manual review.
How it works
- Triggers every minute when a new Gmail email arrives that matches the search query
has:attachment.
- Loads the job title, required skills, minimum experience, recruiter email, Supabase table name, and the Gmail label ID used for manual review.
- Extracts plain text from the attached resume PDF in the email.
- Sends the resume text and job requirements to Google Gemini and parses a structured result including name, experience, matched/missing skills, decision, and rationale.
- Inserts the structured screening result into a Supabase table for tracking and reporting.
- Routes by the decision to either email the recruiter for shortlisted candidates, save a rejection reply as a Gmail draft in the same thread, or label the original email for human review.
Setup
- Add a Gmail OAuth2 connection for the Gmail trigger and Gmail actions (send email, create draft, and add label).
- Add a Google Gemini (PaLM) API credential for the Gemini chat model used to screen resumes.
- Add a Supabase API credential, and create a
candidates table with fields for candidate name, years of experience, matched skills, missing skills, decision, reason, and timestamp.
- Create a Gmail label for manual review, copy its label ID, and paste it along with your job requirements and recruiter email into the configuration values.
- Confirm the Gmail trigger query and the attachment binary property name (for example,
attachment_0) match how your application emails arrive.