Diagram

System architecture flow diagram

Inbox Purge: Bedrock

Inbox Purge: Bedrock

An AI inbox cleaner that cut AI costs by 40%

An AI inbox cleaner that cut AI costs by 40%

Year

Year

2026

2026

Timeframe

Timeframe

Jan 2026

Jan 2026

Place

Python

Python

Category

Category

Case Studies

Case Studies

Overview

Email subscriptions cause massive inbox clutter. Gmail's native 'unsubscribe' requires individual clicks, making bulk management a manual chore. I built an AI-driven categorisation engine using Amazon Bedrock (Claude 3.5 Sonnet) to analyse subscriptions, assign 'trashiness scores,' and provide actionable insights for bulk cleanup.

๐Ÿ“ˆ Project Impact

  • Efficiency: Reduces inbox cleanup time from 30 minutes to 2 minutes
  • Speed: Processes 30 emails in under 60 seconds
  • Precision: Achieves 94% AI categorisation accuracy
  • Optimisation: 40% cost savings using Bedrock vs. OpenAI

๐ŸŽฏ Key Learning Outcomes

๐Ÿ’ป Technical Skills Acquired

  • Cloud Integration: Configured AWS IAM roles and enabled Amazon Bedrock model access
  • AI Implementation: Integrated Claude 3.5 Sonnet; mastered prompt engineering for structured JSON outputs
  • API Auth: Implemented OAuth 2.0 flow for Gmail API and managed token refresh cycles
  • Full-Stack: Python backend development using boto3 and google-api-python-client

๐Ÿ‘” Product Management Skills

  • Trade-off Analysis: Conducted quantitative evaluation of Bedrock vs. OpenAI based on cost and compliance
  • User-Centric Design: Identified core pain points via a survey of 7 peers
  • MVP Scoping: Prioritised categorisation (Phase 1) over full automation to validate the core value prop

๐Ÿ—๏ธ System Architecture

Data Flow: Gmail API โ†’ Python Backend โ†’ Amazon Bedrock โ†’ JSON Output

๐Ÿ”€ Trade-offs: Bedrock vs. OpenAI

Final Decision: Amazon Bedrock โœ…

  • Cost: $3/1M tokens (Bedrock) vs $5/1M tokens (OpenAI)
  • Data Privacy: AWS-contained infrastructure vs External routing
  • Rationale: 40% cost reduction scales to ~$730K annual savings at a 10k user scale. Data residency is essential for future GDPR/SOC2 compliance

๐Ÿšง Technical Challenges & Solutions

  • OAuth Access Blocked: Resolved by adding test users in the Google Cloud Console
  • JSON Parsing Error: Handled Claude's markdown fences by writing a Python cleaning utility
  • 403 Forbidden Error: Enabled the Gmail API manually via the API Library

๐Ÿ“ˆ Future Roadmap

  • Phase 2: Implement programmatic unsubscribe via email headers
  • Phase 3: Build a Streamlit interactive dashboard
  • Phase 4: Deploy to AWS Lambda for production scaling

Last Updated: January 31, 2026

ยฉ2026 Amisha Shrivastava ยท Built using Framer and Claude