Google Drive
Connects to the Google Drive API for browsing and managing files. An agent can list and search files, read metadata, export/read text content, and create folders.
Add to an agent node's tools array with _node_type: "tool-google-drive". See Connector Reference — How connectors are used.
Authentication
| Field | Required | Description |
|---|---|---|
access_token | Yes | OAuth2 access token for the Google Drive API, sent as Authorization: Bearer <token>. Typically populated from a stored OAuth connection via oauth_connection_id. |
{
"name": "google_drive",
"_node_type": "tool-google-drive",
"oauth_connection_id": "{{ connections.google }}"
}
Tools
gdrive_list_files
List files and folders in Google Drive.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
folder_id | string | No | Folder ID to list files from (default root) |
page_size | number | No | Number of files to return (default 20) |
mime_type | string | No | Filter by MIME type (e.g. application/vnd.google-apps.spreadsheet) |
Returns: A list of files as - **<name>** (<type label>) modified: <date> id: <id> lines, or "No files found.".
gdrive_search_files
Search for files in Google Drive by name or content.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
query | string | Yes | Search term (searches file names and full text) |
page_size | number | No | Max results (default 10) |
Returns: A list of files as - **<name>** (<type label>)\n <link> id: <id> lines, or "No files found.".
gdrive_get_file
Get metadata and details of a Google Drive file.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
file_id | string | Yes | Google Drive file ID |
Returns: A text block with the file name, type label, size in bytes, created/modified dates, and a link to view it.
gdrive_get_file_content
Export and read the text content of a Google Drive file (Google Docs exported as plain text, or download plain text files).
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
file_id | string | Yes | Google Drive file ID (works for Google Docs, plain text files) |
Returns: The file name as a heading followed by its content. Google Docs are exported as plain text and Google Sheets as CSV; other files are downloaded directly. Content longer than 10,000 characters is truncated with "...[truncated]".
gdrive_create_folder
Create a new folder in Google Drive.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
name | string | Yes | Folder name |
parent_id | string | No | Parent folder ID (default root) |
Returns: A confirmation message with the folder name, ID, and a link to view it.