Skip to main content

Update Hyperlinks Annotation using n8n action

PDF4me Update Hyperlinks Annotation modifies and manages hyperlinks within PDF documents through n8n automation workflows. Process PDFs via n8n triggers, binary data, base64 strings, or public URLs to automatically detect existing hyperlinks, update URLs, modify link destinations, replace broken links, and manage document annotations with precise link processing. This solution is ideal for link maintenance, URL updates, broken link fixing, document migration, link redirection, and automated hyperlink management workflows that require accurate link detection with reliable modification and seamless integration.

Setup

Add the PDF4me "Update Hyperlinks Annotation" node to your n8n workflow and configure the required parameters. For initial setup instructions, see our n8n Integration Guide.

Prerequisites:

  • PDF4me API credentials
  • n8n workflow access

Configuration:

  1. Add PDF4me node to workflow
  2. Select "Update Hyperlinks Annotation" action
  3. Configure input parameters (see below)
Update Hyperlinks Annotation

Parameters

Complete list of parameters for the Update Hyperlinks Annotation action. Configure these parameters to control hyperlink updates.

Important: Parameters marked with an asterisk (***) are required and must be provided for the action to function correctly.

ParameterTypeDescriptionExample
Input Data Type***StringPDF Input Format Selection
• Choose the format of your PDF data input
• PDF4me supports multiple input types
• Options: Binary Data, Base64 String, or URL
Binary Data
Binary Property NameBinaryBinary PDF File Input (Required if Binary Data)
• Reference PDF file from previous n8n node or file upload
• PDF4me processes binary PDF files with automatic format detection
• Required when Input Data Type is "Binary Data"
{{ $binary.data }}
Base64 Document ContentStringBase64 Encoded PDF Input (Required if Base64 String)
• Provide PDF data as base64 encoded string
• PDF4me automatically decodes and processes the PDF content
• Required when Input Data Type is "Base64 String"
UEsDBBQABgAI...
File URLStringPublic PDF URL Input (Required if URL)
• Provide a public/open permission URL to the PDF file
• PDF4me downloads and processes the file from URL
• Required when Input Data Type is "URL"
https://abc.com/sample.pdf
Output File Name***StringUpdated PDF Output Filename
• Specify the name for the generated updated PDF file
• Must include .pdf extension
• PDF4me ensures unique naming and format validation
hyperlinks_updated.pdf
Search On***StringHyperlink Search Criteria
• Choose the search method for identifying hyperlinks to update
• Options: Text (search by display text), URL (search by target URL)
• PDF4me provides multiple search options
Text
Search Value***StringHyperlink Search Value
• Specify the text or URL value to search for
• Should match the current text or URL of the hyperlink to modify
• Used for precise hyperlink identification
http://www.google.com
Is ExpressionBooleanExpression Evaluation
• Enable expression evaluation for dynamic search values
• Allows use of n8n expressions for dynamic hyperlink identification
• Optional for advanced workflows
true
Text Current Value***StringCurrent Hyperlink Text
• Specify the current display text of the hyperlink
• Should match exact text currently displayed
• Used for text-based search and update
http://www.google.com
Text New Value***StringNew Hyperlink Text
• Specify the new display text to replace current text
• This is what users will see as clickable text
• Used for text replacement
https://pdf4me.com
URL Current Value***StringCurrent Hyperlink URL
• Specify the current target URL of the hyperlink
• Should match exact URL currently linked
• Used for URL-based search and update
http://www.google.com
URL New Value***StringNew Hyperlink URL
• Specify the new target URL to replace current URL
• This is where the hyperlink will redirect users
• Used for URL replacement
https://pdf4me.com
Binary Data Output Name***StringBinary Data Mapping
• Define the variable name for accessing generated updated PDF data
• Used in subsequent workflow actions
• Essential for workflow data flow
data

Advanced Options

The following parameters are available in the Advanced Options section and are optional:

ParameterTypeDescriptionExample
Custom ProfilesStringCustom Configuration Profiles
• Set additional options using custom profiles
• JSON-like format containing predefined parameters
• Supports outputDataFormat, preserveMetadata, etc.
• Optional for specialized requirements
{ "outputDataFormat": "json", "preserveMetadata": true, "optimizeForPrinting": false, "compressionLevel": "medium" }

Output

Output Parameters

ParameterTypeDescriptionExample
successBooleanPDF4me hyperlink update status indicator - Boolean flag indicating the success or failure of the hyperlink update process. PDF4me returns true for successful operations and false for any errors, enabling robust error handling in automated workflowstrue
messageStringPDF4me hyperlink update status message - Human-readable status message providing details about the hyperlink update process result. Includes success confirmation or error details for troubleshootingHyperlinks updated successfully
fileNameStringPDF4me generated PDF filename - The complete filename of the successfully generated updated PDF document with proper .pdf extension. PDF4me ensures unique naming and validates file format compliance for seamless integration with downstream processeshyperlinks_updated.pdf
mimeTypeStringPDF4me output MIME type - MIME type of the generated PDF file, always "application/pdf" for PDF documents. Useful for content type validation and proper file handling in web applicationsapplication/pdf
fileSizeNumberPDF4me PDF file size in bytes - The exact size of the generated updated PDF file in bytes, provided by PDF4me for storage planning, bandwidth optimization, and file transfer monitoring. Essential for enterprise document management and workflow automation125430
docNameStringPDF4me document name reference - The name of the processed document for reference and tracking purposes. This matches the fileName for consistency in document management workflowshyperlinks_updated.pdf
hyperlinksUpdatedBooleanPDF4me hyperlink update confirmation - Boolean flag confirming that hyperlinks have been successfully updated in the PDF document. Useful for verifying that hyperlink updates were applied correctlytrue
linksModifiedNumberPDF4me hyperlinks modified count - The number of hyperlink annotations that were successfully updated in the PDF document. Useful for tracking update effectiveness and hyperlink modification results2

N8N Action Response

The PDF4me Update Hyperlinks Annotation API returns a response that can be viewed in multiple formats. Choose the view that best fits your needs:

JSON Response Format

The raw JSON response from the API:

[
{
"success": true,
"message": "Hyperlinks updated successfully",
"fileName": "hyperlinks_updated.pdf",
"mimeType": "application/pdf",
"fileSize": 125430,
"docName": "hyperlinks_updated.pdf",
"hyperlinksUpdated": true,
"linksModified": 2
}
]

Use Cases

  • Update outdated hyperlinks in PDF documents to point to new URLs or websites
  • Modify hyperlink text to reflect current branding or messaging requirements
  • Maintain document accuracy by keeping all links current and functional

Content Migration and Rebranding

  • Update hyperlinks when migrating content to new domains or platforms
  • Modify links during company rebranding or website restructuring
  • Ensure all document links remain functional after organizational changes

Enterprise Document Maintenance

  • Automate hyperlink updates in large document repositories and knowledge bases
  • Maintain link integrity across corporate documents and training materials
  • Update links in compliance documents and policy manuals to ensure accuracy

Get Help