Overview

Tool Name

google_drive_tools

Purpose

The google_drive_tools integration connects your workflows to Google Drive and Google Workspace. Authenticate once, then create and edit Sheets and Docs, manage files and folders, export query results, collaborate with comments, and automate updates across projects.

Key Features & Functions

Sheets Operations

Read and write cell ranges, append data, and keep analytics outputs live in Google Sheets.

Docs Operations

Create, read, update, and append content in Google Docs for living project documentation.

Files and Folders

List folders, get links, manage versions, and delete files when they are no longer needed.

Collaboration

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

Exports and Sync

Save query results directly to new Sheets and share links with stakeholders.

Service Accounts

Run unattended jobs with service account credentials for scheduled automations.

Input Parameters for Each Function

google_drive

Parameters
NameDefinitionFormat
actionOperation to perform. Allowed values include LOGIN, LIST, SET_ROOT_FOLDER, GET_ROOT_FOLDER, GET_FILE_VERSION_NUM, GET_COMMENTS, ADD_COMMENT, ADD_REPLY_TO_COMMENT, GET_SHEET, EDIT_SHEET, GET_LINK_FROM_FILE_ID, GET_FILE_BY_NAME, SAVE_QUERY_RESULTS_TO_G_SHEET, CREATE_SHEET, READ_DOC, CREATE_DOC, APPEND_DOC, UPDATE_DOC, DELETE_FILE, USE_SERVICE_ACCOUNT.String
thread_idAuthentication context identifier. Used with LOGIN.String
g_folder_idFolder id for listing or setting root. Used with LIST, SET_ROOT_FOLDER.String
g_file_nameName filter or lookup. Used with LIST, GET_FILE_BY_NAME.String
g_file_idTarget file id. Used with GET_FILE_VERSION_NUM, GET_COMMENTS, ADD_COMMENT, ADD_REPLY_TO_COMMENT, GET_SHEET, EDIT_SHEET, READ_DOC, APPEND_DOC, UPDATE_DOC, DELETE_FILE, GET_LINK_FROM_FILE_ID.String
g_sheet_cellA1 notation range. Used with GET_SHEET, EDIT_SHEET.String
g_sheet_valuesValues to write or comment text. Used with EDIT_SHEET, ADD_COMMENT, ADD_REPLY_TO_COMMENT.String
g_doc_titleDocument or sheet title for creation. Used with CREATE_DOC, CREATE_SHEET, SAVE_QUERY_RESULTS_TO_G_SHEET.String
g_doc_contentBody content to write. Used with APPEND_DOC, UPDATE_DOC.String
g_sheet_querySQL to execute then export to a new Sheet. Used with SAVE_QUERY_RESULTS_TO_G_SHEET.String
Use SAVE_QUERY_RESULTS_TO_G_SHEET to publish analytics in one step: run SQL, create a Sheet, and return a shareable link.

Use Cases

  1. Stakeholder reporting
    • Export daily or weekly query results to Sheets and hand off a live link.
  2. Living project docs
    • Spin up a Doc per project, append meeting outcomes, and centralize decisions.
  3. Operational runbooks
    • Keep checklists and status pages in Sheets, edited programmatically by jobs.
  4. Team reviews
    • Fetch comment threads, add replies, and resolve items from a pipeline step.
  5. Discovery
    • List folders, locate files by name, and share links in Slack or email.
D**eleting a file with **DELETE_FILE**removes it from Drive. ** Confirm ownership, backups, and sharing expectations before proceeding.

Workflow/How It Works

  1. Authenticate
    • Choose LOGIN for user auth or USE_SERVICE_ACCOUNT for unattended jobs.
  2. Locate or create
    • Use LIST or GET_FILE_BY_NAME to find targets, or CREATE_SHEET and CREATE_DOC to start fresh.
  3. Edit content
    • EDIT_SHEET to update ranges, APPEND_DOC or UPDATE_DOC to maintain Docs.
  4. Collaborate
    • Pull threads with GET_COMMENTS, add discussion via ADD_COMMENT and ADD_REPLY_TO_COMMENT.
  5. Share
    • Call GET_LINK_FROM_FILE_ID and post the link through your notification channel.
For scheduled exports, prefer service accounts. They avoid interactive prompts and keep ownership consistent within a shared folder.

Integration Relevance

  • data_connector_tools to run SQL that feeds SAVE_QUERY_RESULTS_TO_G_SHEET.
  • project_manager_tools to attach Drive links to tasks and milestones.
  • file_manager_tools to register copies of Drive exports when a repository of record is required.
  • delegate_work to orchestrate spreadsheet updates as part of multi-agent routines.
  • slack_tools to distribute Drive links and comment status to channels.

Configuration Details

  • Complete OAuth 2.0 setup or provide a service account with access to target folders.
  • Keep a designated shared folder for automation and set it with SET_ROOT_FOLDER.
  • Use A1 notation for ranges, for example A1, A1:B10, Sheet1!C2:D100.
  • Respect organization sharing policies when generating and distributing links.
  • Record file ids where long-lived automations need deterministic targets.

Limitations or Notes

  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 sharing. Share the folder with the service account email.
  4. Tokens expire. Renew user sessions or rotate service account keys as part of operations hygiene.
  5. Complex Docs formatting can vary when updated programmatically. Validate critical layouts.
  6. Concurrent edits may produce version conflicts. Serialize writes for hot files.
  7. Organization quotas can block new file creation. Monitor storage usage.

Output

  • Authentication
    • Login confirmation and token status.
  • File and Folder Operations
    • Listings with ids, names, mime types, and modified timestamps.
  • Sheets
    • Read results for requested ranges and write confirmations with affected ranges.
  • Docs
    • Document content snapshots, append confirmations, and update results.
  • Comments
    • Comment threads, new comment ids, and reply confirmations.
  • Exports
    • New Sheet id, title, and a shareable link after SAVE_QUERY_RESULTS_TO_G_SHEET.
**Reminder: **Align permissions with your workspace policies. Use least privilege for service accounts and restrict automation to shared folders intended for data agents.