← 返回
效率工具 Key

Google Calendar

Interact with Google Calendar via the Google Calendar API – list upcoming events, create new events, update or delete them. Use this skill when you need programmatic access to your calendar from OpenClaw.
通过 Google Calendar API 与 Google 日历交互,包括列出即将到来的活动、创建、更新或删除活动。当需要在 OpenClaw 中以编程方式访问日历时使用此技能。
adrianmiller99
效率工具 clawhub v0.1.0 1 版本 97126.1 Key: 需要
★ 11
Stars
📥 16,813
下载
💾 119
安装
1
版本
#latest

概述

Google Calendar Skill

Overview

This skill provides a thin wrapper around the Google Calendar REST API. It lets you:

  • list upcoming events (optionally filtered by time range or query)
  • add a new event with title, start/end time, description, location, and attendees
  • update an existing event by its ID
  • delete an event by its ID

The skill is implemented in Python (scripts/google_calendar.py). It expects the following environment variables to be set (you can store them securely with openclaw secret set):

GOOGLE_CLIENT_ID=…
GOOGLE_CLIENT_SECRET=…
GOOGLE_REFRESH_TOKEN=…   # obtained after OAuth consent
GOOGLE_CALENDAR_ID=primary   # or the ID of a specific calendar

The first time you run the skill you may need to perform an OAuth flow to obtain a refresh token – see the Setup section below.

Commands

google-calendar list [--from <ISO> --to <ISO> --max <N>]
google-calendar add   --title <title> [--start <ISO> --end <ISO>]
                     [--desc <description> --location <loc> --attendees <email1,email2>]
google-calendar update --event-id <id> [--title <title> ... other fields]
google-calendar delete --event-id <id>

All commands return a JSON payload printed to stdout. Errors are printed to stderr and cause a non‑zero exit code.

Setup

  1. Create a Google Cloud project and enable the Google Calendar API.
  2. Create OAuth credentials (type Desktop app). Note the client_id and client_secret.
  3. Run the helper script to obtain a refresh token:

```bash

GOOGLE_CLIENT_ID=… GOOGLE_CLIENT_SECRET=… python3 -m google_calendar.auth

```

It will open a browser (or print a URL you can open elsewhere) and ask you to grant access. After you approve, copy the refresh_token it prints.

  1. Store the credentials securely:

```bash

openclaw secret set GOOGLE_CLIENT_ID

openclaw secret set GOOGLE_CLIENT_SECRET

openclaw secret set GOOGLE_REFRESH_TOKEN

openclaw secret set GOOGLE_CALENDAR_ID primary # optional

```

  1. Install the required Python packages (once):

```bash

pip install --user google-auth google-auth-oauthlib google-api-python-client

```

How it works (brief)

The script loads the credentials from the environment, refreshes the access token using the refresh token, builds a service = build('calendar', 'v3', credentials=creds), and then calls the appropriate API method.

References

  • Google Calendar API reference: https://developers.google.com/calendar/api/v3/reference
  • OAuth 2.0 for installed apps: https://developers.google.com/identity/protocols/oauth2/native-app

Note: This skill does not require a GUI; it works entirely via HTTP calls, so it is suitable for headless servers.

版本历史

共 1 个版本

  • v0.1.0 当前
    2026-03-27 23:18 安全 安全

安全检测

腾讯云安全 (Keen)

安全,无风险
查看报告

腾讯云安全 (Sanbu)

安全,无风险
查看报告

🔗 相关推荐

productivity

Weather

steipete
获取当前天气和预报(无需API密钥)
★ 444 📥 226,097
productivity

Obsidian

steipete
操作 Obsidian 仓库(纯 Markdown 笔记)并通过 obsidian-cli 自动化。
★ 429 📥 103,684
productivity

Word / DOCX

ivangdavila
创建、检查和编辑 Microsoft Word 文档及 DOCX 文件,支持样式、编号、修订记录、表格、分节符及兼容性检查等功能。
★ 437 📥 147,156