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
- Load PDF (formTrigger)
Uploads a .pdf file. Single file upload.
- Upload (PDF.co API)
Uploads the PDF file to PDF.co using binary data.
- PDF to HTML (PDF.co API)
Converts the uploaded PDF to HTML using its URL.
- Get HTML (HTTP Request)
Downloads the converted HTML from PDF.co.
- 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?
Related Templates
Extract Title tag and Meta description from url for SEO analysis with Airtable
Extract Title tag and meta description from url for SEO analysis. How it works The workflows takes records from Airtabl...
Restore your workflows from GitHub
This workflow restores all n8n instance workflows from GitHub backups using the n8n API node. It complements the Backup ...
Extract Named Entities from Web Pages with Google Natural Language API
Who is this for? Content strategists analyzing web page semantic content SEO professionals conducting entity-based anal...
π Please log in to import templates to n8n and favorite templates
Workflow Visualization
Loading...
Preparing workflow renderer
Comments (0)
Login to post comments