Extract Links and URLs from PDF documents using PDF.co

πŸ“ Description

This workflow allows you to extract all links (URLs) contained in a PDF file by converting it to HTML via PDF.co and then extracting the URLs present in the resulting HTML.

Unlike the traditional Read PDF node, which only returns visible link text, this flow provides the full active URLs, making further processing and analysis easier.

πŸ“Œ Use Cases

Extract all hyperlinks from PDF documents. Automate URL verification and monitoring within documents. Extract links from reports, contracts, catalogs, newsletters, or manuals. Prepare URLs for validation, classification, or storage.

πŸ”— Workflow Overview

User uploads a PDF file via a web form. The PDF is uploaded to PDF.co. The PDF is converted to HTML (preserving links). The converted HTML is downloaded. URLs are extracted from the HTML using a custom code node.

βš™οΈ Node Breakdown

  1. Load PDF (formTrigger)

Uploads a .pdf file. Single file upload.

  1. Upload (PDF.co API)

Uploads the PDF file to PDF.co using binary data.

  1. PDF to HTML (PDF.co API)

Converts the uploaded PDF to HTML using its URL.

  1. Get HTML (HTTP Request)

Downloads the converted HTML from PDF.co.

  1. Code1 (Function / Code)

Parses the HTML content to extract all URLs (http, https, www). Uses a regex to identify URLs within the HTML text. Outputs an array of objects containing the extracted URLs.

πŸ“Ž Requirements

Active PDF.co account with API key. Set up PDF.co credentials in n8n (PDF.co account). Enable webhook to expose the upload form.

πŸ› οΈ Suggested Next Steps

Add nodes to validate extracted URLs (e.g., HTTP requests to check status). Store URLs in a database, spreadsheet, or send via email. Extend the flow to filter URLs by domain, type, or pattern.

πŸ“€ Importing the Template

Import this workflow into n8n via Import workflow and paste the provided JSON.

If you want help adding extra steps or optimizing the URL extraction, just ask!

If you want, I can also prepare this as a Canva visual template for you. Would you like that?

0
Downloads
1
Views
7.24
Quality Score
beginner
Complexity
Author:Mauricio Perera(View Original β†’)
Created:8/13/2025
Updated:11/17/2025

πŸ”’ Please log in to import templates to n8n and favorite templates

Workflow Visualization

Loading...

Preparing workflow renderer

Comments (0)

Login to post comments