← 返回
沟通协作 Key 中文

Gmail Auto Draft

Monitor Gmail inbox, read incoming emails, generate personalized follow-up replies with OpenAI, and save replies into Gmail Drafts for human review. Use when...
监控Gmail收件箱,读取收到的邮件,使用OpenAI生成个性化跟进回复,并将回复保存到Gmail草稿箱供人工审核。使用场景:...
yuliuyi717-ux
沟通协作 clawhub v1.0.0 1 版本 100000 Key: 需要
★ 0
Stars
📥 553
下载
💾 7
安装
1
版本
#automation#gmail#latest

概述

Gmail Auto Draft

Use this skill to build or run a review-safe Gmail reply workflow: read new emails, generate AI reply text, and save drafts instead of sending directly.

Quick workflow

  1. Prepare Google OAuth credentials.
  2. Use local GMN endpoint (openclaw:main) or set external OpenAI key.
  3. Run one-shot mode to validate draft creation.
  4. Tune query and prompt style.
  5. Switch to polling mode for continuous monitoring.

Run commands

Install dependencies:

cd skills/gmail-auto-draft/scripts
python3 -m pip install -r requirements.txt

Default backend (local GMN via OpenClaw gateway):

export OPENAI_BASE_URL="http://127.0.0.1:18789/v1"
export OPENAI_MODEL="openclaw:main"

Or use OpenAI directly:

export OPENAI_API_KEY="your_openai_key"
export OPENAI_MODEL="gpt-4o-mini"

One-shot test:

./run_once.sh --auth-mode local --max-emails 3

Continuous monitor:

./run_once.sh --poll-interval 60 --max-emails 5 --mark-read

Upwork demo profile (lead-focused query + fixed agency tone):

./run_upwork_demo.sh --auth-mode local --max-emails 5

Common options

  • --query: Gmail search filter for target emails.
  • --max-emails: max messages per cycle.
  • --poll-interval: seconds between cycles (0 means run once).
  • --openai-model: model name (default openclaw:main).
  • --openai-base-url: OpenAI-compatible base URL (default http://127.0.0.1:18789/v1).
  • --agency-profile: business context for OpenAI prompt.
  • --agency-profile-file: load agency context from a text file.
  • --style-rules: response style constraints.
  • --style-rules-file: load style rules from a text file.
  • --query-file: load Gmail query from a text file.
  • --mark-read: mark processed messages as read.
  • --processed-label: label for already drafted emails (default openclaw_auto_drafted).

Output behavior

The script prints JSON for each cycle:

  • processed: number of drafted replies
  • created_drafts: draft metadata
  • skipped: skipped message reasons
  • errors: per-message errors

Resources

  • Script: scripts/gmail_auto_draft.py
  • Runner: scripts/run_once.sh
  • Demo runner: scripts/run_upwork_demo.sh
  • Dependencies: scripts/requirements.txt
  • Setup guide: references/setup.md
  • Prompt/query tuning: references/prompt-tuning.md
  • Demo config: references/upwork-demo/agency_profile.txt
  • Demo config: references/upwork-demo/style_rules.txt
  • Demo config: references/upwork-demo/gmail_query.txt

版本历史

共 1 个版本

  • v1.0.0 当前
    2026-03-30 01:30 安全 安全

安全检测

腾讯云安全 (Keen)

安全,无风险
查看报告

腾讯云安全 (Sanbu)

安全,无风险
查看报告

🔗 相关推荐

communication-collaboration

Gmail

byungkyu
Gmail API 集成,托管 OAuth,支持读取、发送和管理邮件、线程、标签及草稿,适用于需要与 Gmail 交互的场景。
★ 72 📥 37,731
communication-collaboration

Slack

steipete
当需要通过 slack 工具从 Clawdbot 控制 Slack 时使用,包括在频道或私信中回复消息或置顶/取消置顶项目。
★ 157 📥 47,680
communication-collaboration

Himalaya

lamelas
{"answer":"通过IMAP/SMTP管理邮件的CLI。可在终端使用 `himalaya` 收发、回复、转发、搜索及整理邮件。支持多账户与MML(MIME元语言)编写邮件。"}
★ 68 📥 45,587