Query Multiple Documents
Process multiple documents with a custom prompt using LLM file upload APIs.
Overview
This procedure processes multiple documents with a custom prompt by uploading them directly to the LLM provider's file API (OpenAI Files API or Gemini Part). No OCR or image conversion is performed - the documents are sent as-is to the LLM for processing. This is efficient for handling multiple documents in a single API call.
Make sure to add the Document Processing Book to your agent before using this automation procedure.
This procedure uploads PDF files directly to the LLM provider without OCR processing. It does not support scanned documents. Documents are processed in their native format using the LLM's file upload capabilities.
Syntax
Below is a line-by-line overview of the automation syntax. Expand each line to learn more.
the query is "your-query"
What does it do?
Specifies the custom query/prompt to use for processing the documents.
Where does it go?
Indented under query the documents where.
Is it required?
✅ Yes — This phrase is required.
Does it require data?
✅ Yes — Replace your-query with your custom instruction for the LLM.
Example
the query is "Extract all invoice numbers and dates from these documents"the response format is "response-format"
What does it do?
Specifies the desired format of the response.
Where does it go?
Indented under query the documents where.
Is it required?
❌ No — This phrase is optional.
Does it require data?
✅ Yes — Replace response-format with one of the following: string, text, table, list of texts, list of tables, structured data, json. The default is string.
Example
the response format is "json"Examples
1. Extract Invoice Information from Multiple Documents
2. Summarize Multiple Reports
3. Compare Multiple Contracts
Last updated
Was this helpful?
