360 Secure SkillHub
360 安全技能中心

Gmail Integration

该 Skill 通过 Gmail API 发送邮件、列出收件箱最近邮件并创建管理标签,使用 OAuth2 认证,需要配置 Gmail 客户端 ID 与密钥;HTML 邮件与附件功能标注为尚未提供。

lukaizj
lukaizj
热度 40.55
最近更新 2026-05-11 17:44:32
分类:协作依赖:第三方 API / 代码执行应用场景:邮件起草 / 工作流 / 自动化脚本

安装技能

复制下面的话术发给你的 Agent,它会通过 secure-skills 检索并安装该技能。

执行命令安装此 skill: npx secure-skills-cli add lukaizj-gmail
Metadata
name
Gmail Integration
description
Gmail integration - Send emails, manage labels, and automate Gmail workflows with full OAuth2 support
homepage
https://github.com/lukaizj/gmail-integration-skill
tags
["productivity","email","gmail","google","automation"]
requires
{"env":["GMAIL_CLIENT_ID","GMAIL_CLIENT_SECRET"]}
files
["gmail.py"]

Gmail Integration

Gmail integration skill for OpenClaw. Send emails, manage labels, and automate Gmail workflows.

Capabilities

  • Send emails via Gmail API
  • List recent emails from inbox
  • Create and manage custom labels
  • Full OAuth2 support for secure authentication

Setup

  1. Go to Google Cloud Console (https://console.cloud.google.com/)
  2. Create a new project or select existing
  3. Enable Gmail API from API Library
  4. Create OAuth 2.0 credentials:
    • Go to "Credentials" → "Create Credentials" → "OAuth client ID"
    • Application type: "Desktop app"
    • Download the JSON and get client_id and client_secret
  5. Configure environment variables

Environment Variables

Variable Required Description
GMAIL_CLIENT_ID Yes OAuth Client ID from Google Cloud
GMAIL_CLIENT_SECRET Yes OAuth Client Secret

Usage Examples

Send an email to boss@example.com with subject "Project Update" and body "The project is complete"

List my recent emails from Gmail

Create a new label named "Projects/OpenClaw"

Message Types

  • Plain text emails
  • HTML emails (coming soon)
  • Emails with attachments (coming soon)

Rate Limits

Google Gmail API has rate limits:

  • 100:00 requests per day
  • 100 requests per second

Troubleshooting

  • "Invalid credentials": Re-check your OAuth credentials
  • "Rate limit exceeded": Wait before making more requests
  • "Account not verified": Your app needs to go through Google's verification for sensitive scopes