Skip to main content

Extract links and URLs from PDF documents using PDF.co

Workflow preview

Workflow preview
100%
Extract links and URLs from PDF documents using PDF.co preview
Open on n8n.io

Important notice

This workflow is provided as-is. Please review and test before using in production.

1. Workflow Overview

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 th...

Best for

  • Document Extraction automation workflows
  • intermediate n8n builders looking for reusable templates

Tools used

n8n-nodes-base.formtrigger, n8n-nodes-pdfco.pdfco api, n8n-nodes-base.httprequest, n8n-nodes-base.stickynote, n8n-nodes-base.code

Source and attribution

This workflow is cataloged by N8N Workflows and links back to its original n8n.io source page by Mauricio Perera.

Original n8n.io source

1.1 Workflow description

Title
Extract links and URLs from PDF documents using PDF.co
Workflow name
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

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

βš™οΈ Node Breakdown

1. Load PDF (formTrigger)

  • Uploads a .pdf file.
  • Single file upload.

2. Upload (PDF.co API)

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

3. PDF to HTML (PDF.co API)

  • Converts the uploaded PDF to HTML using its URL.

4. Get HTML (HTTP Request)

  • Downloads the converted HTML from PDF.co.

5. 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?

1.2 Logical Blocks

This catalog entry is organized from the workflow JSON. The node-level section below shows the executable blocks available for review before importing the template.

2. Block-by-Block Analysis

Block 1 - Load PDF

Type / Role
n8n-nodes-base.formTrigger - formTrigger
Config choices
Version 2.2

Block 2 - Upload

Type / Role
n8n-nodes-pdfco.PDFco Api - PDFco Api
Config choices
Version 1

Block 3 - PDF to HTML

Type / Role
n8n-nodes-pdfco.PDFco Api - PDFco Api
Config choices
Version 1

Block 4 - Get HTML

Type / Role
n8n-nodes-base.httpRequest - httpRequest
Config choices
Version 4.2

Block 5 - Sticky Note

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 6 - Sticky Note1

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 7 - Sticky Note2

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 8 - Sticky Note3

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 9 - Code1

Type / Role
n8n-nodes-base.code - code
Config choices
Version 2

Block 10 - Sticky Note4

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

3. Summary Table

Workflow Extract links and URLs from PDF documents using PDF.co
Complexity intermediate
Nodes 10
Categories Document Extraction
Author Mauricio Perera
Published 06 Aug 2025

4. Reproducing the Workflow from Scratch

  1. 1. Download the workflow JSON

    Use the JSON export at /data/workflows/7031/7031.json as the source template for this automation.

  2. 2. Import the template into n8n

    Open n8n, import the downloaded JSON, and review each node before activating the workflow.

  3. 3. Configure credentials and variables

    Replace placeholder credentials, API keys, webhook URLs, account IDs, and environment-specific values with your own settings.

  4. 4. Test with sample data

    Run the workflow manually or in a staging workspace, inspect node output, and confirm downstream systems receive the expected data.

  5. 5. Activate and monitor

    Enable the workflow only after testing, then monitor executions, errors, and rate limits during the first production runs.

5. General Notes & Resources

Review imported nodes carefully before activation. This catalog entry is intended to help you inspect the workflow structure, understand required services, and find related templates faster.

Node names, credentials, schedules, webhook paths, and external service limits may need adjustment for your workspace.

Frequently asked questions

What does Extract links and URLs from PDF documents using PDF.co do?

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 th...

What do I need before importing this workflow?

Review the workflow JSON, configure any required credentials in n8n, and test the automation in a safe workspace before using it in production.

Can I customize this workflow?

Yes. Use the block-by-block analysis and the downloadable JSON to inspect each node, then adjust credentials, prompts, schedules, filters, or destinations for your Document Extraction use case.