The n8n workflow runs as a sequential agentic pipeline with 13 nodes.
Node 1 — Webhook Trigger
Method: POST. Receives jd_text as plain text and resume_pdf as base64-encoded PDF data. Configured for persistent uptime via Cloudflare Zero Trust tunnel on Oracle Cloud VM.
Node 2 — API Key Validation
Code node. Pass-through validation layer. Confirms the incoming payload is properly formed before any processing begins.
Node 3 — Input Validation
Code node. Extracts jd_text and resume_pdf from the request body. Validates both fields exist. Confirms job description is at least 50 characters. Structures the payload for downstream nodes.
Node 4 — Start Latency Timer
Code node. Records the current timestamp in milliseconds. Used at the end of the pipeline to calculate total evaluation latency.
Node 5 — Validate File
Code node. Strips the base64 data URL prefix if present. Converts the base64 string to a binary buffer. Outputs the binary PDF data in the format the Extract PDF Text node requires.
Node 6 — Extract PDF Text
n8n built-in Extract from File node. Operation: Extract From PDF. Input Binary Field: data. Extracts all readable text from the PDF regardless of layout, column structure, or formatting.
Node 7 — Check Extraction Success
IF node. Condition: extracted text field is not empty and length is at least 100 characters. TRUE path continues to evaluation. FALSE path returns a clean extraction error response.
Node 8 — Prepare Gemini Request
Code node. Retrieves jd_text from the Input Validation node and resume text from the extraction output. Validates both are present. Assembles the complete prompt string requesting a single JSON object containing all evaluation fields including the email draft.
Node 9 — Basic LLM Chain (Gemini)