Skip to Content

Google Docs

Description: Enable agents to interact with Google Docs documents.

Author: Arcade

Auth: User authorization via the Google auth provider

This Toolkit is not available in Arcade Cloud. You can use these tools with a self-hosted instance of Arcade.


PyPI VersionLicensePython VersionsWheel StatusDownloads

The Arcade Google Docs toolkit provides a pre-built set of tools for interacting with Google Docs. These tools make it easy to build agents and AI apps that can:

  • Create, update, list, and delete documents

Available Tools

These tools are currently available in the Arcade Google Docs toolkit.

Tool NameDescription
GoogleDocs.WhoAmIGet comprehensive user profile and Google Docs environment information.
GoogleDocs.GetDocumentByIdRetrieve a Google Docs document by ID.
GoogleDocs.GetDocumentAsDocMDRetrieve a Google Docs document by ID in DocMD format with metadata tags.
GoogleDocs.EditDocumentEdit a Google Docs document using natural language edit requests.
GoogleDocs.InsertTextAtEndOfDocumentInsert text at the end of a Google Docs document.
GoogleDocs.CreateBlankDocumentCreate a new blank Google Docs document with a title.
GoogleDocs.CreateDocumentFromTextCreate a new Google Docs document with specified text content.
GoogleDocs.SearchDocumentsSearch for documents in the user's Google Drive.
GoogleDocs.SearchAndRetrieveDocumentsSearch and retrieve the contents of Google documents in the user's Google Drive.
GoogleDocs.ListDocumentCommentsList all comments on the specified Google Docs document.
GoogleDocs.CommentOnDocumentComment on a specific document by its ID.

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.

GoogleDocs.WhoAmI


Get comprehensive user profile and Google Docs environment information.

Parameters

This tool does not take any parameters.


GoogleDocs.GetDocumentById


Get the latest version of the specified Google Docs document.

Parameters

  • document_id (string, required) The ID of the document to retrieve.

GoogleDocs.GetDocumentAsDocMD


Get the latest version of the specified Google Docs document in DocMD format. The DocMD output includes tags that can be used to annotate the document with location information, block types, block IDs, and other metadata.

Parameters

  • document_id (string, required) The ID of the document to retrieve.

GoogleDocs.EditDocument


Edit a Google Docs document using natural language edit requests. This tool is stateless and does not have context about previous edits. If your edit request depends on knowledge about previous edits, provide that context in the edit requests.

Note that this tool is agentic, and requires the secret OPENAI_API_KEY to be set.

Parameters

  • document_id (string, required) The ID of the document to edit.
  • edit_requests (list[str], required) A list of natural language descriptions of the desired changes to the document. Each entry should be a single, self-contained edit request that can be fully understood independently. Note: Each request may result in zero, one, or multiple actual edits depending on what changes are needed (e.g., a request might be ignored if the change already exists in the document).
  • reasoning_effort (enum (ReasoningEffort), optional) The effort to put into reasoning about the edits. Defaults to medium.

GoogleDocs.InsertTextAtEndOfDocument


Insert text at the end of an existing Google Docs document.

Parameters

  • document_id (string, required) The ID of the document to update.
  • text_content (string, required) The text content to insert into the document.

GoogleDocs.CreateBlankDocument


Create a blank Google Docs document with the specified title.

Parameters

  • title (string, required) The title of the blank document to create.

GoogleDocs.CreateDocumentFromText


Create a Google Docs document with the specified title and text content.

Parameters

  • title (string, required) The title of the document to create.
  • text_content (string, required) The text content to insert into the document.

GoogleDocs.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 to 50.
  • pagination_token (str, optional) The pagination token to continue a previous request

GoogleDrive.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 to 50.
  • pagination_token (str, optional) The pagination token to continue a previous request

GoogleDocs.ListDocumentComments


List all comments on the specified Google Docs document.

Parameters

  • document_id (string, required) The ID of the document to list comments for.
  • include_deleted (bool, optional) Whether to include deleted comments in the results. Defaults to False.

GoogleDocs.CommentOnDocument


Comment on a specific document by its ID.

Parameters

  • document_id (string, required) The ID of the document to comment on.
  • comment_text (string, required) The comment to add to the document.

Auth

The Arcade Docs toolkit uses the Google auth provider to connect to users’ Google accounts.

With the Arcade Cloud Platform, 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.


Reference

DocumentFormat

The format of the document to be returned.

  • MARKDOWN: Markdown format.
  • HTML: HTML format.
  • GOOGLE_API_JSON: Original JSON format returned by the Google API.

OrderBy

Sort keys for ordering files in Google Drive. Each key has both ascending and descending options.

  • CREATED_TIME: When the file was created (ascending).
  • CREATED_TIME_DESC: When the file was created (descending).
  • FOLDER: The folder ID, sorted using alphabetical ordering (ascending).
  • FOLDER_DESC: The folder ID, sorted using alphabetical ordering (descending).
  • MODIFIED_BY_ME_TIME: The last time the file was modified by the user (ascending).
  • MODIFIED_BY_ME_TIME_DESC: The last time the file was modified by the user (descending).
  • MODIFIED_TIME: The last time the file was modified by anyone (ascending).
  • MODIFIED_TIME_DESC: The last time the file was modified by anyone (descending).
  • NAME: The name of the file, sorted using alphabetical ordering (ascending).
  • NAME_DESC: The name of the file, sorted using alphabetical ordering (descending).
  • NAME_NATURAL: The name of the file, sorted using natural sort ordering (ascending).
  • NAME_NATURAL_DESC: The name of the file, sorted using natural sort ordering (descending).
  • QUOTA_BYTES_USED: The number of storage quota bytes used by the file (ascending).
  • QUOTA_BYTES_USED_DESC: The number of storage quota bytes used by the file (descending).
  • RECENCY: The most recent timestamp from the file’s date-time fields (ascending).
  • RECENCY_DESC: The most recent timestamp from the file’s date-time fields (descending).
  • SHARED_WITH_ME_TIME: When the file was shared with the user, if applicable (ascending).
  • SHARED_WITH_ME_TIME_DESC: When the file was shared with the user, if applicable (descending).
  • STARRED: Whether the user has starred the file (ascending).
  • STARRED_DESC: Whether the user has starred the file (descending).
  • VIEWED_BY_ME_TIME: The last time the file was viewed by the user (ascending).
  • VIEWED_BY_ME_TIME_DESC: The last time the file was viewed by the user (descending).

ReasoningEffort

The effort to put into reasoning about document edits.

  • MINIMAL: Minimal reasoning effort for simple, straightforward edits.
  • LOW: Minimal reasoning effort for simple, straightforward edits.
  • MEDIUM: Moderate reasoning effort for most editing tasks (default).
  • HIGH: Maximum reasoning effort for complex edits requiring careful analysis.
Last updated on