Automate Resume Parsing & PDF Generation with n8n and OpenAI

This n8n workflow automates the extraction of key resume information from PDFs sent via Telegram and generates polished PDF summaries using OpenAI GPT-4 and Gotenberg. Save hours manually compiling resumes and deliver professional results instantly.
lmChatOpenAi
telegramTrigger
extractFromFile
+10
Workflow Identifier: 1750
NODES in Use: lmChatOpenAi, code, outputParserAutofixing, outputParserStructured, if, noOp, telegram, extractFromFile, set, merge, convertToFile, httpRequest, telegramTrigger
Automate resume parsing with n8n and OpenAI

Press CTRL+F5 if the workflow didn't load.

Learn how to Build this Workflow with AI:

What This Automation Does

This workflow watches for PDF resumes sent to a Telegram bot.

It downloads the PDF, reads the text inside, and uses OpenAI GPT-4 turbo-preview to make that text into structured JSON data.

Then, it turns each part of the JSON data into clear HTML sections.

Finally, it joins all HTML pieces into one document, changes that HTML into a PDF with Gotenberg, and sends the PDF back through Telegram.


Who Should Use This Workflow

This is for recruiters or HR persons who get many resumes by Telegram and want to save time reading and organizing information.

It helps avoid copying info by hand, which is slow and causes errors.

Anyone wanting fast, automatic resume summaries will find it useful.


Tools and Services Used


Inputs, Processing, and Outputs

Inputs

  • PDF resume files sent as documents through Telegram chat.
  • Chat ID and file ID data for user identification and file retrieval.

Processing Steps

  • Download the PDF file from Telegram servers.
  • Extract text from the downloaded PDF file.
  • Send raw text to OpenAI GPT-4 turbo-preview to build structured JSON with fields like personal info, jobs, education, projects, volunteering, and skills.
  • Transform JSON sections into HTML code for formatted reading.
  • Combine all HTML snippets into a single full resume HTML document.
  • Encode HTML, convert it to a file, and send it to Gotenberg for PDF transformation.
  • Return the finished PDF file back to the user via Telegram.

Outputs

  • A neatly formatted PDF resume summary sent to the Telegram user automatically.

Beginner Step-by-Step: How to Use This Workflow in n8n

Importing the Workflow

  1. Download the workflow file by clicking the Download button on this page.
  2. Open the n8n editor where you want to use the workflow.
  3. Choose “Import from File” and select the downloaded workflow JSON file.

Configuration After Import

  1. Add your Telegram Bot API credentials in the Telegram trigger and Telegram nodes.
  2. Insert your OpenAI API Key in the Langchain Chat Model node.
  3. Update the chat ID in the If node named Auth to allow only trusted users.
  4. Set the URL and port of your Gotenberg server in the HTTP Request node.
  5. Check any code nodes or prompt inputs for correct values and copy-paste code provided below if needed.

Testing and Activation

  1. Send a test PDF resume to your Telegram bot to watch the workflow run and confirm the output PDF returns correctly.
  2. If the PDF comes back formatted, toggle the workflow active in n8n to run it live for all users.

This simple import and setup works well for users already inside the n8n platform.

Using self-host n8n can allow continuous running of this automation on a server or VPS.


Workflow Details: Section-by-Section Explanation

Telegram Trigger and Authorization

Telegram trigger watches messages for PDF file uploads.

An If node checks if the chat ID is on an allowed list.

Messages with /start commands get ignored by another If node.

Download and Extract PDF Text

Telegram node fetches the actual PDF file using file ID.

The Extract text from PDF node changes the PDF into raw plain text.

Parse Text to Structured JSON with OpenAI

Langchain Chat Model node sends the PDF text to GPT-4 turbo-preview.

Using a Structured Output Parser, GPT returns consistent JSON with personal info, jobs, education, skills, and more.

Format Resume Sections into HTML

Code nodes convert employment history, education, projects, and volunteering arrays into styled HTML with bold labels and breaks.

Set nodes create HTML snippets for personal info and technology skills.

Merge and Compile Full HTML Document

Multiple Merge nodes combine HTML from all sections step-by-step into one object.

The final Set node consolidates all HTML into a single output string.

Convert HTML to PDF and Send Back

The final HTML string is base64 encoded in a code node and made into an index.html file in a ConvertToFile node.

An HTTP Request node posts the file to Gotenberg for PDF conversion.

Once the PDF is returned, the Telegram node sends the new PDF resume back to the user’s Telegram chat with a filename based on the candidate’s name.


Customization Ideas

  1. Expand JSON Fields: Add extra info like certifications or LinkedIn URLs in the Structured Output Parser node.
  2. Change PDF Service: Swap the Gotenberg HTTP Request node with another PDF API such as PDFMonkey or ApiTemplate.
  3. Style HTML: Edit JavaScript code nodes to add CSS or special tags for custom resume looks.
  4. Support Other Languages: Adjust OpenAI prompts to parse resumes in languages besides English.
  5. Enhance Authorization: Allow multiple chat IDs or load trusted users from files or databases.

Handling Problems and Failures

Extract text from PDF node fails or returns empty text
Cause: PDF may contain scanned images, not text.
Fix: Use OCR software outside this flow to turn images into text first.

OpenAI request exceeds token limit or times out
Cause: Resume text is too long.
Fix: Split or shorten text in a prior step before sending to OpenAI.

Gotenberg HTTP request fails or no response
Cause: Gotenberg server offline or wrong URL.
Fix: Check Gotenberg server status and correct URL/port in HTTP Request node.


Pre-Production Checklist


Deployment Guide

Turn on the workflow in n8n by switching it active.

Keep the n8n instance running 24/7 to listen for Telegram messages continuously.

Watch for errors and execution logs in n8n dashboard and fix issues as needed.

Monitor the Gotenberg server uptime too if self hosting it.

Use self-host n8n for best continuous operation on a server or VPS.


Summary of Benefits and Results

✓ Saves hours of manual resume reading and copying.

✓ Produces clear and structured PDF summaries quickly.

✓ Reduces errors caused by manual data entry.

✓ Automatically sends finished PDFs back to users in Telegram.

→ Simplifies resume handling for recruiters.

→ Speeds up candidate screening process.

→ Allows easy automation inside n8n with OpenAI and Gotenberg.


Automate resume parsing with n8n and OpenAI

Visit through Desktop to Interact with the Workflow.

Frequently Asked Questions

The Telegram trigger node listens for PDF messages sent to the Telegram bot and starts the workflow with the file and chat data.
Empty text usually means the PDF contains images only; using OCR outside this workflow to convert images to text is required.
Yes, replacing the HTTP Request node that calls Gotenberg with another PDF API like PDFMonkey is possible.
Import the workflow JSON file inside the n8n editor, add needed credentials and settings, test with a PDF, and then activate the workflow to run live.
Author
Written By
Ritu Sanjali

Related Workflows

Automate Twist Channel Creation and Messaging with n8n

This workflow automates creating and updating a channel in Twist and sending a personalized message to specific users. It eliminates manual setup errors and saves time managing Twist communications.

Automate Ideogram Image Generation with Google Sheets & Gmail

This workflow automates graphic design image generation via Ideogram AI, storing image data in Google Sheets and Google Drive, with email alerts via Gmail. It saves designers hours by automating image creation, remixing, review, and record-keeping.

Automate IT Support with Slack and OpenAI in n8n

Streamline IT support by automating Slack message handling using n8n and OpenAI. This workflow handles Slack DMs, filters bots, queries a Confluence knowledge base, and delivers AI-generated responses, improving support efficiency and response time.

Automate Crypto Analysis with CoinMarketCap & n8n AI Agent

Discover how this unique n8n workflow leverages CoinMarketCap’s multi-agent AI to deliver precise, real-time cryptocurrency insights directly via Telegram. Manage crypto data analysis efficiently with automated multi-source API integration.

Automate Gumroad to Beehiiv Subscriber Sync with n8n

Learn how to automatically add new Gumroad sales customers as Beehiiv newsletter subscribers using n8n automation. This workflow saves time by syncing sales data to Google Sheets CRM and notifying your Telegram channel instantly.

Generate On-Brand Blog Articles Using n8n and OpenAI

This workflow automates the creation of on-brand blog articles by analyzing existing company content using n8n and OpenAI. It extracts article structures and brand voice to produce consistent draft articles, saving significant content creation time.
1:1 Free Strategy Session
Your competitors are already automating. Are you still paying for it manually?

Do you want to adopt AI Automation?

Every hour your team does repetitive work, you're burning real money.
While you wait, faster businesses are cutting costs and moving quicker.
AI and automations aren't the future anymore — they're the present.

Book a live 1-on-1 session where we show you exactly which of your daily tasks can be automated — and what it’s costing you not to.