gmail

Search and fetch Gmail messages via Gmail API for Markdown or JSON export.

345|52|Updated Oct 25, 2025
One-click install
npx skills add https://github.com/glebis/claude-skills --skill gmail-glebis
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: gmail
Source: https://github.com/glebis/claude-skills/tree/main/gmail
Command: npx skills add https://github.com/glebis/claude-skills --skill gmail-glebis

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires google-api-python-client, google-auth-httplib2, google-auth-oauthlib, and includes scripts (resource) components.

What problem does it solve?

Gmail users waste time locating messages; this skill provides programmatic search, retrieval, and attachment support via Gmail API to streamline inbox management.

Core Features & Use Cases

  • Free-text search with Gmail query syntax
  • Filter by sender, recipient, subject, label, and date
  • Download attachments and list available labels
  • Output results as Markdown or JSON
  • Supports configurable OAuth scopes for safe access

Quick Start

Authenticate with Gmail and run a sample search to fetch matching emails, then export results as Markdown or JSON.

Frequently Asked Questions about gmail

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I search and fetch Gmail messages using the Gmail API with Python?

Gmail API message search and retrieval requires OAuth credentials stored in your home directory to authenticate, then allows you to query emails by sender, subject, label, and date range for Markdown or JSON export.

Do I need OAuth credentials to access the Gmail API for retrieving emails?

Yes, you need OAuth credentials stored in your home directory to authenticate Gmail API requests, with support for configurable scopes including readonly, modify, and full access levels.

Can I download email attachments and list labels using the Gmail API in Python?

Yes, the Gmail API supports downloading email attachments and listing available labels using the google-api-python-client, google-auth-httplib2, and google-auth-oauthlib dependencies installed via pip.

What's the best way to filter Gmail messages by sender, subject, and date range programmatically?

Filtering Gmail messages programmatically is best achieved using Gmail query syntax to search by specific senders, recipients, subjects, labels, and date ranges through the Gmail API.

How do I export fetched Gmail messages as Markdown or JSON?

Export fetched Gmail messages as Markdown or JSON by running a search query through the Gmail API and formatting the retrieved email results into your chosen output structure.