Skip to main content

Overview

Tool Name

Purpose

The google_drive_tools integration connects your workflows to Google Drive and Google Workspace. Create and edit Sheets and Docs, manage files and folders, read and import Google Slides decks, format content, collaborate with comments, and automate updates across projects. Supports both User OAuth (recommended for interactive use) and Service Account (for automation and shared folders) authentication through Config → Connections.

Key Features & Functions

Sheets Operations

Read and write cell ranges, append data, manage tabs, apply formatting and themes, and export query results to Google Sheets.

Docs Operations

Create, read, update, and append content in Google Docs. Create formatted documents and apply text formatting.

Native Slides Reads

Read Google Slides decks directly through the Slides API, preserve notes and structure, summarize decks, and import them into Genesis presentation apps.

Files and Folders

List folders, get links, upload, download, move, and delete files.

Collaboration

Retrieve comments, add replies, and coordinate reviews without leaving your workflow.

Formatting

Apply cell formatting, sheet themes, conditional formatting, and format presets to Sheets. Format text in Docs.

Named Connections

Use multiple Google Workspace connections by name (e.g. shared, finance) for different teams or purposes.

Input Parameters

google_drive

Core Parameters Sharing Parameters Formatting Parameters Presentation Parameters File Parameters

Action Reference

Drive & Folder Operations

Sheets Operations

For a rectangular update, pass rows as a 2D array and use the start cell; the values spread down and right:
Drive listings and creates use g_folder_id when supplied; otherwise they use the connection’s configured folder. With no configured folder, a User OAuth or agent-mailbox connection uses that signed-in account’s My Drive root. A service-account connection falls back to the instance’s shared root set by SET_ROOT_FOLDER, or its My Drive root when no shared root is set. Create results name the destination folder. See Google Workspace Setup for configuring a service-account shared folder. For SAVE_MULTI_QUERIES_TO_G_SHEET, each tab must name a database connection using connection_id in tabs_spec or on that tab; there is no implicit default connection. All tab queries are checked before execution; if any is not classified as READ (including UNKNOWN), the export is refused before a sheet is created, including on a dry run. Each query runs through _query_database on its selected connection. Each tab keeps up to 100000 rows; a longer result is truncated and marked truncated in that tab’s result. REORDER_TAB requires tab_index to be between 0 and the last zero-based tab position, and returns the updated tab list. It makes three Google Sheets API calls: a metadata read, the move, and a read of the resulting order. SAVE_MULTI_QUERIES_TO_G_SHEET accepts drop_default_tab in tabs_spec (default false); when it creates a new spreadsheet, true removes its empty default Sheet1 after the export. This option adds a metadata read and, when Sheet1 exists beside another tab, a values read; an empty default tab is then deleted with a batch update. A populated default tab or the spreadsheet’s only tab is left in place. For example, remove a tab only after the user has asked for it with google_drive(action="DELETE_TAB", g_file_id="sheet-id", tab_name="Draft", confirm=true).

Docs Operations

Presentations (Google Slides)

Comments & Collaboration

For example, add a comment with google_drive(action='ADD_COMMENT', g_file_id='1AbC', g_sheet_values='Totals look right'), or reply with google_drive(action='ADD_REPLY_TO_COMMENT', g_file_id='1AbC', g_file_comment_id='AAAB12', g_sheet_values='Done, B5 is filled in'). If Drive returns no created comment or reply, the action reports failure rather than success. For comment-triggered agent mailbox turns, including read-only fallbacks when the file or comment is unavailable or Drive cannot match the notice, and when the agent may reply on the waking comment, see Google Workspace setup.

Setup & Authentication

Use Cases

Share a file

Use SHARE_FILE for an existing file, or pass share_with when creating a Sheet, Doc, or Slides presentation. Include share_reason for either path; it is shown to the person who may approve the share. A named share to the requesting person runs immediately only when the selected connection is that person’s own Google sign-in. With an agent-mailbox connection, the share is made from the mailbox; a person with access to the agent can decide held shares in Action Review. On a registered agent’s own turn, a share with the role reader or commenter also runs without an approval card when every grantee named in the call matches exactly one workspace Genesis account, that account’s email was verified by a sign-in or active SCIM provisioning, and the account is authorized to use that agent. An address that is merely stored on an account without verification does not qualify; neither does an address matching multiple accounts. Genesis reads the user directory once for the whole share call. The share is still recorded. This exception does not cover writer, a domain share, or a call with any grantee who is outside the workspace, unknown, malformed, or not authorized for the agent; normal review and refusal rules apply. Other shares to colleagues, a whole workspace domain, and permitted outside addresses wait for a person in Action Review. An outside address is refused unless an administrator has enabled outside sharing. Sharing never grants ownership or access to anyone with the link. See Google Workspace setup for the outside-sharing setting and service-account domain configuration. Each recipient must contain exactly one unquoted @; malformed entries are returned under refused, while other valid recipients in the same request are still evaluated. When pending_approval lists a grantee, tell the requester it is waiting in Action Review; do not repeat that share while it is pending.
  1. Google Slides understanding and import
    • Read a shared Slides URL directly, preserve speaker notes, inspect slide structure, summarize the deck, and import it into a Genesis presentation app.
  2. Stakeholder reporting
    • Run SQL queries and export results to formatted, multi-tab Sheets with themes and conditional formatting.
  3. Living project docs
    • Create formatted Docs per project, append meeting outcomes, and centralize decisions.
  4. Formatted spreadsheets
    • Apply cell formatting, themes, and conditional formatting to create polished reports.
  5. Operational runbooks
    • Keep checklists and status pages in Sheets, edited programmatically by scheduled jobs.
  6. Team reviews
    • Fetch comment threads, add replies, and resolve items from a pipeline step.
  7. Multi-connection workflows
    • Use connection_name to work with different teams’ Drive folders in the same workflow.
Deleting a file with DELETE_FILE removes it from Drive permanently. Confirm ownership, backups, and sharing expectations before proceeding.

Workflow

  1. Set up a connection
    • Create a Google Workspace connection in Config → Connections using User OAuth (recommended) or Service Account. See Google Workspace Setup.
  2. Locate or create
    • Use LIST, GET_FILE_BY_NAME, or FIND_PRESENTATIONS to find targets, or CREATE_SHEET and CREATE_DOC to start fresh.
  3. Read content
    • GET_SHEET for Sheets, READ_DOC for Docs, READ_PRESENTATION or SUMMARIZE_PRESENTATION for Slides.
    • GET_SHEET / READ_SHEET returns at most 50 rows by default. Without g_sheet_cell, reads and exports include columns A:ZZZ (the full 18,278-column Sheets grid). For larger sheets, narrow g_sheet_cell to a specific range such as A1:ZZZ200, increase max_rows, or use SAVE_SHEET_TO_FILE to export the full sheet to git and analyze it there.
  4. Edit and format
    • EDIT_SHEET, WRITE_RANGE, FORMAT_SHEET_CELLS, APPLY_SHEET_THEME for Sheets. UPDATE_DOC, CREATE_FORMATTED_DOC, FORMAT_DOC_TEXT for Docs.
  5. Export and share
    • SAVE_MULTI_QUERIES_TO_G_SHEET for SQL-to-Sheet exports. EXPORT_ALL_TABS_AS_CSV for bulk CSV export. Use comment actions for collaboration.

Integration Relevance

  • data_connector_tools to run SQL that feeds SAVE_MULTI_QUERIES_TO_G_SHEET.
  • project_manager_tools to attach Drive links to tasks and milestones.
  • artifact_manager_tools to reference generated outputs by id.
  • handoff to orchestrate spreadsheet updates as part of multi-agent routines.
  • slack_tools to distribute Drive links and comment status to channels.

Configuration Details

  • Set up connections through Config → Connections (not the legacy standalone page).
  • User OAuth is preferred for interactive use; service accounts for automation.
  • An assigned agent can use its connection’s agent mailbox for Drive, Sheets, Docs, and Slides; see the agent mailbox setup for setup and required Drive consent scopes.
  • For User OAuth write permissions and read-only grant errors, see Changing Access later in Google Workspace Setup.
  • Use connection_name to select a specific connection when you have multiple.
  • Enable Google Drive API, Google Sheets API, Google Docs API, and Google Slides API in the GCP project.
  • Use A1 notation for ranges (e.g. A1, A1:B10, Sheet1!C2:D100).
  • GET_SHEET / READ_SHEET uses max_rows=50 by default. Set max_rows=0 only when you intentionally want no row cap.
  • Keep a designated shared folder for automation and set it with SET_ROOT_FOLDER.
  • Git-backed sheet export actions such as SAVE_SHEET_TO_FILE and EXPORT_ALL_TABS_AS_CSV write files using the active Genesis user context.
  • Large Google Slides decks are read in place via the Slides API; Drive export to .pptx is reserved for explicit artifact conversion.

Limitations

  1. API rate limits can throttle large batch operations. Use pagination and backoff.
  2. Very large Sheets may have write limits per call. Split updates into smaller ranges.
  3. Service account visibility depends on folder or file sharing. Share the specific deck or folder with the service account email.
  4. Native Slides extraction preserves text, notes, links, and structure, but image-heavy decks may rely on visual analysis for best results.
  5. Complex Docs formatting can vary when updated programmatically. Validate critical layouts.
  6. Concurrent edits may produce version conflicts. Serialize writes for hot files.

Output

  • File and Folder Operations
    • Listings with ids, names, mime types, and modified timestamps.
  • Sheets
    • GET_SHEET / READ_SHEET returns values, row_count, total_row_count, column_count, truncated, and tab metadata when available.
    • values always holds every row read, up to max_rows (default 50; 0 for no limit), so a Flow step gets the full data. When a large result goes into an agent’s context, the first rows are kept, the cut is recorded with kept and total counts, and the full result is saved for reading back.
    • Truncated reads include a truncation_note that points you to a narrower g_sheet_cell range or SAVE_SHEET_TO_FILE for full export.
  • Docs
    • Document content snapshots, append confirmations, update results, and formatted document links.
  • Slides
    • Deck summaries, structured slide/page metadata, speaker notes, thumbnail metadata, and optional git-saved markdown/JSON artifacts.
  • Comments
    • Comment threads, new comment ids, and reply confirmations.
  • Exports
    • New Sheet id, title, and a shareable link after SAVE_MULTI_QUERIES_TO_G_SHEET.
Align permissions with your workspace policies. Use least privilege for service accounts and restrict automation to shared folders intended for data agents.