Actions80
- Add Attachment To PDF
- Add Barcode To PDF
- Add Form Fields To PDF
- Add HTML Header Footer
- Add Image Stamp To PDF
- Add Image Watermark To Image
- Add Margin To PDF
- Add Page Number To PDF
- Add Text Stamp To PDF
- Add Text Watermark To Image
- AI-Invoice Parser
- AI-Process Contract
- AI-Process HealthCard
- Classify Document
- Compress Image
- Compress PDF
- Convert HTML To PDF
- Convert Image Format
- Convert JSON To Excel
- Convert Markdown To PDF
- Convert PDF To Editable PDF Using OCR
- Convert PDF To Excel
- Convert PDF To PowerPoint
- Convert PDF To Word
- Convert To PDF
- Convert URL to PDF
- Convert VISIO
- Convert Word to PDF Form
- Create Images From PDF
- Create PDF/A
- Create Swiss QR Bill
- Crop Image
- Delete Blank Pages From PDF
- Delete Unwanted Pages From PDF
- Split PDF By Barcode
- Disable Tracking Changes In Word
- Enable Tracking Changes In Word
- Extract Attachment From PDF
- Extract Form Data From PDF
- Extract Pages From PDF
- Extract Resources
- Extract Table From PDF
- Extract Text By Expression
- Extract Text From Word
- Fill PDF Form
- Find And Replace Text
- Flip Image
- Flatten PDF
- Generate Barcode
- Generate Document Single
- Generate Documents Multiple
- Get Document From Pdf4me
- Get Image Metadata
- Get PDF Metadata
- Split PDF By Swiss QR
- Get Tracking Changes In Word
- Image Extract Text
- Linearize PDF
- Merge Multiple PDFs
- Overlay PDFs
- Parse Document
- Protect PDF
- Read Barcode From Image
- Read Barcode From PDF
- Read SwissQR Code
- Remove EXIF Tags From Image
- Repair PDF Document
- Replace Text With Image
- Replace Text With Image In Word
- Resize Image
- Rotate Document
- Rotate Image
- Rotate Image By EXIF Data
- Rotate PDF Page
- Sign PDF
- Split PDF By Text
- Split PDF Regular
- Unlock PDF
- Update Hyperlinks Annotation
- Upload File To PDF4me
Overview
The node provides a "Classify Document" operation that classifies PDF documents using different input methods. It supports providing the PDF file as binary data from a previous node, as a base64 encoded string, or via a URL to the PDF file. This classification can be used in workflows where automated document categorization is needed, such as sorting invoices, contracts, or other document types based on their content.
Practical examples include:
- Automatically classifying incoming scanned PDFs into categories like invoices, receipts, or contracts.
- Processing PDFs fetched from URLs and determining their document type for further workflow branching.
- Using base64 encoded PDF content from external sources to classify documents without saving files locally.
Properties
| Name | Meaning |
|---|---|
| Input Data Type | Choose how to provide the PDF file to classify. Options: Binary Data (from previous node), Base64 String, URL to PDF file. |
| Input Binary Field | Name of the binary property containing the PDF file (usually "data"). Only shown if Input Data Type is Binary Data. |
| Base64 PDF Content | Base64 encoded PDF document content. Only shown if Input Data Type is Base64 String. |
| PDF URL | URL to the PDF file to classify. Only shown if Input Data Type is URL. |
| Document Name | Name of the document used during processing. Defaults to "document.pdf". |
| Output Binary Field Name | Name of the binary property where the output file will be stored. Defaults to "data". |
| Advanced Options | Collection of advanced options including "Custom Profiles" which allows JSON configuration for custom API call properties. |
Output
The node outputs JSON data representing the classification result of the processed PDF document. The exact structure depends on the classification API response but typically includes metadata about the document category or type.
If the node produces binary output, it stores the processed PDF or related file in a binary property named as specified by the "Output Binary Field Name" property.
Dependencies
- Requires an API key credential for the PDF processing service to authenticate requests.
- Needs network access to fetch PDFs if the URL input method is used.
- The node relies on the external PDF4me API for document classification functionality.
Troubleshooting
Common issues:
- Providing an incorrect binary property name when using binary input may cause the node to fail to find the PDF file.
- Invalid or inaccessible URLs will cause errors when fetching the PDF.
- Malformed base64 strings will lead to decoding errors.
- Missing or invalid API credentials will prevent successful API calls.
Error messages:
- "File not found in binary property": Check that the binary property name matches the actual input.
- "Failed to fetch PDF from URL": Verify the URL is correct and accessible.
- "Invalid base64 content": Ensure the base64 string is properly encoded.
- Authentication errors: Confirm the API key credential is configured correctly.
Links and References
- PDF4me API Documentation
- n8n documentation on working with binary data