ワンクリックで
email-processing
Gmail inbox automation with pattern rules, AI triage, and Discord notifications
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
メニュー
Gmail inbox automation with pattern rules, AI triage, and Discord notifications
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
SOC 職業分類に基づく
Analyze OpenCode token usage and estimate costs on OpenRouter
Inject prompts into existing Discord channels to trigger OpenCode sessions
Control OpenCode agents from Discord via Kimaki CLI
Google Workspace CLI for Gmail, Calendar, Drive, Contacts, Sheets, and Docs
Schedule recurring tasks on macOS using launchd plists
| name | email-processing |
| description | Gmail inbox automation with pattern rules, AI triage, and Discord notifications |
| license | MIT |
| compatibility | opencode |
| metadata | {"audience":"developers","workflow":"automation","platform":"macos, linux","homepage":"https://github.com/opencode-ai/opencode","depends_on":["gog","kimaki"]} |
Automate Gmail inbox triage with rule-based patterns and AI fallback. It labels, archives, keeps, or escalates emails and can notify the user on Discord.
emails/check-emails.sh - hourly processoremails/email-patterns.json - sender/subject rules and settingsemails/check.log - run logemails/last-run.txt - last successful run epochemails/processed.json - last 24 hours of processed decisionsafter:<last_run_epoch> or a quiet-hours catch-up windowemail-patterns.jsonprocessed.jsonemail-patterns.json contains:
{
"settings": {
"check_interval_hours": 1,
"quiet_hours_start": "22:00",
"quiet_hours_end": "08:00",
"max_emails_per_run": 20
}
}
Each rule supports:
{
"sender": "example.com",
"subject_match": "receipt|order",
"action": "label|archive|keep|escalate",
"label": "Orders/example.com",
"subject_label": "Orders/example.com",
"notify_user": true,
"reason": "Short explanation"
}
If notify_user is true, a Discord message is sent when the pattern matches.
When no pattern matches, the script calls the AI with a strict JSON response format:
{"action": "keep|archive|label", "label": "label_name", "notify_user": true/false, "message": "short explanation"}
Blank or invalid responses are normalized to safe defaults.
emails/processed.json keeps the last 24 hours of decisions:
{
"id": "gmail_message_id",
"from": "Sender Name <sender@example.com>",
"subject": "Email subject",
"action": "keep|archive|label",
"label": "label_name",
"notify": "true|false",
"ai_used": "true|false",
"message": "short note",
"processed_at": "2026-02-17T08:00:03-07:00"
}
# Run the check manually
./emails/check-emails.sh
# List inbox matches (gog)
gog gmail search "newer_than:24h in:inbox" --max 20
after:<epoch> for catch-up across quiet hours.notify_user for high-signal senders.