Parse Document
Available Since
- v5.2.38 and later
The Parse Document task is used to parse and chunk documents from various sources such as cloud storage (S3, GCS), public Git repository files, and websites. It supports multiple file types, including Office documents, PDFs, HTML, images (via OCR), ZIP archives, and text files.
During execution, the task extracts text content from the specified location and converts it into Markdown format optimized for LLM processing. The Markdown format preserves headings, tables, lists, and other document structures, making it suitable for embedding generation, summarization, and semantic search workflows.
Prerequisites
If the location of the document is not publicly available, you must create an appropriate integration with the required access keys or tokens. Integrate the following with Orkes Conductor, depending on your source:
Task parameters
Configure these parameters for the Parse Document task.
| Parameter | Description | Required/ Optional | ||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| inputParameters.integrationName | If the location of the document to be parsed is not publicly available, select the integration name of the Cloud Providers integrated with your Conductor cluster. Note: If you haven’t configured any integration on your Orkes Conductor cluster, go to the Integrations tab and configure the required Cloud Providers. |
Optional. | ||||||||||||||||||||||||||
| inputParameters.url | The URL of the document or archive to parse. Examples for URL format:
|
Required. | ||||||||||||||||||||||||||
| inputParameters.mediaType | The media type to parse. If not set, the media type is detected from the file extension in the URL. All documents are converted to Markdown. Supported values:
|
Optional. | ||||||||||||||||||||||||||
| inputParameters.chunkSize | The maximum number of characters per chunk. Enter a value between 100 and 10,000 for semantic chunking. If not set or set to 0, the document is split into chunks of up to 12,000 characters. |
Optional. | ||||||||||||||||||||||||||
| inputParameters.outputGuardrail Available since: v5.5.0 and later | Scrubs or validates the model's response text before it's returned.
|
Optional. |
The following are generic configuration parameters that can be applied to the task and are not specific to the Parse Document task.
Other generic parameters
Here are other parameters for configuring the task behavior.
| Parameter | Description | Required/ Optional |
|---|---|---|
| optional | Whether the task is optional. If set to true, any task failure is ignored, and the workflow continues with the task status updated to COMPLETED_WITH_ERRORS. However, the task must reach a terminal state. If the task remains incomplete, the workflow waits until it reaches a terminal state before proceeding. |
Optional. |
Task configuration
This is the task configuration for a Parse Document task.
{
"name": "parse_document",
"taskReferenceName": "parse_document_ref",
"inputParameters":
{
"integrationName": "<YOUR-INTEGRATION-HERE>",
"url": "<DOCUMENT-URL>",
"mediaType": "auto",
"chunkSize": 1024
},
"type": "PARSE_DOCUMENT"
}
Task output
The Parse Document task will return the following parameters.
| Parameter | Description |
|---|---|
| result | Array of strings containing the parsed document text. Each element is one text segment; if the document is shorter than the chunk size, the array contains a single element with the full content. |
Examples
Here are some examples for using the Parse Document task.
Using Parse Document task
To illustrate the Parse Document task, the following workflow parses a publicly available PDF.
To create a workflow definition using Conductor UI:
- Go to Definitions > Workflow, from the left navigation menu on your Conductor cluster.
- Select + Define workflow.
- In the Code tab, paste the following code:
Workflow definition:
{
"name": "parse_document_example_pdf",
"description": "Parse a public PDF and return text segments",
"version": 1,
"schemaVersion": 2,
"tasks": [
{
"name": "parse_document",
"taskReferenceName": "pd",
"type": "PARSE_DOCUMENT",
"inputParameters": {
"url": "https://www.niti.gov.in/sites/default/files/2023-02/Annual-Report-2022-2023-English_06022023_compressed.pdf",
"mediaType": "application/pdf",
"chunkSize": 1000
}
}
]
}
- Select Save > Confirm.
Let’s execute the workflow using the Execute button.
When executed, the workflow retrieves the PDF from the provided URL, extracts readable text content, and divides it into smaller text segments based on the specified chunk size.
After successful execution, the Parse Document task produces the following output:

Each segment preserves the structure and order of the document, including section headers and line breaks. The extracted segments are returned in the result array and are ready for downstream processing, such as summarization, embedding generation, or indexing.