Google Drive Integration for AI Agents

Securely connect your AI agents and chatbots (Claude, ChatGPT, Cursor, etc) with Google Drive MCP or direct API to search files, upload documents, share folders, and manage permissions through natural language.
Google Drive Logo
Gradient Top
Gradient Middle
Gradient Bottom
divider

Supported Tools and Triggers

Tools
Triggers
Add file sharing preferenceModifies sharing permissions for an existing google drive file, granting a specified role to a user, group, domain, or 'anyone'.
Copy fileDuplicates an existing file in google drive, identified by its `file id`.
Create CommentTool to create a comment on a file.
Create Shared DriveTool to create a new shared drive.
Create File or FolderCreates a new file or folder with metadata.
Create a File from TextCreates a new file in google drive from provided text content (up to 10mb), supporting various formats including automatic conversion to google workspace types.
Create a folderCreates a new folder in google drive, optionally within a parent folder specified by its id or name; if a parent name is provided but not found, the action will fail.
Create ReplyTool to create a reply to a comment in google drive.
Create Shortcut to File/FolderTool to create a shortcut to a file or folder in google drive.
Delete CommentDeletes a comment from a file.
Delete Shared DriveTool to permanently delete a shared drive.
Delete PermissionDeletes a permission from a file by permission id.
Delete ReplyTool to delete a specific reply by reply id.
Download a file from Google DriveDownloads a file from google drive by its id.
Edit FileUpdates an existing google drive file by overwriting its entire content with new text (max 10mb).
Empty TrashTool to permanently delete all of the user's trashed files.
Modify File LabelsModifies the set of labels applied to a file.
Find fileTool to list or search for files and folders in google drive.
Find folderTool to find a folder in google drive by its name and optionally a parent folder.
Generate File IDsGenerates a set of file ids which can be provided in create or copy requests.
Get aboutTool to retrieve information about the user, the user's drive, and system capabilities.
Get Changes Start Page TokenTool to get the starting pagetoken for listing future changes in google drive.
Get CommentTool to get a comment by id.
Get Shared DriveTool to get a shared drive by id.
Get File MetadataTool to get a file's metadata by id.
Get PermissionGets a permission by id.
Get ReplyTool to get a specific reply to a comment on a file.
Get RevisionTool to get a specific revision's metadata by revision id.
Delete folder or fileTool to delete a file or folder in google drive.
Hide Shared DriveTool to hide a shared drive from the default view.
List ChangesTool to list the changes for a user or shared drive.
List CommentsTool to list all comments for a file in google drive.
List File LabelsTool to list the labels on a file.
List Files and FoldersTool to list a user's files and folders in google drive.
List PermissionsTool to list a file's permissions.
List Replies to CommentTool to list replies to a comment in google drive.
List File RevisionsTool to list a file's revisions.
List Shared DrivesTool to list the user's shared drives.
Move FileTool to move a file from one folder to another in google drive.
Stop Watch ChannelTool to stop watching resources through a specified channel.
Unhide Shared DriveTool to unhide a shared drive.
Untrash FileTool to restore a file from the trash.
Update CommentTool to update an existing comment on a google drive file.
Update Shared DriveTool to update the metadata for a shared drive.
Update File (Metadata)Updates file metadata.
Update File Revision MetadataUpdates metadata of a file revision (e.
Update PermissionTool to update a permission with patch semantics.
Update ReplyTool to update a reply to a comment on a google drive file.
Upload FileUploads a file (max 5mb) to google drive, moving it to a specified folder if a valid folder id is provided, otherwise uploads to root.
Watch Drive ChangesTool to subscribe to changes for a user or shared drive in google drive.

Connect Google Drive MCP Tool with your Agent

Python
TypeScript

Install Composio

python
pip install composio claude-agent-sdk
Install the Composio SDK and Claude Agent SDK

Create Tool Router Session

python
from composio import Composio
from claude_agent_sdk import ClaudeSDKClient, ClaudeAgentOptions

composio = Composio(api_key='your-composio-api-key')
session = composio.create(user_id='your-user-id')
url = session.mcp.url
Initialize the Composio client and create a Tool Router session

Connect to AI Agent

python
import asyncio

options = ClaudeAgentOptions(
    permission_mode='bypassPermissions',
    mcp_servers={
        'tool_router': {
            'type': 'http',
            'url': url,
            'headers': {
                'x-api-key': 'your-composio-api-key'
            }
        }
    },
    system_prompt='You are a helpful assistant with access to Googledrive tools.',
    max_turns=10
)

async def main():
    async with ClaudeSDKClient(options=options) as client:
        await client.query('Create a folder named Project Docs in my Google Drive')
        async for message in client.receive_response():
            if hasattr(message, 'content'):
                for block in message.content:
                    if hasattr(block, 'text'):
                        print(block.text)

asyncio.run(main())
Use the MCP server with your AI agent

Connect Google Drive API Tool with your Agent

Python
TypeScript

Install Composio

python
pip install composio_openai
Install the Composio SDK

Initialize Composio and Create Tool Router Session

python
from openai import OpenAI
from composio import Composio
from composio_openai import OpenAIResponsesProvider

composio = Composio(provider=OpenAIResponsesProvider())
openai = OpenAI()
session = composio.create(user_id='your-user-id')
Import and initialize Composio client, then create a Tool Router session

Execute Googledrive Tools via Tool Router with Your Agent

python
tools = session.tools
response = openai.responses.create(
  model='gpt-4.1',
  tools=tools,
  input=[{
    'role': 'user',
    'content': 'Create a folder named "Team Documents" in my Drive'
  }]
)
result = composio.provider.handle_tool_calls(
  response=response,
  user_id='your-user-id'
)
print(result)
Get tools from Tool Router session and execute Googledrive actions with your Agent

Why Use Composio?

AI Native Google Drive Integration

  • Supports both Google Drive MCP and direct API based integrations
  • Structured, LLM-friendly schemas for reliable tool execution
  • Rich coverage for reading, writing, and querying your Google Drive data

Managed Auth

  • Built-in OAuth handling with automatic token refresh and rotation
  • Central place to manage, scope, and revoke Google Drive access
  • Per user and per environment credentials instead of hard-coded keys

Agent Optimized Design

  • Tools are tuned using real error and success rates to improve reliability over time
  • Comprehensive execution logs so you always know what ran, when, and on whose behalf

Enterprise Grade Security

  • Fine-grained RBAC so you control which agents and users can access Google Drive
  • Scoped, least privilege access to Google Drive resources
  • Full audit trail of agent actions to support review and compliance

Frequently Asked Questions

Do I need my own developer credentials to use Googledrive with Composio?

No, you can get started immediately using Composio's built-in Googledrive app. For production, we recommend configuring your own OAuth credentials.

Can I use multiple toolkits together?

Yes! Composio's Tool Router enables agents to use multiple toolkits. Learn more.

Is Composio secure?

Composio is SOC 2 and ISO 27001 compliant with all data encrypted in transit and at rest. Learn more.

What if the API changes?

Composio maintains and updates all toolkit integrations automatically, so your agents always work with the latest API versions.

Used by agents from

Context
ASU
Letta
glean
HubSpot
Agent.ai
Altera
DataStax
Entelligence
Rolai
Context
ASU
Letta
glean
HubSpot
Agent.ai
Altera
DataStax
Entelligence
Rolai
Context
ASU
Letta
glean
HubSpot
Agent.ai
Altera
DataStax
Entelligence
Rolai

Never worry about agent reliability

We handle tool reliability, observability, and security so you never have to second-guess an agent action.