gws-gmail-watch
Monitor Gmail for New Emails
Stop missing important emails. This skill helps you monitor Gmail in real-time and stream new messages as structured data for automated processing.
Download the skill ZIP
Upload in Claude
Go to Settings → Capabilities → Skills → Upload skill
Toggle on and start using
Test it
Using "gws-gmail-watch". Watch my Gmail inbox for new emails
Expected outcome:
- Setting up Gmail watch for INBOX...
- Pub/Sub topic created: projects/my-project/topics/gmail-watch
- Subscription created: projects/my-project/subscriptions/gmail-watch-sub
- Watching for new emails (press Ctrl-C to stop)...
- Received message: {"historyId":"12345","email":{"id":"msg123","threadId":"thread456","snippet":"Hello..."}}
Using "gws-gmail-watch". Watch unread emails once and exit
Expected outcome:
- Pulling messages from label INBOX,UNREAD...
- Pulled 3 messages
- Processing complete
- Run again to renew watch (expires in 7 days)
Security Audit
SafeStatic analysis detected 20 potential security issues, all of which are false positives after manual review. The external_commands detections are documentation code blocks (bash examples), filesystem detections are markdown hyperlink references (../ paths), and weak crypto detections are false positives on version numbers. This is documentation-only content with no executable code.
Low Risk Issues (2)
Quality Score
What You Can Build
Automated Email Processing Pipeline
Set up real-time monitoring to catch important emails and trigger automated workflows like extracting data from receipts, invoices, or notifications.
Customer Support Response Monitor
Watch for high-priority support emails and alert the team instantly when critical messages arrive in the support inbox.
Personal Inbox Watchdog
Monitor personal Gmail for specific senders or labels and receive NDJSON output for logging or analysis in productivity tools.
Try These Prompts
Watch my Gmail inbox for new emails and show them as they arrive. I want to see the output in the terminal.
Watch only unread emails in my Gmail INBOX label. Pull messages every 10 seconds and stop after finding 5 messages.
Watch my Gmail for new emails and save each message to a separate JSON file in the ./emails directory. Clean up resources when done.
Connect to my existing Pub/Sub subscription at projects/my-project/subscriptions/email-sub and pull messages once.
Best Practices
- Use the --cleanup flag when testing to avoid leaving orphaned Pub/Sub resources in your GCP project
- Renew your Gmail watch every 7 days to maintain uninterrupted monitoring
- Start with --once flag to test your configuration before running the continuous watcher
- Specify --label-ids to filter messages and reduce noise from irrelevant labels
Avoid
- Do not run without --cleanup in production tests unless you want Pub/Sub resources to persist
- Do not set --max-messages too high as it may cause memory issues with large email batches
- Do not forget to set up proper GCP project permissions before running the watch command
- Do not use --poll-interval below 1 second to avoid Gmail API rate limiting