원클릭으로
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 직업 분류 기준
| 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.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