What can you do with it?

Google Drive allows you to manage files and folders programmatically. You can search for files by name or content, upload new files, read file contents, organize files into folders, add comments, and update file metadata. This integration supports both text-based and binary files, making it perfect for document management, file organization, and automated workflows.

How to use it?

Basic Command Structure

/your-Google-Drive-connection [action] [required-parameters] [optional-parameters]

Parameters

Required:

  • action - The operation to perform (search, read, upload, list-folder, add-comment, move-file, update-metadata)

Tools

Search Files

Find files by exact name match or partial name search

Parameters:

  • file-name (required) - The name of the file to search for
  • exact-match (optional) - Whether to search for exact name match (default: true)

Example:

/your-Google-Drive-connection
action: search
file-name: quarterly-report.pdf
exact-match: true

Response:

{
  "files": [
    {
      "id": "15wNr-IDhScfP7d6sqdAPl-tSFrxhzZJ4",
      "name": "quarterly-report.pdf",
      "mimeType": "application/pdf"
    }
  ]
}

Read File

Read the contents of a file (automatically handles text and binary files)

Parameters:

  • file-id (required) - The ID of the file to read
  • file-url (optional) - Google Drive URL (will extract file ID automatically)

Example:

/your-Google-Drive-connection
action: read
file-id: 15wNr-IDhScfP7d6sqdAPl-tSFrxhzZJ4

Response:

{
  "content": "File content here for text files",
  "downloadUri": "https://... for binary files"
}

Upload File

Create a new file with content

Parameters:

  • file-name (required) - Name for the new file
  • content (required) - File content (text or base64-encoded binary)
  • mime-type (required) - MIME type of the file
  • folder-id (optional) - Parent folder ID
  • description (optional) - File description

Example:

/your-Google-Drive-connection
action: upload
file-name: report.txt
content: This is my report content
mime-type: text/plain
folder-id: 1A2B3C4D5E6F

Response:

{
  "id": "new-file-id-here",
  "name": "report.txt",
  "mimeType": "text/plain"
}

List Folder Contents

Get all files in a specific folder

Parameters:

  • folder-id (required) - The ID of the folder
  • folder-name (optional) - Folder name (will search for ID if not provided)

Example:

/your-Google-Drive-connection
action: list-folder
folder-name: Projects

Response:

{
  "files": [
    {
      "id": "file-id-1",
      "name": "project-plan.doc",
      "mimeType": "application/msword"
    },
    {
      "id": "file-id-2",
      "name": "budget.xlsx",
      "mimeType": "application/vnd.ms-excel"
    }
  ]
}

Add Comment

Add a comment to a file

Parameters:

  • file-id (required) - The ID of the file
  • comment (required) - The comment text to add

Example:

/your-Google-Drive-connection
action: add-comment
file-id: 15wNr-IDhScfP7d6sqdAPl-tSFrxhzZJ4
comment: Please review and update before final submission

Response:

{
  "id": "AAABZAeZDPE",
  "content": "Please review and update before final submission"
}

Move File

Move a file to a different folder

Parameters:

  • file-id (required) - The ID of the file to move
  • destination-folder-id (required) - The destination folder ID
  • source-folder-id (required) - The current parent folder ID

Example:

/your-Google-Drive-connection
action: move-file
file-id: 15wNr-IDhScfP7d6sqdAPl-tSFrxhzZJ4
destination-folder-id: new-folder-id
source-folder-id: old-folder-id

Response:

{
  "id": "15wNr-IDhScfP7d6sqdAPl-tSFrxhzZJ4",
  "name": "file-name.ext",
  "parents": ["new-folder-id"]
}

Update Metadata

Update file description or other metadata

Parameters:

  • file-id (required) - The ID of the file
  • description (optional) - New description for the file
  • name (optional) - New name for the file

Example:

/your-Google-Drive-connection
action: update-metadata
file-id: 15wNr-IDhScfP7d6sqdAPl-tSFrxhzZJ4
description: Updated project documentation

Response:

{
  "id": "15wNr-IDhScfP7d6sqdAPl-tSFrxhzZJ4",
  "name": "file-name.ext",
  "description": "Updated project documentation"
}

Notes

Supported file types include all Google Workspace formats (Docs, Sheets, Slides), Microsoft Office files, PDFs, images, and text files. Binary content should be base64-encoded when uploading. The system automatically detects file types and handles them appropriately for reading operations.