Community程式設計與開發github.com

googleworkspace/gws-gmail

Gmail:傳送、讀取和管理電子郵件。

gws-gmail 是什麼?

此技能專注於透過 Google Workspace API 操作 Gmail 帳戶,提供傳送、讀取和管理電子郵件的核心功能。它非常適合需要自動化電子郵件處理的開發人員或 AI 代理,例如整合電子郵件通知、自動回覆、執行郵件分類或歸檔任務。此技能透過 Google Workspace 進行授權,因此需要正確設定 OAuth 2.0 憑證及相關環境變數。支援的平台與工具包括 Claude Code、Cursor 以及 Codex 等,這些工具可透過此技能與使用者指定的 Gmail 帳戶進行互動。其主要優勢在於簡化了對 Gmail API 的呼叫,讓使用者無需深入底層細節即可快速實現電子郵件功能。

相容平台~Claude Code~Codex CLI~Cursor
npx skills add https://github.com/googleworkspace/cli/tree/main/skills/gws-gmail

Installed? Explore more 程式設計與開發 skills: steipete/bluebubbles, steipete/eightctl, steipete/blucli · View all 6 →

在你喜歡的 AI 中提問

開啟一個已預先載入此 Agent Skill 的新對話。

說明文件

gws-gmail 是做什麼的?

Gmail:傳送、讀取和管理電子郵件。

功能

  • 傳送電子郵件:以指定帳戶的身份傳送新郵件。
  • 讀取電子郵件:讀取收件匣中的郵件,包含主旨、寄件者及內容。
  • 管理電子郵件:對郵件執行歸檔、刪除、標記為已讀/未讀等操作。
  • 搜尋郵件:根據關鍵字、寄件者、日期等條件搜尋郵件。

使用方式

請確保已設定以下環境變數:

  • GOOGLE_CLIENT_ID:您的 Google Cloud 專案的 OAuth 2.0 用戶端 ID。
  • GOOGLE_CLIENT_SECRET:您的 Google Cloud 專案的 OAuth 2.0 用戶端密碼。
  • GOOGLE_REFRESH_TOKEN:用於存取 Gmail API 的更新權杖。

然後,您可以在支援的工具中直接呼叫此技能。

範例

- name: 傳送電子郵件
  uses: googleworkspace/gws-gmail@main
  with:
    action: send
    to: "[email protected]"
    subject: "這是測試郵件"
    body: "這是郵件內容。"

注意事項

  • 請勿在公開儲存庫中提交包含憑證的檔案。
  • 確保 Google Cloud 專案已啟用 Gmail API。
  • 如有需要,請參考 Google Workspace 文件 取得更多資訊。

Individual skills in this repo

This repo contains 20 individual skills — each has its own dedicated page.

googleworkspace/gws-admin-reports

Google Workspace Admin SDK: Audit logs and usage reports.

googleworkspace/gws-calendar

Google Calendar: Manage calendars and events.

googleworkspace/gws-calendar-agenda

Google Calendar: Show upcoming events across all calendars.

googleworkspace/gws-calendar-insert

Google Calendar: Create a new event.

googleworkspace/gws-chat

Google Chat: Manage Chat spaces and messages.

googleworkspace/gws-chat-send

Google Chat: Send a message to a space.

googleworkspace/gws-classroom

Google Classroom: Manage classes, rosters, and coursework.

googleworkspace/gws-docs

Read and write Google Docs.

googleworkspace/gws-docs-write

Google Docs: Append text to a document.

googleworkspace/gws-drive

Google Drive: Manage files, folders, and shared drives.

googleworkspace/gws-drive-upload

Google Drive: Upload a file with automatic metadata.

googleworkspace/gws-events

Subscribe to Google Workspace events.

googleworkspace/gws-events-renew

Google Workspace Events: Renew/reactivate Workspace Events subscriptions.

googleworkspace/gws-events-subscribe

Google Workspace Events: Subscribe to Workspace events and stream them as NDJSON.

googleworkspace/gws-forms

Read and write Google Forms.

googleworkspace/gws-gmail-forward

Gmail: Forward a message to new recipients.

googleworkspace/gws-gmail-read

Gmail: Read a message and extract its body or headers.

googleworkspace/gws-gmail-reply

Gmail: Reply to a message (handles threading automatically).

googleworkspace/gws-gmail-reply-all

Gmail: Reply-all to a message (handles threading automatically).

googleworkspace/gws-gmail-send

Gmail: Send an email.

相關技能