Install
openclaw skills install gmail-auto-draftMonitor Gmail inbox, read incoming emails, generate personalized follow-up replies with OpenAI, and save replies into Gmail Drafts for human review. Use when...
openclaw skills install gmail-auto-draftUse 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.
openclaw:main) or set external OpenAI key.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
--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).The script prints JSON for each cycle:
processed: number of drafted repliescreated_drafts: draft metadataskipped: skipped message reasonserrors: per-message errorsscripts/gmail_auto_draft.pyscripts/run_once.shscripts/run_upwork_demo.shscripts/requirements.txtreferences/setup.mdreferences/prompt-tuning.mdreferences/upwork-demo/agency_profile.txtreferences/upwork-demo/style_rules.txtreferences/upwork-demo/gmail_query.txt