Skip to main content

Google Docs action pack

With Google Docs actions, you can create, update, copy, and edit documents directly from Glean without switching to Google Docs.

This allows users to create, update, copy, and edit documents without switching between applications.

Google Docs actions are part of the broader Google action suite.

When building a workflow agent, the Google Docs action pack is available within the Plan and Execute step. For agents with auto mode, the Google Docs action pack is available for all steps. This allows the agent to dynamically determine when to create or update documents to fulfill a complex user request.

Supported tools

The Google Docs action pack is enabled as a unified bundle.

The following tools are included:

Document creation and discovery

  • Copy document: Creates a copy of an existing Google Docs document, including its content and formatting.
  • Search documents: Searches for Google Docs documents so agents can find the right file before reading or updating it.
  • Get document by ID: Retrieves a specific Google Docs document by its document ID.

Document editing

  • Replace all text: Finds and replaces all occurrences of a specified text string in a Google Docs document.
  • Update document section from Markdown: Updates a specific section of an existing Google Docs document using Markdown-formatted content.

Example use cases

Google Docs actions support several common workflow patterns:

  • Markdown-to-Docs creation: An agent can turn Markdown content into a formatted Google Doc for sharing with stakeholders.
  • Template-based document creation: A workflow can copy an existing document and reuse its structure for a new deliverable.
  • Targeted document updates: An agent can update a specific section of a document without rewriting the entire file.
  • Content standardization: An agent can replace outdated terms, product names, or repeated text across a document.
  • Document lookup and retrieval: A workflow can search for the right document, retrieve it by ID, and use that context in later steps.

Setup and configuration

Prerequisites

Before configuring Google Docs actions, ensure you have the following:

  • You must have administrative access to the Glean Admin console.
  • Your organization must have an existing Google Drive data source configured in Glean.
  • You must have access to the Google Cloud Console to enable the required APIs and configure OAuth credentials.
  • The Google Drive API must be enabled in the Google Cloud project linked to your Google actions configuration.

Administrator steps

  1. Enable the action pack: In Glean, go to Admin consolePlatformActions and add Google Docs extension actions from the template library.
  2. Select the data source instance: Link the action pack to your existing Google Drive data source instance.
  3. Configure authentication: Google Docs actions use OAuth user authentication.
    • Central: Use the Glean-managed Google OAuth app when it is available in your environment.
    • Custom OAuth app: If using a customer-managed app, register it in the Google Cloud Console, enable the Google Drive API, configure the OAuth consent screen, and enter the client credentials in Glean.
  4. Save the action pack after authentication is complete.
  5. Enable the pack for users: Use Edit settings under Enable Actions to make the pack available to the relevant users and supported Glean surfaces.
note

Google Docs actions use OAuth user authentication exclusively. Domain-wide Delegation is not supported for Google Docs extension actions.

For detailed setup steps, see Google actions setup.

FAQ