📧 Gmail Hub
Kommunikation · Automatisierungsassistent · E-Mail
Turn the world's largest email network into your AI agent's mailroom! Zero-friction integration between your internal LLM and external collaborators, granting it powerful autonomous capabilities to read, draft, and even auto-reply to correspondence.
OpenClaw Team
🚀 Schnellinstallation
Führen Sie den folgenden Befehl in Ihrem Terminal aus, um zu installieren:
npx clawhub install gmail
📊 Statistikübersicht
| ⭐ Sterne | ☁️ Gesamtaufrufe | 👥 Aktive Nutzer | 🎯 Stabile Version |
|---|---|---|---|
| 890 | 234k | 3,210 | v1.6.0 |
🎛️ So funktioniert es
After connecting to the official Gmail API, we've rewritten it into a toolkit perfectly suited for LLM parsing logic:
- 📨 Bi-directional Email Read/Write Pipeline: Not only can it leverage the LLM's excellent writing skills for outbound delivery, but it also monitors specific inbox unread states. The Agent can read lengthy incoming emails and summarize them into a single sentence for your terminal.
- 🧠 Intent-aware Auto-archiving & Drafts: Supports creating pending drafts rather than just sending immediately. When handling important replies involving finances or business, the bot can leave traces in Drafts, waiting for human confirmation via mobile.
- 🧹 Dehydrated MIME Parsing: Raw email source code is often filled with massive Base64 signatures, table styles, and invisible characters. This module includes a powerful sanitizer that strips everything clean, delivering only semantically rich plain text to the LLM — dramatically saving precious token budget.
- 🔐 Multi-layer OAuth2 Authentication & Privacy Compliance: Uses Google's highest-standard User-Consent authorization pipeline, ensuring runtime credentials are protected at the hardware level.
🧭 Typische Anwendungsfälle
💼 Szenario 1: T+0 Business Inquiry Auto-reply Pipeline
When external clients send product pricing inquiries via your website contact. Your agent can capture the email within 10 seconds, read the context to find the corresponding SKU pricing database, then draft a polite reply with detailed price tables — it can even auto cc your Sales Director.
🗑️ Szenario 2: Daily Marketing Spam Cleanup
If you're drowning in promotional emails, let AI help you "clear the noise" every morning at 8 AM. It batch-fetches your INBOX, uses its powerful semantic understanding to distinguish "ads" from "real human emails," then directly moves useless promotions to Trash and marks them as read.
💻 Befehlsreferenz
Nach der Installation können Sie die KI diese autonom über Konversation aufrufen lassen oder Operationen manuell über die CLI auslösen:
Auto-fetch the top 5 unread emails from inbox with key topic summaries:
clawhub execute gmail action="read" \
query="is:unread in:inbox" max-results=5 \
intent="Summarize the core topics for me"
Have the LLM draft a polite investment decline letter based on your thinking:
clawhub execute gmail action="draft" \
to="[email protected]" \
intent="Politely decline their 1M funding offer but keep in touch for next round"
Send targeted notifications directly (can be combined with monitoring tools):
clawhub execute gmail action="send" \
to="[email protected]" subject="Daily Server Report" \
body="$(cat report.txt)"
🛡️ Voraussetzungen & Authentifizierung
- 🔑 Credential Setup: First-time use requires a browser redirect in your local terminal. After running
npx clawhub install gmail, the console generates an OAuth link — log in with your Google account and grant full read/write access tohttps://mail.google.com/. - 🔒 Encrypted Credential Cache: The generated
token.jsonis stored in your machine's~/.clawhub/credentialsdirectory. Never push this file to any public repository.
🔗 Quellcode auf GitHub ansehen
© 2026 OpenClaw. All rights reserved.
