In This Article
Introduction
A business development professional built a contact management system entirely on top of OpenClaw's memory. The agent scans his Gmail and Google Calendar, discovers new contacts from email threads and meeting invitations, and creates individual Markdown files for each person. Every morning, the agent delivers a briefing: who he's meeting today, when he last spoke with each person, and any outstanding follow-ups he promised.
"I used to forget to follow up with people all the time," he noted in a community post. "Now the agent catches everything. My networking has improved measurably because nothing falls through the cracks." The entire system cost him one afternoon of configuration time and runs for roughly $8/month in API costs.
This use case demonstrates OpenClaw's strength: turning unstructured communication data into actionable, queryable knowledge. No Salesforce license, no manual data entry, no sync issues. Just Gmail, Calendar, and an agent that understands your relationships.
How It Works
Daily cron job (or Heartbeat at 6 AM):
- Scan Gmail for new threads; extract participants
- Scan Google Calendar for meeting attendees
- Match to existing contacts in memory; create new contact files for unknowns
- Update last_contact, last_meeting, promised_followups in each contact's Markdown file
- Generate morning briefing
The flow is intentionally simple. The agent doesn't try to do sentiment analysis or predict deal closure — it focuses on the basics: who did you interact with, when, and what did you promise? That's 80% of the value with 20% of the complexity.
Key design choice: the agent runs on a schedule, not on every email. Batching reduces API calls and keeps costs low. A 6 AM daily run is sufficient for most professionals. Power users can run at 6 AM and 6 PM.
Data Extraction
From Gmail: sender, recipients, date, subject, snippet. From Calendar: event title, attendees, date, location. Parse into structured format. Deduplicate by email address. Merge with existing CONTACTS/ directory.
Contact file format:
# Jane Smith
- Email: jane@company.com
- Last contact: 2026-02-15 (email re: project update)
- Last meeting: 2026-02-10 (intro call)
- Promised: Send proposal by 2026-02-20
- Notes: Decision maker at Acme Corp
Extraction can be script-based (Gmail API, Calendar API) or LLM-assisted. For high volume, scripts are faster and cheaper. For complex threads where "promised" items are buried in prose, a lightweight LLM pass can extract commitments. Many users start with scripts and add LLM extraction only for threads flagged as "important" (e.g., containing "follow up" or "send you").
Deduplication is critical. The same person may appear as jane@company.com, jane.smith@company.com, or "Jane Smith" in Calendar. Normalize to canonical email. Use fuzzy matching for names if needed. When in doubt, create a new file and merge manually later — over-deduplication can lose data.
Storage
Store in ~/clawd/CONTACTS/jane-smith.md. One file per contact. Human-readable. Searchable with grep. Version controllable. Optional: SQLite for structured queries if contact count exceeds hundreds.
File naming: use slugified email or name. jane-smith.md, john-doe-acme.md. Avoid special characters. For disambiguation (two Jane Smiths), include company: jane-smith-acme.md, jane-smith-beta.md.
Schema flexibility: Markdown allows freeform notes. Add custom fields as needed: "Industry," "Source," "Deal size." The agent can parse these for richer queries. Start minimal; expand as you learn what you need.
Querying
User asks via Telegram: "Who do I need to follow up with this week?" Agent reads CONTACTS/, filters by promised_followups with due date in next 7 days, returns list. "Who did I meet last month?" Agent filters by last_meeting. Natural language queries, structured data.
The magic is in the combination: the user doesn't need to remember field names or query syntax. "Who's been quiet for a while?" → filter by last_contact older than 30 days. "Who am I seeing today?" → cross-reference Calendar with CONTACTS. The agent translates intent into filters.
Pro tip: Add a HEARTBEAT task that surfaces "stale" contacts — people you haven't contacted in 60+ days. A weekly digest: "You haven't reached out to these 5 people in 2 months. Consider reconnecting."
Implementation
- Gmail API and Google Calendar API credentials: OAuth2. Store tokens securely. The agent needs read-only access.
- Heartbeat task: Daily scan + briefing. Configure in HEARTBEAT.md. Use two-tier processing: Tier 1 fetches raw data; Tier 2 (LLM) only when new contacts or actionable items exist.
- Contact parsing logic: Script or LLM-assisted. Start with script for speed; add LLM for "promised" extraction if needed.
- Telegram for queries and briefings: User receives morning briefing and can ask ad-hoc questions. See Telegram setup.
Estimated setup time: 2–4 hours for a developer familiar with Gmail/Calendar APIs. Non-developers can use community skills from ClawHub; check for "Gmail CRM" or "Contact sync" skills.
A Day in the Life
6:00 AM: Heartbeat runs. Agent scans Gmail and Calendar. Finds 3 new email threads, 2 meetings today. Updates CONTACTS/. Creates new file for "Mike Chen" (met via intro email). Updates "Jane Smith" — last_contact now 2/18, promised "Send proposal by 2/20" (extracted from email).
6:05 AM: Agent generates briefing. "Good morning. Today: 2 meetings — Jane Smith (11 AM), Bob Lee (3 PM). Follow-ups due this week: Jane (proposal by 2/20), Sarah Kim (intro to Mike by 2/22). New contact: Mike Chen. You haven't spoken to Alex Wong in 45 days."
10:00 AM: User asks via Telegram: "What do I know about Jane?" Agent reads jane-smith.md, returns summary. "Decision maker at Acme. Last meeting 2/10. You promised a proposal by 2/20. Notes: interested in enterprise tier."
5:00 PM: User sends email to Jane with proposal. Next morning's scan will update last_contact. The cycle continues.
Advanced Features and Extensions
LinkedIn integration: Some users add a script that fetches LinkedIn profile URLs for new contacts. Store in the contact file. When preparing for a meeting, the agent can surface "Jane's LinkedIn shows she recently posted about sustainability" — useful for small talk.
Deal pipeline: Add a "Stage" field: lead, contacted, meeting, proposal, negotiation, closed. Filter by stage for pipeline views. "Who's in proposal stage?"
Multi-account: Run separate CONTACTS/ directories for work vs. personal. Or use a single directory with a "Context" field. The agent can filter: "Work contacts I need to follow up with."
See Google Workspace for broader integration options and memory system for storage architecture.
Wrapping Up
The Personal CRM use case demonstrates OpenClaw's strength: turning unstructured communication data into actionable, queryable knowledge. No enterprise software required — just an agent that reads your email and calendar, maintains a contact database, and answers your questions. For professionals who live in Gmail and Calendar, it's a game-changer. See Google Workspace and memory system for integration details.