✓ Verified
💻 Development
✓ Enhanced Data
Email Processor
Automate Gmail inbox processing - categorizes unread emails, marks marketing/newsletters/promotions
- Rating
- 4.5 (125 reviews)
- Downloads
- 2,526 downloads
- Version
- 1.0.0
Overview
Automate Gmail inbox processing - categorizes unread emails, marks marketing/newsletters/promotions as read.
Complete Documentation
View Source →
Email Processor
Automates Gmail inbox triage by categorizing unread emails and marking low-priority items as read.
What It Does
- Fetches all unread emails
- Identifies marketing, newsletters, promotions, and news
- Marks low-priority emails as read
- Surfaces important emails (GitHub, security alerts, direct communications)
- Generates a summary report
Prerequisites
1. Install gog CLI
bash
brew install steipete/tap/gogcli
Verify installation:
bash
gog --version
2. Google Cloud OAuth Setup
- Go to Google Cloud Console
- Create a new project (or use existing)
- Enable the Gmail API:
- Navigate to "APIs & Services" > "Library"
- Search for "Gmail API" and enable it
- Create OAuth credentials:
- Go to "APIs & Services" > "Credentials"
- Click "Create Credentials" > "OAuth client ID"
- Select "Desktop app" as application type
- Download the JSON file
3. Authenticate gog
bash
# Set credentials
gog auth credentials /path/to/client_secret.json
# Add your Gmail account
gog auth add [email protected] --services gmail
# Verify
gog auth list
Usage
Quick Process
bash
bash ~/.openclaw/workspace/skills/email-processor/scripts/process-emails.sh
Manual Processing (via Codex)
- Fetch unread emails:
bash
gog gmail search 'is:unread' --json --max 100
- Mark specific thread as read:
bash
gog gmail thread modify <thread-id> --remove UNREAD --force
- Mark marketing emails (batch):
bash
gog gmail search 'is:unread' --json --max 100 | \
jq -r '.threads[] | select(.labels | contains(["CATEGORY_PROMOTIONS"])) | .id' | \
while read id; do gog gmail thread modify "$id" --remove UNREAD --force; done
Email Categories
Auto-Marked as Read
CATEGORY_PROMOTIONS- Promotional emails[Superhuman]/AI/News- Newsletters[Superhuman]/AI/Marketing- Marketing emails[Superhuman]/AI/Pitch- Cold outreach/pitches[Superhuman]/AI/AutoArchived- Auto-categorized low priority
Preserved (Important)
- GitHub notifications (PRs, issues, security alerts)
- Direct personal communications
- Financial/transaction emails
- Security alerts
- Calendar invites
Verification
Check setup is working:
bash
# Test gog connectivity
gog gmail search 'is:unread' --max 5
# Check account
gog auth list
# Test modify (dry run - just list what would be marked)
gog gmail search 'is:unread' --json --max 10 | \
jq -r '.threads[] | select(.labels | contains(["CATEGORY_PROMOTIONS"])) | {id: .id, subject: .subject}'
Troubleshooting
| Issue | Solution |
|---|---|
| gog: command not found | Run brew install steipete/tap/gogcli |
| authentication required | Run gog auth credentials and gog auth add |
| token expired | Run gog auth refresh [email protected] |
| Gmail API not enabled | Enable at https://console.cloud.google.com/apis/library/gmail.googleapis.com |
| Rate limit errors | Add delays between requests or reduce batch size |
Labels Reference
Gmail automatically applies these labels:
CATEGORY_PERSONAL- Personal emailsCATEGORY_SOCIAL- Social notificationsCATEGORY_PROMOTIONS- PromotionsCATEGORY_UPDATES- Updates/notificationsCATEGORY_FORUMS- Forum messagesIMPORTANT- Marked importantUNREAD- Unread status
[Superhuman]/AI/News- Newsletters[Superhuman]/AI/Marketing- Marketing[Superhuman]/AI/Pitch- Pitches[Superhuman]/AI/AutoArchived- Auto-archived
Installation
Terminal bash
openclaw install email-processor
Copied!
💻Code Examples
gog --version
gog---version.txt
### 2. Google Cloud OAuth Setup
1. Go to [Google Cloud Console](https://console.cloud.google.com/)
2. Create a new project (or use existing)
3. Enable the Gmail API:
- Navigate to "APIs & Services" > "Library"
- Search for "Gmail API" and enable it
4. Create OAuth credentials:
- Go to "APIs & Services" > "Credentials"
- Click "Create Credentials" > "OAuth client ID"
- Select "Desktop app" as application type
- Download the JSON file
### 3. Authenticate goggog auth list
gog-auth-list.txt
## Usage
### Quick Processbash ~/.openclaw/workspace/skills/email-processor/scripts/process-emails.sh
bash-openclawworkspaceskillsemail-processorscriptsprocess-emailssh.txt
### Manual Processing (via Codex)
1. **Fetch unread emails:**example.sh
# Set credentials
gog auth credentials /path/to/client_secret.json
# Add your Gmail account
gog auth add [email protected] --services gmail
# Verify
gog auth listexample.sh
gog gmail search 'is:unread' --json --max 100 | \
jq -r '.threads[] | select(.labels | contains(["CATEGORY_PROMOTIONS"])) | .id' | \
while read id; do gog gmail thread modify "$id" --remove UNREAD --force; doneexample.sh
# Test gog connectivity
gog gmail search 'is:unread' --max 5
# Check account
gog auth list
# Test modify (dry run - just list what would be marked)
gog gmail search 'is:unread' --json --max 10 | \
jq -r '.threads[] | select(.labels | contains(["CATEGORY_PROMOTIONS"])) | {id: .id, subject: .subject}'Tags
#devops_and-cloud
Quick Info
Category Development
Model Claude 3.5
Complexity One-Click
Author zaynjarvis
Last Updated 3/10/2026
🚀
Optimized for
Claude 3.5
Ready to Install?
Get started with this skill in seconds
openclaw install email-processor
Related Skills
✓ Verified
💻 Development
4claw
4claw — a moderated imageboard for AI agents.
🧠 Claude-Ready
)}
★ 4.4 (118)
↓ 4,990
v1.0.0
✓ Verified
💻 Development
Aap Passport
Agent Attestation Protocol - The Reverse Turing Test.
🧠 Claude-Ready
)}
★ 4.3 (89)
↓ 4,621
v1.0.0
✓ Verified
💻 Development
Acestep Lyrics Transcription
Transcribe audio to timestamped lyrics using OpenAI Whisper or ElevenLabs Scribe API.
⚡ GPT-Optimized
)}
★ 3.8 (274)
↓ 17,648
v1.0.0
✓ Verified
💻 Development
Adaptive Suite
A continuously adaptive skill suite that empowers Clawdbot.
🧠 Claude-Ready
)}
★ 4.7 (88)
↓ 1,625
v1.0.0