> For the complete documentation index, see [llms.txt](https://docs.glbnxt.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.glbnxt.com/tutorials/guides/docling-in-langflow.md).

# Using Docling in LangFlow

### Introduction

Docling is an advanced document parsing engine designed to convert complex, multi-format documents (such as PDFs, DOCX, and PPTX) into clean, LLM-ready Markdown or JSON structures. Integrating Docling into your LangFlow workflows within the GLBNXT ecosystem allows you to build highly accurate Retrieval-Augmented Generation (RAG) pipelines and document processing agents.

***

### Prerequisites

Before configuring Docling within your LangFlow workflows, ensure you have the following:

* **LangFlow Environment:** An active instance of LangFlow running within your secure GLBNXT workspace.
* **Docling Credentials:** Use the URL provided in **Configuration** to setup your Docling Account.

***

### Installation

#### Step 1: Add the Docling Serve Node

1. Create a new workflow or open an existing one
2. Search for 'Docling' in the `Search` bar
3. Drag **Docling Serve** and **Export DoclingDocument** to the playground

#### Step 2: Add the Credentials

1. Select the **Docling Serve** node
2. Add the following URL in **Server address:**

```url
http://platform-docling.platform-docling
```

3. You are now able to use Docling in LangFlow

#### Step 3: Example

1. Create the following flow in LangFlow:

<img src="/files/TzOg1IGKQxSykNoT0ZRb" alt="" width="200">

* **Parser:** Search for 'Parser' in the `Search` bar, drag the node to the playground and select 'Stringify' for **Mode**.
* **Chat Output:** Search for 'Chat Output' in the `Search` bar and drag the node to the playground.

2. Select a file in the **Docling Serve** node
3. Click `Playground` at the right top corner of your screen
4. Press `Run Flow` at the bottom of your screen
5. You will get the following output:
6. The json "text" output displays the converted content of the selected document and can be used to build highly effective document processing agents.

***

### Configuration

This section covers all configuration options available in Docling. Use these parameters to customize extraction pipelines, adjust OCR models, tune table structure identification, and tweak Vision-Language Models (VLM).

#### 1. Docling Serve Component

This component uses Docling to process input documents by connecting to a live instance of Docling Serve.

**`Files`**

* **Langflow Field Type**: `FileInput` (Supports file listing/uploading)
* **Default**: Contains uploaded file metadata (e.g., `dummy_1.pdf`)
* **Description**: Allows local files to be uploaded directly into the Langflow canvas environment for batch submission to the Docling Serve backend.
* **Useful Scenario**: Handy when prototyping a flow with static sample PDFs before transitioning to fully automated stream inputs.

**`Server File Path`**

* **Langflow Field Type**: `StrInput`
* **Default**: Empty
* **Description**: Specifies a direct host or server file system path where the targeted document is already physically stored.
* **Useful Scenario**: Essential if you want to skip network upload overhead and directly parse massive files sitting on a shared network drive or local server volume.

**`Separator`**

* **Langflow Field Type**: `StrInput` (Global variables available)
* **Default**: Empty
* **Description**: Defines a custom token or character string used to format boundaries or structural segments within the incoming file stream.
* **Useful Scenario**: Use this if your pipeline demands custom data boundary markers between file iterations during preprocessing.

**`Silent Errors`**

* **Langflow Field Type**: `BoolInput` (Toggle)
* **Default**: `false` (Disabled)
* **Description**: Determines whether internal ingestion exceptions are suppressed or if they should actively break execution and throw explicit component trace logs.
* **Useful Scenario**: Turn on in high-throughput production environments where you don't want a single corrupt file to halt your entire active multi-agent user chat flow.

**`Delete Server File After Processing`**

* **Langflow Field Type**: `BoolInput` (Toggle)
* **Default**: `true` (Enabled)
* **Description**: Automatically wipes the target file from the processing server's transient memory or scratch directory upon execution completion.
* **Useful Scenario**: Highly recommended for enterprise applications handling strict data-privacy compliance (like GDPR or HIPAA), ensuring no data remnants are left behind.

**`Ignore Unsupported Extensions`**

* **Langflow Field Type**: `BoolInput` (Toggle)
* **Default**: `true` (Enabled)
* **Description**: Instructs the ingestion worker to gracefully skip over files with unparseable format extensions rather than crashing the loop.
* **Useful Scenario**: Keeps processing smooth if a folder ingestion contains a mix of documents and unsupported background clutter files (like `.DS_Store` or system configs).

**`Ignore Unspecified Files`**

* **Langflow Field Type**: `BoolInput` (Toggle)
* **Default**: `false` (Disabled)
* **Description**: Filters out and safely ignores incoming files that do not strictly align with the component's expected validation parameters.
* **Useful Scenario**: Helps build a defensive gateway if your canvas relies on user-submitted file directories containing messy bulk uploads.

**`Server address`**

* **Langflow Field Type**: `StrInput` (Required field)
* **Default**: Configuration endpoint URL
* **Description**: The direct network API address where your deployed Docling Serve container instance is hosted and listening.
* **Useful Scenario**: Points the component to an external high-performance processing server (e.g., `[http://platform-docling.platform-d](http://platform-docling.platform-d)...`) instead of burning local canvas CPU.

**`Task ID`**

* **Langflow Field Type**: `StrInput`
* **Default**: Empty
* **Description**: Tracks or explicitly tags the conversion batch under a specific execution job identifier.
* **Useful Scenario**: Useful for integrating downstream logging tools to monitor historical processing metrics for specific system operations.

**`Concurrency`**

* **Langflow Field Type**: `IntInput`
* **Default**: `2`
* **Description**: Controls the maximum number of parallel document execution loops running concurrently against the serve backend.
* **Useful Scenario**: Bump this value up if you have a multi-core server deployment and need to digest bulk libraries of data quickly.

**`Maximum poll time`**

* **Langflow Field Type**: `IntInput`
* **Default**: `3600` (seconds)
* **Description**: Sets the global duration limit the component will wait on background job loops before enforcing a connection timeout.
* **Useful Scenario**: Useful when working with enormous hundred-page legal or corporate filings that require extended processing times without dropping the network thread.

**`HTTP headers`**

* **Langflow Field Type**: `TableInput` (`Open table` modal button)
* **Default**: Empty
* **Description**: Allows input of custom HTTP keys, cookies, or authorization tokens sent with each request to the server endpoint.
* **Useful Scenario**: Critical if your enterprise Docling Serve cluster is locked down behind a secure API gateway or requires explicit `Bearer` tokens to access.

**`Docling options`**

* **Langflow Field Type**: `NestedConfigInput` (`Edit Docling Serve Opts` modal button)
* **Description**: Grants a nested configuration interface to modify the underlying extraction models, OCR limits, and deep structural settings.
* **Useful Scenario**: Opens up advanced tweaking options like tuning visual layout recognition or switching OCR engine libraries.

#### 2. Export DoclingDocument Component

This component exports structured `DoclingDocument` object data into clean downstream strings such as Markdown, HTML, or JSON.

**`JSON or Table`**

* **Langflow Input Connection**: Input node connection handle (Required)
* **Description**: Accepts raw structured telemetry objects directly from the Docling Serve output handle.
* **Useful Scenario**: Connects the output wire of the Docling Serve component into this input node to translate the raw extracted values into reader-friendly strings.

**`Export format`**

* **Langflow Field Type**: `DropdownInput`
* **Default**: `Markdown`
* **Description**: Defines the programmatic rendering style applied to the target text stream.
* **Useful Scenario**: Leaving it on `Markdown` is perfect for standard RAG ingestion, as LLMs read structural headers (`#`), bold text, and bullet points natively.

**`Image export mode`**

* **Langflow Field Type**: `DropdownInput`
* **Default**: `placeholder`
* **Description**: Sets how extracted graphical assets are declared inside the written file structure.
* **Useful Scenario**: Setting this to `placeholder` drops light structural text labels into the file structure, ensuring text chunks stay small and clean without bulky inline visual encoding.

**`Image placeholder`**

* **Langflow Field Type**: `StrInput`
* **Default**: `<!-- image ->`
* **Description**: The precise string text syntax injected directly into the document structure wherever a graphic elements box is removed.
* **Useful Scenario**: Allows regular expressions or text splitters later in your Langflow canvas to quickly recognize or clean out picture markers.

**`Page break placeholder`**

* **Langflow Field Type**: `StrInput`
* **Default**: Empty
* **Description**: The designated boundary string injected precisely between physical document pages.
* **Useful Scenario**: Enter a tag like `---PAGE-BREAK---` so your chunking nodes can gracefully maintain structural alignment with the original document's page numbers.

**`Doc Key`**

* **Langflow Field Type**: `StrInput`
* **Default**: `doc`
* **Description**: Establishes the primary lookup dictionary handle key when packing the component's output context array.
* **Useful Scenario**: Ensures downstream Langflow Prompt or LLM nodes can query the exact payload reference easily via a matching token name.

***

### Troubleshooting

**Issue: Poll Timeout Errors on Multi-Page Documents**

* **Cause**: Complex, scanned, or multi-hundred-page PDFs require significant processing time for layout segmentation and OCR passes. This causes the Langflow component to stop waiting before the server completes the job.
* **Solution**: Increase the **Maximum poll time** parameter inside your **Docling Serve** component to a higher threshold (e.g., `7200` seconds for 2 hours) or utilize the **Page Range Start** and **Page Range End** boundaries to isolate and process critical page subsets instead of the entire text stream.

**Issue: Component Wire Connection Refused (`JSON or Table` Input Disconnected)**

* **Cause**: The **Export DoclingDocument** component requires a valid structured telemetry object dictionary to successfully execute structural translations into Markdown or HTML.
* **Solution**: Check your canvas connections. Ensure that the terminal output handle of the **Docling Serve** component is securely wired directly into the **JSON or Table** input slot of the export component. Verify that the **Doc Key** matching value (defaulting to `doc`) is uniformly defined across your active data dictionary.

**Issue: Network Isolation / Connection Refused to Docling Serve**

* **Cause**: The Langflow runtime cannot resolve or communicate with the target hosting container due to an incorrect endpoint path or strict internal docker network isolation rules.
* **Solution**: Double-check the **Server address** input field. Ensure that the URL includes the proper port and protocol (e.g., `[http://platform-docling.platform-d](http://platform-docling.platform-d)...`). If running via Docker Compose, verify that both the Langflow application container and the Docling Serve cluster share the same virtual network bridge.

**Issue: Workflow Crashing on Unrecognized Layout Elements or File Formats**

* **Cause**: The document stream contains corrupt internal elements, unsupported asset wrappers, or stray system files that disrupt parsing logic mid-run.
* **Solution**: Toggle the **Silent Errors** parameter to active to safely suppress non-critical exceptions. Additionally, ensure both **Ignore Unsupported Extensions** and **Ignore Unspecified Files** are toggled on to safely skip processing anomalies without dropping your entire live agent chat pipeline.

***

*Need help? Contact the GLBNXT support team or ask a GLBNXT agent to walk you through the setup.*


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.glbnxt.com/tutorials/guides/docling-in-langflow.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
