Reference · Tools
Gemini File Search
Search through uploaded files using Gemini file references.
Gemini File Search lets you query files already uploaded to the Gemini Files API by sending their URIs alongside a natural language prompt to Gemini's generateContent endpoint. The model reads the file contents directly and returns a generated text response — useful for building document Q&A pipelines, contract reviewers, or report summarizers without re-uploading files on every run.
- Node type
- Action
- Parameters
- 7
- Outputs
- Output, Error
- Credentials
- Google AI
Gemini File Search
Search through uploaded files using Gemini file references.
Overview
Gemini File Search sends uploaded file references along with a user query to the Gemini generateContent API. Files previously uploaded via the Gemini Files API are referenced by their file URIs (e.g. “files/abc123”) and included as file_data parts in the request. The model reads the file contents and generates a response based on them. Supports model selection, system prompts, generation config (temperature, maxOutputTokens), and configurable concurrency.
Category: AI
Tool Name: gemini_file_search
Version: 1
Appearance: Icon: gemini | Color: #ffffff
Node Type
Action — processes input items and produces output
Input / Output
| Direction | Port(s) |
|---|---|
| Input | Input |
| Output | Output, Error |
Credentials
This tool requires Google AI credentials. See the Credentials Guide for setup instructions.
Parameters
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
| Model | options | No | (current default) | The Gemini model to use for file search and response generation. Pick a specific version — labels are pinned, not aliased to “latest”. |
| Options: the Gemini chat models available to your workspace — pick one from the dropdown. | ||||
| System Prompt | string | No | — | Optional system instruction that guides how the model analyzes and responds about the files. Supports expressions. |
| User Message | string | Yes | — | The query or question about the uploaded files. Falls back to item.message or item.prompt if empty. Supports expressions like {{ $json.question }}. |
| File URIs | string | No | — | JSON array of Gemini file URIs (e.g. ’[“files/abc123”]’), or a single file URI. Can also come from item.json.fileUris. Files must be uploaded via the Gemini Files API first. Supports expressions. |
| Options | collection | No | {} | Optional generation and output settings — add only the fields you need. |
| — Temperature | number | No | 1 | Controls randomness. Lower values are more deterministic. Range: 0-2. |
| — Max Output Tokens | number | No | 8192 | Maximum number of tokens in the generated response. |
| — Response Field Name | string | No | response | The key name in the output JSON where the response text will be stored. |
| Include Input | boolean | No | false | Whether to merge the input item JSON into the output item. |
| Max Concurrency | number | No | 10 | Maximum number of items to process concurrently. |
Output Data
One request per input item, and one output item per input item. Every file named in File URIs is attached to that single request, so one item can ask a question that spans several documents. The answer lands on the field named by Response Field Name (response by default), with model, finishReason and usage beside it. The rest of the input item JSON is dropped unless Include Input is on; binary data on the input item is forwarded unchanged.
{
"response": "The answer, read out of the attached files",
"model": "the model that produced the answer",
"finishReason": "the API's reason for ending generation",
"usage": { "promptTokenCount": 2400, "candidatesTokenCount": 310 }
}
- An item with no usable file URI is an item error — the node needs at least one URI, from the parameter or from the item’s own
fileUrisfield. finishReasonis the API’s own reason for ending generation — the field to check when an answer looks cut off against the Max Output Tokens cap.usageis the token accounting the API returned for that call. It includes the tokens the attached files consumed, so large documents dominate the cost of a run.
Reference the result downstream by expression, e.g. {{ $json.response }}.
Usage Examples
- Ask questions about a PDF uploaded to Gemini Files API
- Summarize documents referenced by their Gemini file URIs
- Compare multiple uploaded files using Gemini
- Extract specific information from uploaded documents
- Analyze uploaded spreadsheets or reports with Gemini
Example Configuration
Ask one question about the file an upstream Gemini File Upload node just produced:
{
"type": "gemini_file_search",
"parameters": {
"userMessage": "Summarize the key findings in this document.",
"fileUris": "{{ $json.fileUri }}"
}
}
Compare several uploaded reports in one request:
{
"type": "gemini_file_search",
"parameters": {
"systemPrompt": "You are a financial analyst. Compare documents objectively and cite the report each figure came from.",
"userMessage": "Compare the revenue figures across all three quarterly reports.",
"fileUris": "[\"files/q1_report\", \"files/q2_report\", \"files/q3_report\"]",
"options": {
"temperature": 0.3,
"responseFieldName": "comparisonSummary"
}
}
}
Batch extraction — each item carries its own file on fileUris:
{
"type": "gemini_file_search",
"parameters": {
"systemPrompt": "Extract the invoice number, date and total amount. Reply with JSON only.",
"userMessage": "Extract structured invoice data from this file.",
"includeInput": true,
"maxConcurrency": 20,
"options": {
"temperature": 0,
"maxOutputTokens": 512,
"responseFieldName": "invoiceData"
}
}
}
Error Handling
| Mode | Behavior |
|---|---|
| stop | Halts workflow on first error |
| continue | Skips failed items, passes successful ones through |
| errorPort | Routes failed items to Error output port |
Tips
Gemini File Search sends previously uploaded file references and a user query to the Gemini generateContent API, enabling the model to read and reason over file contents. Use it when files have already been uploaded via the Gemini Files API and you need to extract insights or answers from them using a natural language query. The tool outputs a generated response text on the main channel, with failures routed to the error channel.
Frequently asked questions
Does this node upload files itself, or do files need to be uploaded first?
Files must already be uploaded via the Gemini Files API before this node can use them. Gemini File Search works exclusively with existing file references — you provide the file URIs (e.g. 'files/abc123') and the node includes them as file_data parts in the request. If you need to upload files as part of the same workflow, that step must happen upstream.
What credentials does this node require?
Gemini File Search authenticates using a Google AI credential (googleAi). You'll need to configure that credential in BusyBot with a valid Google AI API key before the node can make requests to the Gemini generateContent endpoint.
What does the node output, and how are errors handled?
On a successful run, the node routes the model's generated text response through the main Output channel. If the request fails — for example, due to an invalid file URI or an API error — execution is routed to the Error output instead of halting the workflow. This lets you handle failures gracefully with a separate branch.
Can I control the model's behavior, like response length or creativity?
Yes. The node exposes generation config options including temperature and maxOutputTokens, letting you tune how deterministic or verbose the model's responses are. You can also set a system prompt to give the model standing instructions, and select which Gemini model to use.
What is concurrency here, and when would I change it?
The node includes a configurable concurrency setting that controls how many requests it can process in parallel. If you're running Gemini File Search over a batch of file sets, increasing concurrency can speed up throughput. If you're hitting API rate limits from Google AI, lowering it can reduce errors from too many simultaneous requests.
Build with the Gemini File Search node
Drop it into a workflow, wire it to an agent, or call it on a schedule. You'll need Google AI credentials first.
Open BusyBotLast updated . Spotted something wrong? Tell us.