N8N Tools - Document Processor
Overview
The N8N Tools - Document Processor node enables document processing using OCR (Optical Character Recognition), text extraction, and AI-powered analysis through the N8N Tools platform. It supports synchronous and asynchronous processing modes and can handle documents provided as binary data, URLs, or Base64 strings.
This node is beneficial in scenarios such as:
- Extracting structured text and tables from scanned PDFs or images.
- Performing OCR on image-based documents to convert them into searchable text.
- Analyzing documents with AI to classify content or extract insights.
- Quickly processing documents synchronously when low latency is required.
Practical examples include automating invoice data extraction, converting scanned contracts into editable text, or classifying incoming documents for workflow routing.
Properties
| Name | Meaning |
|---|---|
| Processing Options | Collection of options controlling how the document is processed: |
| - Output Format | Format for extracted content: JSON, Text, Markdown, HTML |
| - Language | OCR language code (e.g., auto, en, pt, es, fr, de) |
| - Include Images | Whether to extract and include images from the document (true/false) |
| - Include Tables | Whether to extract and preserve table structures (true/false) |
| - AI Analysis | Enable AI-powered content analysis (true/false) |
| - Extract Metadata | Extract document metadata like author and creation date (true/false) |
| Output | How to return processed results: |
| - JSON Response | Return processed data as JSON |
| - Binary File | Return processed document as a binary file |
| - Both | Return both JSON data and binary file |
Output
The node outputs an array of items, each containing:
json: The main output data object which includes:- Extracted text/content depending on the operation.
- Metadata such as job ID, processing time, success status, timestamp, and node version.
- If AI analysis is enabled, additional analyzed data may be included.
- In case of errors, an error message and failure status.
binary(optional): When configured to output binary or both, contains the processed document file as binary data, including filename and MIME type.
The structure varies based on the selected operation and output format but generally provides comprehensive processed document data either as structured JSON or as a downloadable file.
Dependencies
- Requires an active subscription and valid API key credential for the N8N Tools platform.
- Needs network access to the N8N Tools API endpoint.
- The node uses HTTP requests to communicate with the external API.
- No additional environment variables are required beyond the API credentials.
Troubleshooting
Invalid API Key or Subscription:
Error message:"N8N Tools API: Invalid subscription or API key. Please check your credentials."
Resolution: Verify that the API key credential is correct and the subscription is active.Missing Binary Data:
Error message:No binary data found under property "X"
Resolution: Ensure the input binary property name matches the actual binary data property in the input item.Unknown Operation or Input Source:
Error message:Unknown operation: ...orUnknown input source: ...
Resolution: Select a supported operation and input source from the node's dropdown options.Document Processing Timeout:
Error message:Document processing timeout after 30 seconds... This may indicate the Redis service is not connected or the document processing queue is not running.
Resolution: Check the availability and health of the N8N Tools backend services; consider switching to synchronous processing if appropriate.Async Processing Fallback:
If async processing times out, the node attempts synchronous processing automatically. If both fail, an error is thrown indicating both attempts failed.General HTTP Errors:
Any other HTTP or network errors will be surfaced with descriptive messages. Check network connectivity and API endpoint accessibility.
Links and References
- N8N Documentation – General n8n usage and node development.
- N8N Tools Platform – Official site for the N8N Tools API and services.
- OCR Language Codes – Supported languages for OCR processing.
If you need details about other operations or resources, feel free to ask!