Quick overview
This workflow collects resume PDFs and a job description through an n8n form, extracts text (with OCR for scanned PDFs), generates embeddings via OpenRouter, and ranks the resumes by cosine similarity to the job description, returning a CSV-style list of ranked filenames.
How it works
- Receives resume PDFs and a job description from an n8n form submission.
- Creates an embedding for the job description using OpenRouter’s embeddings endpoint with
openai/text-embedding-3-large.
- Processes each uploaded resume one at a time, converting the PDF to text using built-in PDF extraction.
- If the extracted text is too short (likely scanned), sends the PDF to OpenRouter chat completions with the
file-parser plugin (mistral-ocr) to OCR the document and return plain text.
- Creates an embedding for each resume’s extracted text (from direct extraction or OCR) using
openai/text-embedding-3-large.
- Computes cosine similarity between each resume embedding and the job description embedding, then sorts resumes from most similar to least similar.
- Returns a completion page containing a CSV-style list of rank and filename.
Setup
- Add an OpenRouter API credential in n8n and select it on the embedding and OCR HTTP request steps.
- Ensure your OpenRouter account has access to
openai/text-embedding-3-large, google/gemma-4-31b-it, and the file-parser plugin with mistral-ocr for scanned PDF extraction.
- Open the workflow’s form trigger in a browser, upload one or more PDF resumes, and paste the job description before running.