Google Suite Skill
简介
Google Suite Skill
原始描述
Provides unified access to Gmail, Google Calendar, and Drive APIs for managing emails, calendar events, and files with OAuth2 authentication.
通过你的 Agent 添加
安装目录:google-suite-skill/(目录名取自 SKILL.md 的 frontmatter name,不是 URL 里的 slug)。
点「快速安装」复制一段指令贴给你的 Agent:它会先下载到 /tmp、把文件清单和校验值给你看,你确认之后才解压安装。不会一步装完、也不改系统其它位置。
或者手动安装
包是「根级 SKILL.md + 作者附带的文件」,解压到上面的 <slug>/ 目录即可;
目录名不用换,也不要把包直接解压到 skills 根目录。
技能申请的权限由作者决定:装之前先看清单里有没有脚本、它会读写什么。
技能正文
Google Suite Skill
Version: 1.0.0 Category: Productivity Description: Unified access to Gmail, Google Calendar, and Google Drive APIs for sending, reading, deleting emails, managing calendar events, and handling files.
Features
Gmail
- Send emails
- Read emails (list, search, get details)
- Delete emails
- Mark as read/unread
Google Calendar
- List events
- Create events
- Update events
- Delete events
Google Drive
- List files
- Upload files
- Download files
- Delete files
- Search files
Setup
Prerequisites
- Python 3.8+
- Google Cloud project with OAuth2 credentials
- Enable Gmail, Calendar, and Drive APIs in Google Cloud Console
Environment Variables
GOOGLE_OAUTH_CLIENT_ID - OAuth2 client ID
GOOGLE_OAUTH_CLIENT_SECRET - OAuth2 client secret
GOOGLE_OAUTH_REDIRECT_URI - OAuth2 redirect URI (e.g., http://localhost:8080/callback)
Required Scopes
https://www.googleapis.com/auth/gmail.readonly
https://www.googleapis.com/auth/gmail.send
https://www.googleapis.com/auth/gmail.modify
https://www.googleapis.com/auth/calendar
https://www.googleapis.com/auth/drive
Token Storage
- Tokens are stored in
google_suite_tokens.json (by default)
Installation
pip install --upgrade google-api-python-client google-auth-httplib2 google-auth-oauthlib
Usage
Authentication
- On first use, the skill will prompt for OAuth2 authentication.
- Visit the provided URL, log in, and paste the authorization code.
- Tokens will be saved for future use.
Example Calls
Send Email
skill.execute({
"service": "gmail",
"action": "send",
"to": "user@example.com",
"subject": "Test Email",
"body": "Hello from OpenClaw!"
})
List Emails
skill.execute({
"service": "gmail",
"action": "list",
"query": "from:boss@company.com"
})
Delete Email
skill.execute({
"service": "gmail",
"action": "delete",
"message_id": "XYZ123..."
})
List Calendar Events
skill.execute({
"service": "calendar",
"action": "list",
"days": 7
})
Create Calendar Event
skill.execute({
"service": "calendar",
"action": "create",
"summary": "Team Meeting",
"start": "2024-03-01T10:00:00",
"end": "2024-03-01T11:00:00"
})
List Drive Files
skill.execute({
"service": "drive",
"action": "list",
"query": "name contains 'report'"
})
Upload File to Drive
- List files
- Upload files
- Download files
- Delete files
- Search files
Setup
Prerequisites
- Python 3.8+
- Google Cloud project with OAuth2 credentials
- Enable Gmail, Calendar, and Drive APIs in Google Cloud Console
Environment Variables
GOOGLE_OAUTH_CLIENT_ID - OAuth2 client ID
GOOGLE_OAUTH_CLIENT_SECRET - OAuth2 client secret
GOOGLE_OAUTH_REDIRECT_URI - OAuth2 redirect URI (e.g., http://localhost:8080/callback)
Required Scopes
https://www.googleapis.com/auth/gmail.readonly
https://www.googleapis.com/auth/gmail.send
https://www.googleapis.com/auth/gmail.modify
https://www.googleapis.com/auth/calendar
https://www.googleapis.com/auth/drive
Token Storage
- Tokens are stored in
google_suite_tokens.json (by default)
Installation
pip install --upgrade google-api-python-client google-auth-httplib2 google-auth-oauthlib
Usage
Authentication
- On first use, the skill will prompt for OAuth2 authentication.
- Visit the provided URL, log in, and paste the authorization code.
- Tokens will be saved for future use.
Example Calls
Send Email
skill.execute({
"service": "gmail",
"action": "send",
"to": "user@example.com",
"subject": "Test Email",
"body": "Hello from OpenClaw!"
})
List Emails
skill.execute({
"service": "gmail",
"action": "list",
"query": "from:boss@company.com"
})
Delete Email
skill.execute({
"service": "gmail",
"action": "delete",
"message_id": "XYZ123..."
})
List Calendar Events
skill.execute({
"service": "calendar",
"action": "list",
"days": 7
})
Create Calendar Event
GOOGLE_OAUTH_CLIENT_ID - OAuth2 client IDGOOGLE_OAUTH_CLIENT_SECRET - OAuth2 client secretGOOGLE_OAUTH_REDIRECT_URI - OAuth2 redirect URI (e.g., http://localhost:8080/callback)https://www.googleapis.com/auth/gmail.readonlyhttps://www.googleapis.com/auth/gmail.sendhttps://www.googleapis.com/auth/gmail.modifyhttps://www.googleapis.com/auth/calendarhttps://www.googleapis.com/auth/drive
Token Storage
- Tokens are stored in
google_suite_tokens.json (by default)
Installation
pip install --upgrade google-api-python-client google-auth-httplib2 google-auth-oauthlib
Usage
Authentication
- On first use, the skill will prompt for OAuth2 authentication.
- Visit the provided URL, log in, and paste the authorization code.
- Tokens will be saved for future use.
Example Calls
Send Email
skill.execute({
"service": "gmail",
"action": "send",
"to": "user@example.com",
"subject": "Test Email",
"body": "Hello from OpenClaw!"
})
List Emails
skill.execute({
"service": "gmail",
"action": "list",
"query": "from:boss@company.com"
})
Delete Email
google_suite_tokens.json (by default)pip install --upgrade google-api-python-client google-auth-httplib2 google-auth-oauthlib
Usage
Authentication
- On first use, the skill will prompt for OAuth2 authentication.
- Visit the provided URL, log in, and paste the authorization code.
- Tokens will be saved for future use.
Example Calls
Send Email
skill.execute({
"service": "gmail",
"action": "send",
"to": "user@example.com",
"subject": "Test Email",
"body": "Hello from OpenClaw!"
})
List Emails
skill.execute({
"service": "gmail",
"action": "list",
"query": "from:boss@company.com"
})
skill.execute({
"service": "gmail",
"action": "delete",
"message_id": "XYZ123..."
})
List Calendar Events
skill.execute({
"service": "calendar",
"action": "list",
"days": 7
})
skill.execute({
"service": "calendar",
"action": "create",
"summary": "Team Meeting",
"start": "2024-03-01T10:00:00",
"end": "2024-03-01T11:00:00"
})
List Drive Files
skill.execute({
"service": "drive",
"action": "list",
"query": "name contains 'report'"
})
skill.execute({
"service": "drive",
"action": "upload",
"file_path": "./myfile.pdf"
})
Security
- OAuth2 tokens are stored securely and never logged.
- All credentials are loaded from environment variables.
- No sensitive data is printed or logged.
Troubleshooting
- Ensure all required APIs are enabled in Google Cloud Console.
- Check that OAuth2 credentials are correct and match the redirect URI.
- Delete
google_suite_tokens.json to force re-authentication if needed.
References
- Ensure all required APIs are enabled in Google Cloud Console.
- Check that OAuth2 credentials are correct and match the redirect URI.
- Delete
google_suite_tokens.jsonto force re-authentication if needed.
References
正文来自原始发布页, 版权归作者所有,许可未标注。 权利人认为有不妥,可申请下架。