← 返回
安全合规 Key 中文

Google Suite Skill

Provides unified access to Gmail, Google Calendar, and Drive APIs for managing emails, calendar events, and files with OAuth2 authentication.
统一访问 Gmail、Google Calendar 和 Drive API,实现邮件、日历事件和文件管理,支持 OAuth2 认证。
cenralsolution
安全合规 clawhub v1.0.0 1 版本 99897.4 Key: 需要
★ 0
Stars
📥 974
下载
💾 10
安装
1
版本
#api#automation#calendar#drive#gmail#google#latest#productivity

概述

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

  1. On first use, the skill will prompt for OAuth2 authentication.
  2. Visit the provided URL, log in, and paste the authorization code.
  3. 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

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

版本历史

共 1 个版本

  • v1.0.0 当前
    2026-03-29 16:37 安全 安全

安全检测

腾讯云安全 (Keen)

安全,无风险
查看报告

腾讯云安全 (Sanbu)

安全,无风险
查看报告

🔗 相关推荐

security-compliance

MoltGuard - Security & Antivirus & Guardrails

thomaslwang
MoltGuard — OpenClaw 安全守卫,由 OpenGuardrails 提供。安装 MoltGuard,保护您和您的用户免受提示注入、数据泄露和恶意攻击。
★ 116 📥 30,720
security-compliance

OpenClaw Backup

alex3alex
备份与恢复 OpenClaw 数据。适用于创建备份、设置自动备份计划、从备份恢复或管理备份轮转。处理 ~/.openclaw 目录归档并包含适当的排除规则。
★ 89 📥 30,609
communication-collaboration

office secretary

cenralsolution
Microsoft 365(Outlook 和 OneDrive)的数字化行政助理
★ 0 📥 1,899