All super-powers

Give your AI agent safe access to Google Drive

Your agent can read, create, edit, and organise files and folders in your Google Drive. Access is scoped to exactly what's needed, and every write action flows through your approval rules.

Using Claude Cowork? This replaces the Google Drive Connector — same OAuth flow, but with approval rules and audit trails on every action.
Step 1

Connect your Google account in the dashboard

Link your Google account with one OAuth click inside the AgentBlocks dashboard. Toggle Drive on, and your agent gets scoped access — no passwords stored, and you can revoke at any time from your Google account.

ApprovalsActivitySettings

Google Drive

Connected Google Accounts
AccountGmailDrive
Step 2

Configure your rules

Choose what your agent can do automatically, what needs your approval, and what's blocked. Listing and reading metadata can be automatic while creating, editing, moving, and deleting files requires your sign-off.

Drivedefault

Rules are evaluated top-to-bottom within each capability. The first matching rule wins. When no rules match, the system requires approval.

files.list

Always allow
Require approval
Always block

files.read_metadata

Always allow
Require approval
Always block

files.read_content

Always allow
Require approval
Always block

files.create

Always allow
Require approval
Always block

files.update

Always allow
Require approval
Always block

files.move

Always allow
Require approval
Always block

files.trash

Always allow
Require approval
Always block
Save all rules
Step 3

Tell your agent about AgentBlocks

Paste a setup snippet with your API key into your agent's prompt. It reads the docs, discovers it can access Google Drive through AgentBlocks, and configures itself. No SDKs to install.

In order to help me complete the next tasks, you'll need to use the
AgentBlocks API, which allows us to selectively give you (the agent) tool
access. I have created an API key for you:
sk-example_xxxxxxxxxxxxxxxxxxxxxxxx . The docs are at
https://docs.agentblocks.ai
Reading AgentBlocks docs ...
Discovered Google Drive super-power — read, create, edit, and organise files.
✓ Ready to work with your Drive.
Step 4

It reads and explores your Drive automatically

Listing folders, reading documents, and extracting data from spreadsheets are all auto-approved. Your agent navigates your Drive, gathers what it needs, and builds context — without interrupting you.

Read through the Q2 Reports folder and create a competitive
analysis document based on what you find.
$ curl -s -H "Authorization: Bearer sk_example_..."
https://api.agentblocks.ai/v1/gdrive/list?folder=Q2+Reports
agentblocks: auto-approved
Found 14 files in Q2 Reports. Let me read through the relevant ones.
• Reading Q2 Revenue Forecast.xlsx — auto-approved
Extracted revenue data from 4 tabs (Q1 actual, Q2 forecast, YoY, targets)
• Reading competitor-notes.docx — auto-approved
Parsed 6 competitor profiles with market share data
• Reading Market Trends Q2.slides — auto-approved
Extracted 3 key trend summaries from slide deck
I have enough context. Now creating the analysis document ...
Step 5

Creating or editing files requires your approval

When your agent wants to create a new document, edit an existing file, or reorganise folders, it prepares everything and waits. You see what's being created or changed — file name, destination folder, content preview — before anything is written.

$ curl -X POST -H "Authorization: Bearer sk_example_..."
-d '{"action": "create",
"folder": "Q2 Reports",
"name": "Competitive Analysis — June 2026.docx",
"content": "..."}'
https://api.agentblocks.ai/v1/gdrive/files
{"status": "pending_approval", "ref": "8b2e4a91"}
▲ WAITING FOR APPROVAL ...

Meanwhile ...

Get approval notifications on Slack, WhatsApp, via email, or wherever's convenient for you. See the file name, folder, and a content preview before anything is written.

AB
AgentBlocksAPP11:07 AM

Google Drive write request (ref: 8b2e4a91)

Agent: research-assistant
Action: create file
Folder: Q2 Reports

File: Competitive Analysis — June 2026.docx

Size: 2.4 KB (12 pages)

Document preview:

1. Executive Summary — Market share shifted 3.2% toward ...

2. Competitor Overview — Three new entrants in Q2 ...

[preview truncated]

You approve the file creation, and it appears in your Drive instantly — exactly where you'd expect it.

✓ Approved
File created in Google Drive
Name: Competitive Analysis — June 2026.docx
Folder: Q2 Reports
ID: 1a2b3c...
Done. Now let me also update the revenue forecast with a competitor comparison tab ...
Step 6

Then let it run

Your agent works through your Drive for as long as it needs — reading documents, extracting data from spreadsheets, and building context automatically. It only surfaces when there's a file to create or edit. One tap to approve, and it keeps going.

Agent activity — competitive analysis reportstarted 10:30
10:30

Connected to Google Drive via OAuth

[email protected] — drive.file scope granted

AUTO
10:31

Listed files in Q2 Reports folder

14 files found — 3 docs, 8 sheets, 3 slides

AUTO
10:32

Read Q2 Revenue Forecast.xlsx

Extracted revenue data from 4 tabs

AUTO
10:34

Read competitor-notes.docx

Parsed 6 competitor profiles

AUTO
10:45

Create Competitive Analysis — June 2026.docx

Q2 Reports → new 12-page document

⏳ WAITING
10:46

Update Q2 Revenue Forecast.xlsx

Added competitor comparison tab

⏳ WAITING

⚡ 2 file writes awaiting approval

Reading and listing files is automatic — only creating, editing, or deleting files requires your sign-off.

Give your agent safe
Google Drive access today.

One OAuth click. One API key. Your agent handles the rest.

🦞 Works great with OpenClaw, Claude Cowork and Claude Code