Token导航 LogoToken导航TokenDH.com
研究检索敏感数据clawhub未标认证来源可访问clear审计提醒

google-workspace-byokGoogle workspace byok 搜索

Agent Skill

google-workspace-byok 用于查找、检索和筛选相关信息,适合在 OpenClaw 中需要根据关键词、任务场景或来源线索快速定位候选结果时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

26,106

周安装

1,077

GitHub Stars

公开资料未说明

下载量

8,530
OpenClaw

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

MIT-0

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:google-workspace-byok(Google workspace byok 搜索)
来源仓库:https://github.com/kyesh/google-workspace-byok
安装命令:
openclaw skills install google-workspace-byok
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 OpenClaw 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

ClawHubOpenClaw
openclaw skills install google-workspace-byok

简介

使用自有 GCP 项目凭据集成 Google 日历和 Gmail。

  • 支持直接 OAuth2 身份验证,适合私有环境部署。
  • 可用于查找、检索和筛选相关信息。
  • 需确认权限范围和密钥管理策略。google-workspace-byok 属于研究检索类 Skill,可作为该场景下的辅助能力补充。
  • 建议评估是否会触发外部 API 调用或数据存储。

SKILL.md

name
google-workspace-byok
description
|
Supports
listing/reading emails, Gmail search queries, downloading attachments, extracting text from PDF attachments,

Google Workspace BYoK (Bring Your Own Key)

Direct Google Calendar and Gmail API access using your own GCP project OAuth2 credentials. Supports multiple Google accounts.

Prerequisites

  • Node.js (v18+)
  • A Google Cloud project with Calendar and Gmail APIs enabled
  • OAuth2 Desktop app credentials from your GCP project

Setup

Step 1: Install Dependencies

cd {baseDir}/scripts && npm install

This installs googleapis (Google API client) and mupdf (PDF text extraction for email attachments).

Step 2: Create a Google Cloud Project

  1. Go to Google Cloud Console and create a new project (or use an existing one)
  2. Enable the Google Calendar API and Gmail API:

- Go to APIs & Services → Library - Search for "Google Calendar API" → click Enable - Search for "Gmail API" → click Enable

Step 3: Configure the OAuth Consent Screen

  1. Go to Google Auth Platform → Audience (direct link)
  2. If prompted, configure the consent screen:

- App name: anything (e.g., "OpenClaw") - User support email: your email - Scopes: skip (the auth script requests scopes at runtime)

  1. If your app is in Testing publishing status (the default), add every Google account you want to authorize as a test user:

- Under Test users, click Add users - Enter the email addresses of each account you'll connect - Save

⚠️ Important: Apps in "Testing" status have a 7-day token expiry. To get long-lived tokens, publish your app to "Production" in the Audience settings. For personal Gmail accounts (External user type), you can skip Google's verification review — you'll just see an "unverified app" warning during consent. This is fine for personal use.

Step 4: Create OAuth Credentials

  1. Go to Google Auth Platform → Clients (direct link)
  2. Click Create Client → choose Desktop app as the application type
  3. Name it whatever you like (e.g., "OpenClaw")
  4. Click Create and download the credentials JSON
  5. Run the setup script:
node {baseDir}/scripts/setup.js --credentials /path/to/downloaded-credentials.json

This copies your credentials to ~/.openclaw/google-workspace-byok/credentials.json.

Step 5: Authorize Google Accounts

For each Google account you want to connect:

node {baseDir}/scripts/auth.js --account <label>

The <label> is a friendly name you'll use to reference this account (e.g., "personal", "work", "household").

Auth flow:

  1. The script prints an authorization URL
  2. Open the URL in your browser and sign in with the Google account
  3. Grant the requested permissions
  4. You'll be redirected to http://localhost/...the page won't load, and that's expected
  5. Copy the full URL from your browser's address bar and paste it back into the script
  6. The script exchanges the code for tokens and saves them

Scopes requested (default — read/write):

  • calendar — Full read/write access to Google Calendar
  • gmail.readonly — Read-only access to Gmail

Pass --readonly to request read-only calendar access instead.

Tokens are stored in ~/.openclaw/google-workspace-byok/tokens/<label>.json.

Usage

All scripts are in {baseDir}/scripts/. Run them with node.

Calendar

# List all calendars
node {baseDir}/scripts/calendar.js --account <label> --action list-calendars

# List upcoming events (default: next 7 days, primary calendar)
node {baseDir}/scripts/calendar.js --account <label> --action events

# List events with options
node {baseDir}/scripts/calendar.js --account <label> --action events --calendar <calendarId> --days <number> --max <number>

# Get a specific event
node {baseDir}/scripts/calendar.js --account <label> --action get-event --calendar <calendarId> --event-id <eventId>

# Check free/busy
node {baseDir}/scripts/calendar.js --account <label> --action freebusy --days <number>

Gmail

# List recent emails (default: 10)
node {baseDir}/scripts/gmail.js --account <label> --action list

# Search emails
node {baseDir}/scripts/gmail.js --account <label> --action list --query "from:someone@example.com" --max 20

# Read a specific email (includes attachment metadata with IDs)
node {baseDir}/scripts/gmail.js --account <label> --action read --message-id <messageId>

# Download all attachments from an email
node {baseDir}/scripts/gmail.js --account <label> --action attachment --message-id <messageId> --out-dir /tmp/attachments

# Download a specific attachment
node {baseDir}/scripts/gmail.js --account <label> --action attachment --message-id <messageId> --attachment-id <id> --out-dir /tmp

# List labels
node {baseDir}/scripts/gmail.js --account <label> --action labels

Gmail search uses the same query syntax as the Gmail web search box (e.g., is:unread, from:, newer_than:1d, has:attachment).

Reading PDF Attachments

The skill includes mupdf for extracting text from PDF attachments — useful for newsletters, invoices, school letters, etc. It handles multilingual text (Japanese, Chinese, etc.) well.

# 1. Download the attachment
mkdir -p /tmp/attachments
node {baseDir}/scripts/gmail.js --account <label> --action attachment --message-id <id> --out-dir /tmp/attachments

# 2. Extract text from the PDF
node --input-type=module -e "
import * as mupdf from '{baseDir}/scripts/node_modules/mupdf/dist/mupdf.js';
import fs from 'fs';
const data = fs.readFileSync('/tmp/attachments/filename.pdf');
const doc = mupdf.Document.openDocument(data, 'application/pdf');
for (let i = 0; i < doc.countPages(); i++) {
  const page = doc.loadPage(i);
  console.log(page.toStructuredText('preserve-whitespace').asText());
}
"
Note: mupdf is an ESM module — use node --input-type=module with import syntax, not require().

Account Management

# List configured accounts
node {baseDir}/scripts/accounts.js --action list

# Check token status
node {baseDir}/scripts/accounts.js --action status --account <label>

File Layout

~/.openclaw/google-workspace-byok/
├── credentials.json          # Your GCP OAuth credentials
└── tokens/
    ├── personal.json          # Token for "personal" account
    └── work.json              # Token for "work" account

Troubleshooting

Error 403: access_denied — "has not completed the Google verification process"

Your app is in Testing mode and the Google account isn't listed as a test user. Fix: Google Auth Platform → Audience → Test users → Add the email.

Error: invalid_grant

The refresh token expired or was revoked. Re-run node {baseDir}/scripts/auth.js --account <label> to re-authorize.

Tokens expire after 7 days

Apps in "Testing" publishing status issue tokens that expire after 7 days. Publish your app to "Production" for long-lived tokens. For personal Gmail (External user type), you can skip verification and just accept the "unverified app" warning.

Error: redirect_uri_mismatch

Your credentials.json doesn't include http://localhost as a redirect URI. Edit your OAuth client in GCP Console → Authorized redirect URIs → add http://localhost.

npm install fails or mupdf won't install

mupdf requires a C++ build toolchain on some platforms. If it fails, you can still use all other features — PDF text extraction is the only feature that requires it. Try: npm install --ignore-scripts to skip native compilation, then install mupdf separately if needed.

适合场景

01

OpenClaw 用户查找和安装 Skill 时

02

用户想查找某类 Agent Skill 时

03

需要根据任务场景推荐可安装能力包时

04

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

补充不同宿主或平台的使用分布数据

能力 5

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

OpenClaw

96.7%
按下载量换算8,249

安全审计

VirusTotal

可疑

ClawScan

通过

Static analysis

未展示

权限和风险

敏感数据

该 Skill 可能接触密钥、Token、环境变量或敏感配置,应进入高风险复核队列,默认不自动发布。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。来源安全扫描存在 warning/failed 结果,不能写成本站确认安全。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills