gmail-summarize

Fetch recent unread Gmail (yesterday + today) and send a digest to the user.

3,891 stars

Best use case

gmail-summarize is best used when you need a repeatable AI agent workflow instead of a one-off prompt.

Fetch recent unread Gmail (yesterday + today) and send a digest to the user.

Teams using gmail-summarize should expect a more consistent output, faster repeated execution, less prompt rewriting.

When to use this skill

  • You want a reusable workflow that can be run more than once with consistent structure.

When not to use this skill

  • You only need a quick one-off answer and do not need a reusable workflow.
  • You cannot install or maintain the underlying files, dependencies, or repository context.

Installation

Claude Code / Cursor / Codex

$curl -o ~/.claude/skills/gmail-summarize/SKILL.md --create-dirs "https://raw.githubusercontent.com/openclaw/skills/main/skills/2p1c/gmail-summarize/SKILL.md"

Manual Installation

  1. Download SKILL.md from GitHub
  2. Place it in .claude/skills/gmail-summarize/SKILL.md inside your project
  3. Restart your AI agent — it will auto-discover the skill

How gmail-summarize Compares

Feature / Agentgmail-summarizeStandard Approach
Platform SupportNot specifiedLimited / Varies
Context Awareness High Baseline
Installation ComplexityUnknownN/A

Frequently Asked Questions

What does this skill do?

Fetch recent unread Gmail (yesterday + today) and send a digest to the user.

Where can I find the source code?

You can find the source code on GitHub using the link provided at the top of the page.

Related Guides

SKILL.md Source

# Gmail Recent Digest

## Requirements
- **Python 3** must be available in the container environment (`python` command).
- IMAP credentials must be supplied via **one** of the following methods (env vars take precedence):

### Option A — Environment variables (recommended)

| Variable | Description | Default |
|---|---|---|
| `IMAP_HOST` | IMAP server hostname | `imap.gmail.com` |
| `IMAP_PORT` | IMAP server port | `993` |
| `IMAP_USERNAME` | IMAP login username | *(required)* |
| `IMAP_PASSWORD` | IMAP login password / app-password | *(required)* |
| `IMAP_MAX_BODY_CHARS` | Max body characters per email | `2000` |

### Option B — Config file

Set `EMAIL_CONFIG_PATH` to point to a JSON file, or place the file at `~/.config/gmail-summarize/config.json`.
The file must contain **only** the fields below (no other sensitive data should be stored in this file):

```json
{
  "email": {
    "imapHost": "imap.gmail.com",
    "imapPort": 993,
    "imapUsername": "your@gmail.com",
    "imapPassword": "your-app-password",
    "maxBodyChars": 2000
  }
}
```

## Security notes
- **Preferred**: supply credentials via environment variables (`IMAP_HOST`, `IMAP_PORT`, `IMAP_USERNAME`, `IMAP_PASSWORD`) so no file on disk is read at all.
- When a config file is used, it should contain **only** the `email` fields listed above. The script reads only those four fields and nothing else from the file.
- The only external connection made is to the IMAP server declared in `IMAP_HOST` / `email.imapHost`. No other endpoints are contacted.
- Credentials are used solely to authenticate the IMAP session and are not logged or stored elsewhere by this skill.

## When to use
- User asks "check my Gmail", "summarize my emails", "邮件摘要"
- Cron trigger message contains "gmail_digest"

## Workflow
1. Run the fetch script via exec tool:
   `python {workspace}/skills/gmail-summarize/scripts/fetch_unseen.py`
   (replace {workspace} with your actual workspace root)
2. Parse the JSON array. Each item has: sender, subject, date, body
3. For each email compose one line:
   `[date] sender | subject — one-sentence body summary`
4. Send the full digest via MessageTool in this format:

   📬 **邮件摘要** (N封,覆盖 MM/DD–MM/DD)

   • [日期] 发件人 | 主题 — 一句话摘要
   • [日期] 发件人 | 主题 — 一句话摘要
   ...

5. If result is empty, send: 📭 近两日暂无未读邮件

## Output Rules
- Send the digest message ONLY. Do NOT add any extra comments, greetings, explanations, or follow-up questions before or after the digest.
- Do NOT say things like "主人,以下是您的邮件摘要" or "如需了解详情请告知" etc.
- The digest message itself is the complete and final response.
- The one-sentence body summary MUST be translated into Chinese. Sender names and subjects should keep their original text as-is.

Related Skills

📝 智能摘要助手 (Smart Summarizer)

3891
from openclaw/skills

Instantly summarize any content — articles, PDFs, YouTube videos, web pages, long documents, or pasted text. Extracts key points, action items, and insights. Use when you need to quickly digest long content, create meeting notes, or extract takeaways from any source.

Workflow & Productivity

ib-summarizer

3891
from openclaw/skills

Summarize core safety information from Investigator's Brochures for clinical researchers

Skill: Gmail Auto-Reply for Client

3891
from openclaw/skills

## Purpose

youtube-anycaption-summarizer

3891
from openclaw/skills

Turn YouTube videos into dependable markdown transcripts and polished summaries — even when caption coverage is messy. This skill works with manual closed captions (CC), auto-generated subtitles, or no usable subtitles at all by using subtitle-first extraction with local Whisper fallback. Supports private/restricted videos via cookies, batch processing, transcript cleanup, language backfill, source-language or user-selected summary language, and end-to-end completion reporting. Ideal for YouTube research, technical walkthroughs, founder content, tutorials, private/internal uploads, and batch video summarization workflows.

text-summarize

3891
from openclaw/skills

Summarize text into 3-5 bullet points using AI

summarize

3891
from openclaw/skills

Summarize URLs or files with the summarize CLI (web, PDFs, images, audio, YouTube).

research-summarizer

3891
from openclaw/skills

Structured research summarization agent skill for non-dev users. Handles academic papers, web articles, reports, and documentation. Extracts key findings, generates comparative analyses, and produces properly formatted citations. Use when: user wants to summarize a research paper, compare multiple sources, extract citations from documents, or create structured research briefs. Plugin for Claude Code, Codex, Gemini CLI, and OpenClaw.

gmail-ai

3891
from openclaw/skills

AI-enhanced Gmail — smart email triage, priority scoring, AI-generated replies, thread summarization, and automated categorization. IMAP/SMTP with OpenRouter-powered intelligence. Use for inbox zero, email management, smart replies, and email automation.

abstract-summarizer

3891
from openclaw/skills

Transform lengthy academic papers into concise, structured 250-word abstracts capturing background, methods, results, and conclusions. Optimized for research papers, theses, and technical reports across scientific disciplines.

youtube-summarizer

3891
from openclaw/skills

Automatically fetch YouTube video transcripts, generate structured summaries, and send full transcripts to messaging platforms. Detects YouTube URLs and provides metadata, key insights, and downloadable transcripts.

legal-matter-intake-summarizer

3891
from openclaw/skills

把法律相关咨询材料整理成事实、争议点、缺失材料与后续问题,不给法律结论。;use for legal, intake, case-summary workflows;do not use for 提供法律意见结论, 替代律师审查.

gmail-label-routing

3891
from openclaw/skills

Configurar en Gmail el enrutamiento por remitente hacia etiquetas usando el workflow local `scripts/gws_gmail_label_workflow.py`, incluyendo crear/usar etiqueta, crear filtro, aplicar retroactivo y opcionalmente sacar de INBOX. Usar cuando el usuario pida cosas como “manda este remitente a esta etiqueta”, “hazlo para varios remitentes”, “aplícalo a correos existentes”, “sácalos de INBOX”, o “limpia/reemplaza filtros duplicados para ese remitente”.