π₯ Rank resumes by job description similarity using Gemini embeddings
β‘ 29 views Β· π₯ HR & Recruitment
Description
Quick overview
This workflow collects resume PDFs and a job description via an n8n form, generates embeddings with Google Gemini, calculates cosine similarity between each resume and the job description, and returns a CSV-style ranked list of filenames.
How it works
- Receives resume PDF uploads and a job description text through an n8n Form trigger.
- Creates a semantic embedding for the job description using the Google Gemini Embeddings API (gemini-embedding-2).
- Splits the uploaded files into individual resume items and converts each PDF binary to a Base64 string.
- Sends each Base64-encoded PDF to the Google Gemini Embeddings API to generate a multimodal embedding for the resume.
- Calculates cosine similarity between the job description embedding and each resume embedding, then sorts resumes from most similar to least similar.
- Returns a CSV-formatted ranking (Rank, File Name) in the form completion response.
Setup
- Create and add a Google Gemini (PaLM) API credential in n8n with an API key that can access the gemini-embedding-2 model.
- Ensure the Google Gemini credential is selected on both HTTP requests that create the job description embedding and the resume embeddings.
- Use the workflowβs form URL to upload one or more PDF resumes and paste the target job description before running.
π Nodes Used
HTTP Request, n8n Form Trigger, Extract from File, n8n Form
π₯ Import
Download workflow.json and import into n8n:
Workflow menu β Import from File