← Back to Blog

Building a Personal AI Assistant: From Gmail to Morning Memos

Published: February 21, 2026 | Last Updated: March 3, 2026 | By Jingxiao Cai

This post was co-created with Clawsistant, my OpenClaw AI agent. Because sometimes the best way to explain your career path is to have an AI help you connect the dots.

πŸ“ Update (March 2026): Added unified Gmail reader library reference and enhanced Calendar/Drive integration details.
AI Assistant Gmail Automation OpenClaw Productivity

Introduction

What if you woke up every morning to a curated summary of what matters? No more scrolling through 100+ emails. No more missing important calendar events. Just a clean, actionable memo that tells you exactly what you need to know.

That's what I built: a personal AI assistant running on a small cloud VM that reads my Gmail, monitors my Google Drive, checks my calendar, and delivers a daily morning memo to my phone.

In this post, I'll walk you through how to build this for yourself using OpenClaw β€” an open-source AI assistant framework β€” and Google's APIs.

What is OpenClaw?

OpenClaw is an open-source AI assistant that runs on your own infrastructure. Unlike cloud-based assistants (ChatGPT, Claude, etc.), OpenClaw runs locally, gives you full control, and integrates with your personal data sources.

Key features:

Architecture Overview

Here's what the system looks like:

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚                    Your Cloud VM                            β”‚
β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”   β”‚
β”‚  β”‚                   OpenClaw                            β”‚   β”‚
β”‚  β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β”‚   β”‚
β”‚  β”‚  β”‚ Gmail API   β”‚  β”‚ Drive API   β”‚  β”‚Calendar API β”‚  β”‚   β”‚
β”‚  β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜  β”‚   β”‚
β”‚  β”‚         β”‚                β”‚                β”‚           β”‚   β”‚
β”‚  β”‚         β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜           β”‚   β”‚
β”‚  β”‚                          β–Ό                            β”‚   β”‚
β”‚  β”‚              β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”                  β”‚   β”‚
β”‚  β”‚              β”‚   AI Processing     β”‚                  β”‚   β”‚
β”‚  β”‚              β”‚   (Priority + Summ)β”‚                  β”‚   β”‚
β”‚  β”‚              β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜                  β”‚   β”‚
β”‚  β”‚                          β”‚                            β”‚   β”‚
β”‚  β”‚                          β–Ό                            β”‚   β”‚
β”‚  β”‚              β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”                  β”‚   β”‚
β”‚  β”‚              β”‚  Morning Memo Gen  β”‚                  β”‚   β”‚
β”‚  β”‚              β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜                  β”‚   β”‚
β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜   β”‚
β”‚                          β”‚                                  β”‚
β”‚                          β–Ό                                  β”‚
β”‚              β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”                       β”‚
β”‚              β”‚  Telegram/WhatsApp β”‚                       β”‚
β”‚              β”‚     Delivery        β”‚                       β”‚
β”‚              β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜                       β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

Prerequisites

Step 1: Set Up Google APIs

You'll need to create a Google Cloud project and enable the APIs:

  1. Go to Google Cloud Console
  2. Create a new project
  3. Enable these APIs:
    • Gmail API
    • Google Calendar API
    • Google Drive API
  4. Create OAuth 2.0 credentials:
    • Application type: Desktop app
    • Download the credentials.json file
Note: For read-only access (which is safer), use the "gmail.readonly" scope. If you want the assistant to also send emails, add "gmail.send".

Step 2: Install OpenClaw

Install OpenClaw on your VM:

npm install -g openclaw
openclaw init
openclaw start

Step 3: Connect Gmail - Unified Library Approach

βœ… Recommended: Use the unified openclaw-gmail-reader library instead of custom scripts.

GitHub Repository: github.com/anyech/openclaw-gmail-reader

This unified library provides:

Quick Start:

# Clone the unified library
git clone https://github.com/anyech/openclaw-gmail-reader.git
cd openclaw-gmail-reader

# Create virtual environment
python3 -m venv venv
source venv/bin/activate

# Install dependencies
pip install -r requirements.txt

# Run OAuth setup (headless-friendly)
python3 manual_oauth.py

# Test Gmail fetch
python3 gmail_reader.py --summary

For detailed OAuth setup on headless servers, see VPS OAuth Survival Guide.

Step 4: Smart Priority Detection

Not all emails are equal. I built a priority system:

This transforms 100+ emails into an actionable 5-10 item list.

Step 5: Schedule the Morning Memo

Use OpenClaw's cron to run daily:

openclaw cron add --schedule "0 18 * * *" --task "morning-memo"

This runs at 10 AM PST (6 PM UTC) every day.

Step 6: Deliver to Your Phone

Configure Telegram or WhatsApp delivery in OpenClaw:

{
  "channels": {
    "telegram": {
      "enabled": true,
      "chat_id": "YOUR_CHAT_ID"
    }
  }
}

Sample Output

Here's what the morning memo looks like:

πŸ“¬ Gmail (24h): 45 emails

HIGH PRIORITY:
β€’ School: Parent-Teacher Conference (Mar 5), Newsletter
β€’ Billing: Water utility payment confirmed ($89.50)
β€’ Medical: Appointment reminder - Dr. Smith (Mar 3)

WORK:
β€’ Project deadline: Q1 deliverables (Mar 15)
β€’ Team meeting: Weekly sync (tomorrow 10am)

QUICK ACTIONS:
1. Confirm parent-teacher conference attendance
2. Review Q1 project timeline

API Status Monitoring (Updated March 2026)

The morning memo now includes real-time API status for all connected services. This helps diagnose issues before they become problems.

Current Status Display

πŸ”Œ API Status
β”œβ”€β”€ Gmail: βœ… Working (last check: 6:02 AM PST)
β”œβ”€β”€ Calendar: βœ… Working (5 events today)
β”œβ”€β”€ Drive: βœ… Working (460 files, 2 new since yesterday)
└── MiniMax: βœ… Working (78% quota used - 3,510/4,500 calls)

MiniMax Quota Monitoring

πŸ“Š Why Monitor MiniMax? MiniMax is my primary fallback model. If quota runs out, the morning memo falls back to slower models, potentially causing delays.

My Setup:

Automated Cron Monitoring:

# Daily quota check at 9 AM PST
0 17 * * * cd ~/.openclaw && python3 scripts/check_minimax_quota.py

The check script:

Google Drive Live Scan

βœ… Real-Time Drive Monitoring: Morning memo queries Google Drive live on each run β€” no stale cache. Can detect new files within the last 24 hours.

Current Capabilities:

Sample Drive Section:

πŸ“ Google Drive Updates
β”œβ”€β”€ Total files: 460
β”œβ”€β”€ New since yesterday: 2
β”‚   β”œβ”€β”€ Resume_Draft_2026.pdf (Documents/)
β”‚   └── Project_Notes.docx (Work/)
└── ⚠️ Action needed: Review new resume draft

Troubleshooting: Calendar/Drive 403 Errors

⚠️ Common Issue: Calendar and Drive APIs may return 403 "insufficient scopes" even after re-authorization.

Root Cause: The OAuth refresh token may have all scopes, but token.json has stale scope metadata.

The Fix (Don't Re-authorize!):

# Step 1: Check current token scopes
cat credentials/token.json | python3 -m json.tool | grep scopes

# Step 2: Update token.json with all 5 scopes
python3 -c "
import json
with open('credentials/token.json', 'r') as f:
    t = json.load(f)
t['scopes'] = [
    'https://www.googleapis.com/auth/gmail.readonly',
    'https://www.googleapis.com/auth/gmail.send', 
    'https://www.googleapis.com/auth/calendar.readonly',
    'https://www.googleapis.com/auth/drive.readonly',
    'https://www.googleapis.com/auth/spreadsheets.readonly'
]
with open('credentials/token.json', 'w') as f:
    json.dump(t, f, indent=2)
print('βœ… Scopes updated')
"

Key Lesson: Refresh token retains all scopes permanently; token.json scope list can become stale.

Privacy Considerations

Important: This setup gives an AI assistant access to your emails. Consider:

Future Enhancements

What I'm planning to add:

Conclusion

Building a personal AI assistant is surprisingly straightforward with tools like OpenClaw. The key insight isn't the technology β€” it's knowing what information matters to you and automating its delivery.

Start small. Maybe just email summaries first. Then expand to calendar, Drive, and beyond.

The future of personal productivity isn't a better to-do app. It's having your own AI that knows what matters and tells you.