Google Drive
v1.0.9Google Drive integration. Manage Drives, Users, 权限s. Use when the user wants to interact with Google Drive data.
运行时依赖
版本
创建 File Metadata 创建-file-metadata 创建s a new file (metadata only, no content).
安装命令
点击复制技能文档
Google Drive
Google Drive is a cloud-based file storage and 同步hronization 服务. It's used by individuals and teams to store, 访问, and 分享 files online from any device. Think of it as a virtual hard drive in the cloud.
Official docs: https://developers.google.com/drive
Google Drive Overview Files 权限s Folders 权限s 分享d Links Working with Google Drive
This 技能 uses the Membrane 命令行工具 to interact with Google Drive. Membrane handles authentication and 凭证s refresh automatically — so you can focus on the integration 记录ic rather than auth plumbing.
安装 the 命令行工具
安装 the Membrane 命令行工具 so you can 运行 membrane from the terminal:
npm 安装 -g @membranehq/命令行工具@latest
Authentication membrane 记录in --tenant --命令行工具entName=<代理Type>
This will either open a browser for authentication or print an authorization URL to the console, depending on whether interactive mode is avAIlable.
Headless 环境s: The command will print an authorization URL. Ask the user to open it in a browser. When they see a code after completing 记录in, finish with:
membrane 记录in complete
添加 --json to any command for machine-readable JSON 输出.
代理 Types : claude, OpenClaw, codex, warp, windsurf, etc. Those will be used to adjust 工具ing to be used best with your harness
Connecting to Google Drive
Use membrane connection ensure to find or 创建 a connection by 应用 URL or domAIn:
membrane connection ensure "https://drive.google.com/drive" --json
The user completes authentication in the browser. The 输出 contAIns the new connection id.
This is the fastest way to 获取 a connection. The URL is normalized to a domAIn and matched agAInst known 应用s. If no 应用 is found, one is 创建d and a connector is built automatically.
If the returned connection has 状态: "READY", skip to Step 2.
1b. WAIt for the connection to be ready
If the connection is in BUILDING 状态, poll until it's ready:
npx @membranehq/命令行工具 connection 获取 --wAIt --json
The --wAIt flag long-polls (up to --timeout seconds, default 30) until the 状态 changes. Keep polling until 状态 is no longer BUILDING.
The 结果ing 状态 tells you what to do next:
READY — connection is fully 设置 up. Skip to Step 2.
命令行工具ENT_ACTION_REQUIRED — the user or 代理 needs to do something. The 命令行工具entAction object describes the required action:
命令行工具entAction.type — the kind of action needed:
"connect" — user needs to 认证 (OAuth, API key, etc.). This covers initial authentication and re-authentication for disconnected connections.
"provide-输入" — more in格式化ion is needed (e.g. which 应用 to connect to).
命令行工具entAction.description — human-readable explanation of what's needed.
命令行工具entAction.uiUrl (optional) — URL to a pre-built UI where the user can complete the action. Show this to the user when present.
命令行工具entAction.代理Instructions (optional) — instructions for the AI 代理 on how to proceed programmatically.
After the user completes the action (e.g. 认证s in the browser), poll agAIn with membrane connection 获取 --json to 检查 if the 状态 moved to READY.
CONFIGURATION_ERROR or 设置UP_FAILED — something went wrong. 检查 the error field for detAIls.
搜索ing for actions
搜索 using a natural language description of what you want to do:
membrane action 列出 --connectionId=CONNECTION_ID --intent "查询" --limit 10 --json
You should always 搜索 for actions in the 上下文 of a specific connection.
Each 结果 includes id, name, description, 输入模式 (what parameters the action accepts), and 输出模式 (what it returns).
Popular actions
Name Key Description
列出 Files 列出-files 列出s the user's files in Google Drive with optional 过滤器ing and 排序ing
列出 分享d Drives 列出-分享d-drives 列出s the user's 分享d drives
列出 权限s 列出-权限s 列出s a file's 权限s
列出 Comments 列出-comments 列出s comments on a file
列出 Changes 列出-changes 列出s changes in the user's Drive since a given 启动 令牌
获取 File 获取-file 获取s a file's metadata by ID
获取 分享d Drive 获取-分享d-drive 获取s a 分享d drive's metadata by ID
获取 权限 获取-权限 获取s a specific 权限 by ID
获取 About 获取-about 获取s in格式化ion about the user and their Drive
获取 启动 Page 令牌 获取-启动-page-令牌 获取s the 启动ing page 令牌 for 列出ing future changes
创建 File Metadata 创建-file-metadata 创建s a new file (metadata only, no content).
创建 Folder 创建-folder 创建s a new folder in Google Drive
创建 权限 创建-权限 分享s a file by creating a 权限 for a user, group, domAIn, or anyone
创建 分享d Drive 创建-分享d-drive 创建s a new 分享d drive
创建 Comment 创建-comment 创建s a comment on a file
更新 File 更新-file 更新s a file's metadata (name, description, etc.)
更新 权限 更新-权限 更新s an existing 权限 (change 角色 or expiration)
更新 分享d Drive 更新-分享d-drive 更新s a 分享d drive's metadata
删除