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
USDT And TRC20 Wallet Tracker API Workflow for n8n
Overview This n8n workflow is specifically designed to monitor USDT TRC20 transactions within a specified wallet. It u...
Automate Daily Keyword Research with Google Sheets, Suggest API & Custom Search
Who's it for This workflow is perfect for SEO specialists, marketers, bloggers, and content creators who want to automa...
Bulk Automated Google Drive Files Sharing and Direct Download Link Generation
This N8N workflow automates the process of sharing files from Google Drive. It includes OAuth2 authentication, batch pro...
π Please log in to import templates to n8n and favorite templates
Workflow Visualization
Loading...
Preparing workflow renderer
Comments (0)
Login to post comments