Skip to main content

Read Document Action

The Read Document action allows an agent to read the full content of specific documents or URLs. This action is useful for incorporating document context into workflows and enables agents in subsequent steps to work with the retrieved information.

Limits

Keep the following limits in mind when using the Read Document action:

  • Files per step: A single Read Document step can read up to 100 files. If you need to process more files, split them across multiple steps.
  • Google Sheets: Reading a Google Sheet through this action retrieves approximately 1,000 rows. Rows beyond this limit aren’t included. If your sheet has more rows, consider exporting it and using Data Analysis instead.
  • Large documents: When a document’s content is very large, the agent may trim it to fit within the model’s context window. If this happens, you’ll see a warning that the document was partially read.

Configuration

caution

Prerequisites

Ensure your desired documents are accessible.

Configure the Read Document connector by entering search queries in one of two ways:

  • Define Fixed Queries Manually: Use this method to provide your exact queries to the Read Document agent. You can tag individual documents using the @ tag or enter a specific document’s URL.
  • Write a Plain Text Prompt for Glean to Generate Queries From: Glean uses this plain text field to generate queries, which it passes to the Read Document connector.