Drive
Description: Enable agents to interact with Google Drive.
Author: Arcade
Code: GitHub
Auth: User authorization via the Google auth provider
The Arcade Drive toolkit provides a pre-built set of tools for interacting with Google Drive. These tools make it easy to build agents and AI apps that can:
- Search Google documents in the user’s Google Drive
- Search and retrieve the contents of Google documents in the user’s Google Drive
Install
pip install arcade_google
Available Tools
These tools are currently available in the Arcade Drive toolkit.
Tool Name | Description |
---|---|
SearchDocuments | Search for documents in the user's Google Drive. Note: This tool currently requires a self-hosted instance of Arcade. |
SearchAndRetrieveDocuments | Search and retrieve the contents of Google documents in the user's Google Drive. Note: This tool currently requires a self-hosted instance of Arcade. |
If you need to perform an action that’s not listed here, you can get in touch with us to request a new tool, or create your own tools with the Google auth provider.
SearchDocuments
Search Google documents in the user’s Google Drive. Excludes documents that are in the trash.
Parameters
document_contains
(list[str], optional) Keywords or phrases that must be in the document title or body. Provide a list of keywords or phrases if needed.document_not_contains
(list[str], optional) Keywords or phrases that must not be in the document title or body. Provide a list of keywords or phrases if needed.search_only_in_shared_drive_id
(str, optional) The ID of the shared drive to restrict the search to. If provided, the search will only return documents from this drive. Defaults to None, which searches across all drives.include_shared_drives
(bool, optional) Whether to include documents from shared drives in the search results. Defaults to False (searches only in the user’s ‘My Drive’).include_organization_domain_documents
(bool, optional) Whether to include documents from the organization’s domain. This is applicable to admin users who have permissions to view organization-wide documents in a Google Workspace account. Defaults to False.order_by
(enum (OrderBy), optional) Sort order. Defaults to listing the most recently modified documents first.limit
(int, optional) The number of documents to list. Defaults to50
.pagination_token
(str, optional) The pagination token to continue a previous request
SearchAndRetrieveDocuments
Searches for documents in the user’s Google Drive and returns a list of documents (with text content) matching the search criteria. Excludes documents that are in the trash.
Parameters
document_format
(enum (DocumentFormat), optional) The format of the document to be returned. Defaults to Markdown.document_contains
(list[str], optional) Keywords or phrases that must be in the document title or body. Provide a list of keywords or phrases if needed.document_not_contains
(list[str], optional) Keywords or phrases that must not be in the document title or body. Provide a list of keywords or phrases if needed.search_only_in_shared_drive_id
(str, optional) The ID of the shared drive to restrict the search to. If provided, the search will only return documents from this drive. Defaults to None, which searches across all drives.include_shared_drives
(bool, optional) Whether to include documents from shared drives in the search results. Defaults to False (searches only in the user’s ‘My Drive’).include_organization_domain_documents
(bool, optional) Whether to include documents from the organization’s domain. This is applicable to admin users who have permissions to view organization-wide documents in a Google Workspace account. Defaults to False.order_by
(enum (OrderBy), optional) Sort order. Defaults to listing the most recently modified documents first.limit
(int, optional) The number of documents to list. Defaults to50
.pagination_token
(str, optional) The pagination token to continue a previous request
GetFileTreeStructure
Get the file/folder tree structure of the user’s Google Drive.
Parameters
include_shared_drives
(bool, optional) Whether to include shared drives in the file tree structure. Defaults to False.restrict_to_shared_drive_id
(str, optional) If provided, only include files from this shared drive in the file tree structure. Defaults to None, which will include files and folders from all drives.include_organization_domain_documents
(bool, optional) Whether to include documents from the organization’s domain. This is applicable to admin users who have permissions to view organization-wide documents in a Google Workspace account. Defaults to False.order_by
(enum (OrderBy), optional) Sort order. Defaults to listing the most recently modified documents first.limit
(int, optional) The number of files and folders to list. Defaults to None, which will list all files and folders.
Auth
The Arcade Drive toolkit uses the Google auth provider to connect to users’ Google accounts.
With the hosted Arcade Engine, there’s nothing to configure. Your users will see Arcade
as the name of the application that’s requesting permission.
With a self-hosted installation of Arcade, you need to configure the Google auth provider with your own Google app credentials.