Gmail Auto Draft
/install gmail-auto-draft
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
- Prepare Google OAuth credentials.
- Use local GMN endpoint (
openclaw:main) or set external OpenAI key. - Run one-shot mode to validate draft creation.
- Tune query and prompt style.
- 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 (0means run once).--openai-model: model name (defaultopenclaw:main).--openai-base-url: OpenAI-compatible base URL (defaulthttp://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 (defaultopenclaw_auto_drafted).
Output behavior
The script prints JSON for each cycle:
processed: number of drafted repliescreated_drafts: draft metadataskipped: skipped message reasonserrors: 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
- 确保已安装 OpenClaw(本地或 Docker 部署)
- 在对话框中输入安装命令:
/install gmail-auto-draft - 安装完成后,直接呼叫该 Skill 的名称或使用
/gmail-auto-draft触发 - 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
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... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 243 次。
如何安装 Gmail Auto Draft?
在 OpenClaw 或 Claude Code 对话框中运行命令「/install gmail-auto-draft」即可一键安装,无需额外配置。
Gmail Auto Draft 是免费的吗?
是的,Gmail Auto Draft 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。
Gmail Auto Draft 支持哪些平台?
Gmail Auto Draft 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。
谁开发了 Gmail Auto Draft?
由 yuliuyi717-ux(@yuliuyi717-ux)开发并维护,当前版本 v1.0.0。