DocsNodesAIDoc Extractor Node (Deprecated)

Doc Extractor Node (Deprecated)

⚠️

This node is deprecated. You can no longer add a new Doc Extractor node from the palette. Existing flows keep running unchanged, nothing breaks. For new extraction work, use Agentic Doc Extraction, which supports the same job plus native structured extraction, stored images with bounding boxes, and a per-run isolated container. See Migrating from Doc Extractor if you want to move an existing flow.

Loading node sections...

Overview

The Doc Extractor node extracts content from a document URL (PDF or image), sends it to a selected LLM, and applies prompt-based instructions during extraction. You can control both the extraction behavior and the final response shape so downstream nodes receive output in the format you need.

Node Type Information

TypeDescriptionStatus
Batch TriggerStarts the flow on a schedule or batch event. Ideal for periodic data processing.❌ False
Event TriggerStarts the flow based on external events (e.g., webhook, user interaction).❌ False
ActionExecutes a task or logic as part of the flow (e.g., API call, transformation).✅ True

This node is an Action node that reads document content, applies LLM-guided extraction prompts, and returns structured output.

Features

Key Functionalities
  1. LLM-Guided Extraction: Select an LLM model to interpret document content and extract relevant information intelligently.
  2. Instruction-Driven Parsing: Provide extraction instructions with a custom prompt so the model returns only the fields and structure you need.
  3. Document URL Input: Use a direct PDF/image URL or pass a URL dynamically from an upstream node.
  4. Configurable Output Format: Return output as markdown, json, or plain text based on your workflow requirements.
  5. Page Handling Control: Choose whether to join multi-page documents into a single response.
Benefits
  1. Flexible Automation: Adapt extraction logic for invoices, reports, forms, receipts, and other document types.
  2. Consistent Downstream Processing: Standardized output format simplifies chaining into parser, logic, and storage nodes.
  3. Reduced Manual Parsing: Replace brittle OCR-only pipelines with prompt-guided extraction.
  4. Reusable Configuration: Keep prompts and model settings reusable across multiple flows.

What Can I Build?

  1. Invoice and receipt data extraction pipelines
  2. Resume and profile parsing automations
  3. Contract or policy document summarization workflows
  4. Document-to-JSON enrichment pipelines for databases and APIs

Prompt Examples

Invoice Data Extractor

Extracts key fields from an invoice PDF.

Document URL

{{triggerNode_1.document_url}}

System Prompt

Extract the following fields from this invoice:
- Invoice number
- Vendor name
- Invoice date
- Due date
- Line items (description, quantity, unit price)
- Total amount

Return as JSON. Use null for any field not found in the document.

Settings

  • Output Format: JSON
  • Join Pages: On

Resume Parser

Extracts candidate details from a resume PDF.

Document URL

{{triggerNode_1.document_url}}

System Prompt

Extract the following details from this resume:
- Full name
- Email address
- Phone number
- Current job title
- Years of experience
- Top 5 skills

Return as JSON. Use null for any field not found.

Settings

  • Output Format: JSON
  • Join Pages: On

Use JSON output format when passing data to downstream nodes. Switch to Markdown only for human-readable reports.

Setup

Select the Doc Extractor Node

  1. Add the Doc Extractor node to your flow.
  2. Select the LLM model for extraction.
  3. Enter a document URL (PDF or image), or map it from an upstream node.
  4. Add extraction instructions and optional custom extraction prompt.
  5. Select the output format and page-join behavior.
  6. Run and validate the output in node logs or downstream nodes.

Configuration Reference

ParameterDescriptionRequiredExample
LLM ModelModel used to extract and structure document content.YesGemini 2.5 Flast Lite
PromptInstructions that define what to extract and how to structure it.YesExtract invoice number, vendor, line items, totals, and due date.
Document URLURL of the document (PDF or image). Accepts direct URL or variable input from upstream node.Yes{{trigger.document_url}}
Custom Extraction PromptOverrides the default OCR prompt sent to the Gemini model. Leave empty to use the built-in prompt.NoFocus on tabular data and preserve numeric precision.
Output FormatOutput response format: markdown, json, or plain text.Yesjson
Join PagesIf true, combines all pages into one extraction output. If false, keeps page-level granularity.Yestrue

Prompting Tips

  • Be explicit about required fields, output keys, and formatting rules.
  • For JSON output, list expected keys and types to reduce malformed responses.
  • Add fallback instructions for missing values (for example: "null" when field not found).
  • If precision matters (amounts, IDs, dates), explicitly tell the model to avoid normalization.

Low-Code Example

nodeName: Doc Extractor
documentUrl: '{{triggerNode_1.output.url}}'
customPrompt: ''
mistralIncludeAnnotations: false
mistralTableFormat: markdown
outputFormat: markdown
joinPages: true
schema: ''
ocrModelName:
  - configName: configA
    type: ocr/document
    provider_name: gemini
    credential_name: MODEL_CRED_NAME
    credentialId: 1f2d5b1e-9e8e-4b82-9996-70e351f8f720
    model_name: gemini/gemini-2.5-flash-lite
    params: {}
prompts:
  - id: ID
    role: user
    content:""
 

Output

The node returns extracted content in the format you selected:

  • markdown: Useful for human-readable summaries and reports.
  • json: Best for structured automation and downstream programmatic parsing.
  • plain text: Lightweight output for quick processing or logging.

Troubleshooting

Common Issues

ProblemSolution
Document URL not accessibleVerify URL is public/reachable and points to a valid PDF or image file.
Missing fields in outputTighten extraction instructions and add explicit required keys in your prompt.
Output format mismatchConfirm Output Format selection and ensure prompt aligns with that format.
Weak OCR qualityUse a clearer source document and add a Custom Extraction Prompt emphasizing OCR precision.

Debugging

  1. Test with a known sample document before production input.
  2. Start with JSON output for easier validation.
  3. Check node logs to compare prompt, model response, and final parsed output.

Was this page useful?

Subscribe to updates