PDF Link and URL Extraction Automation using PDF.co - n8n Workflow

Use this powerful n8n workflow to automatically upload PDF files, convert them to HTML using PDF.co, and efficiently extract all embedded links and URLs using a custom n8n node.

Workflow Preview

Ready to automate?

Download this n8n workflow template and start using it instantly.

Who is this best for?

Markdown-formatted text.

Data analysts needing to harvest links from large documentation sets.
Content managers automating PDF link audits and validation.
n8n developers looking for powerful PDF processing n8n templates.
Users who frequently process documents and require robust URL extraction capabilities within their n8n environment.

Overview

This specialized n8n workflow addresses the complex requirement of extracting hyperlinks embedded within PDF documents, a common bottleneck in automated data processing pipelines. It leverages the external conversion power of the PDF.co service combined with the logical processing strength of a custom n8n node. The core strategy of this n8n template involves converting the binary PDF into raw HTML text. This step ensures that all embedded links are exposed in a text format, allowing the subsequent custom Code n8n node to efficiently scan the data using a precise regular expression. This is a crucial n8n workflow for anyone needing high-accuracy, reliable PDF data mining solutions.

How it Works

The automation begins with the Load PDF n8n trigger (a Form Trigger), which waits for a user to upload a PDF file via a webhook endpoint. Once the file is received, the Upload n8n node handles the secure transfer of the binary file to the PDF.co service. Following the upload, the PDF to HTML n8n node initiates a conversion operation, which returns a temporary URL pointing to the newly generated HTML file.

The Get HTML HTTP Request n8n node fetches the raw content from that URL, providing the full textual representation of the PDF. Finally, the Code1 n8n node executes a crucial JavaScript function. This function uses a powerful regular expression (/(https?:\/\/[^\s]+)|(www\.[^\s]+)/gi) to scan the raw HTML text (item.json.data). It identifies all unique URLs (including http, https, or www prefixes) and outputs each extracted link as a separate, clean item in the n8n workflow, effectively completing the URL extraction.

Installation Guide

Markdown-formatted text.


  1. Import the n8n workflow: Copy the provided JSON data and import it directly into your n8n instance via the 'Workflows' section.

  2. PDF.co Credentials: You must configure credentials for the PDF.co API. Click on the Upload n8n node and the PDF to HTML n8n node, select 'Create New Credential,' and input your PDF.co API key.

  3. Activate the n8n trigger: Ensure the workflow is active and locate the Webhook URL provided by the Load PDF n8n trigger. This URL will be used to submit the PDF files for processing.

  4. Testing: Upload a PDF file using the Form Trigger URL to test the complete n8n workflow execution.

Node Details

Markdown-formatted text.

Load PDF (Form Trigger): This serves as the initial n8n trigger, waiting for a file upload. It is configured to accept a single PDF file input, initiating the entire n8n workflow upon submission.
Upload (PDF.co API n8n node): Responsible for taking the binary PDF file input and uploading it temporarily to the PDF.co service, providing a URL for subsequent operations.
PDF to HTML (PDF.co API n8n node): Uses the URL from the previous step to command PDF.co to convert the PDF into HTML format. The output provides the URL where the converted HTML content resides.
Get HTML (HTTP Request n8n node): Fetches the raw textual content (HTML) from the URL provided by the PDF.co conversion step. This data is essential for the link extraction process.


  • Code1 (Code n8n node): The core intelligence of this n8n workflow. It applies a JavaScript regular expression to the incoming HTML data to accurately identify and extract all URLs. It creates a new output item for every unique URL found, ready for further processing in the n8n template.

Related n8n Workflows

Free

Nodes: 5 Nodes
Updated: December 26 2025
View all
Created by

Automation consultant with over 10 years of experience specializing in AI, no-code, and workflow optimization. I’ve delivered tailored AI and NLP solutions across real estate, healthcare, and more, enhancing efficiency and customer experiences. Proficient in tools like Make, Airtable, and Zapier, I also integrate GPT models to create scalable, innovative automations. Contact me to discuss custom n8n workflows or advanced automations to streamline your processes.

Featured*