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.