> For the complete documentation index, see [llms.txt](https://docs.stackai.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.stackai.com/guides-and-quickstarts/workflow-builder/document-image-and-url-processing.md).

# Document, image, and URL processing

Document, image, and URL nodes make source content available to a workflow. Select the representation that the next step needs: extracted text, an original file, or webpage content.

{% embed url="<https://files.gitbook.com/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FSQ1Sgy933krTyK0S4JpP%2Fuploads%2FeDoAU9vC8BKj4VoLNrJy%2FG027.mp4?alt=media&token=48db82ec-dfc4-468c-9563-a0b99ce04d4b>" %}

## Process a document

Add a document to the Files input.

![Document supplied through Files input](https://content.gitbook.com/content/SQ1Sgy933krTyK0S4JpP/blobs/xOpgyviU2vgCFzmISIvy/assets/g027-g027-01-pdf-file.png)

Check the selected file before you configure the steps that will process its contents.

Open the document preview and inspect the source.

![Document preview and source information](https://content.gitbook.com/content/SQ1Sgy933krTyK0S4JpP/blobs/AYKUgTeF8BVrzOARcQ3r/assets/g027-g027-02-pdf-preview.png)

Identify the information the workflow needs to extract so you can compare it with the result.

Insert Files → Full Parsed Text into the model's Prompt.

![Full Parsed Text mapped into Prompt](https://content.gitbook.com/content/SQ1Sgy933krTyK0S4JpP/blobs/bTE5Ud2Ex4LBRKGENToV/assets/g027-g027-03-pdf-prompt.png)

This gives the model extracted document text rather than only the file's location.

Run the document path and inspect Output.

![Document-processing output](https://content.gitbook.com/content/SQ1Sgy933krTyK0S4JpP/blobs/J2o9u8cZ33HQFLHLPyzK/assets/g027-g027-04-pdf-result.png)

Compare the answer with the source document to confirm that the required information was extracted correctly.

## Read an image

For image processing, supply the image through Files and use its File URLs output where the action expects an image URL.

![Image supplied through Files and File URLs](https://content.gitbook.com/content/SQ1Sgy933krTyK0S4JpP/blobs/ksTj1r9e9NB7rAcHUtwE/assets/g027-g027-05-image-file.png)

Review parsing settings so you know whether the next step receives text or the original image.

In Image to Text, map the image URL field to Files → File URLs and choose a vision model.

![Image to Text URL mapping and vision model](https://content.gitbook.com/content/SQ1Sgy933krTyK0S4JpP/blobs/VsJUFdfGGrp00gB8HqEl/assets/g027-g027-06-image-config.png)

State what text or visual information the action must extract.

Run the image path and expand its output.

![Expanded image-processing result](https://content.gitbook.com/content/SQ1Sgy933krTyK0S4JpP/blobs/zS7PkEluCVPA6moHtmu6/assets/g027-g027-07-image-result.png)

Review the full transcription or description, including fields that are truncated in the initial view.

## Extract content from a webpage

For webpage extraction, enter the Website URL and choose a Scraping Mode.

![Website URL and Scraping Mode](https://content.gitbook.com/content/SQ1Sgy933krTyK0S4JpP/blobs/BFbME6hVKoY9yjZmn7wR/assets/g027-g027-08-url-options.png)

Enable subpage scraping only when you need content beyond the selected page.

Insert the fetched webpage content into the model's Prompt.

![Fetched webpage content in Prompt](https://content.gitbook.com/content/SQ1Sgy933krTyK0S4JpP/blobs/rPKBuMNlKTYsh610bM8D/assets/g027-g027-09-url-prompt.png)

Tell the model what information to derive from that content.

Run the webpage path and compare the answer with the fetched source.

![Webpage-processing answer and source attribution](https://content.gitbook.com/content/SQ1Sgy933krTyK0S4JpP/blobs/EbnmD8qlD9Th6FGEmCtj/assets/g027-g027-10-url-result.png)

Check source attribution when citations are included, because webpage content can change.

## Important behavior

Parsed text can omit visual information. Pass the original image when the next step needs to inspect its appearance.

Webpage extraction depends on the content the service can access. Enable subpage scraping only when you need more than the supplied page.

## Related steps

* [Map variables and expressions](https://docs.stackai.com/guides-and-quickstarts/workflow-builder/map-variables-and-expressions.md)
* [Workflow debugging and node results](https://docs.stackai.com/guides-and-quickstarts/workflow-builder/workflow-debugging-and-node-results.md)


---

# 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 by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.stackai.com/guides-and-quickstarts/workflow-builder/document-image-and-url-processing.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
