Agent skill

google-workspace

Connect to Gmail and Google Calendar via OAuth 2.0. Use when users want to search/read emails, create drafts, search calendar events, check availability, or schedule meetings. Triggers on queries about email, inbox, calendar, schedule, or meetings.

Stars 77
Forks 14

Install this agent skill to your Project

npx add-skill https://github.com/letta-ai/skills/tree/main/tools/google-workspace

SKILL.md

Google Workspace Integration

Gmail and Google Calendar access via shared OAuth 2.0 authentication.

Prerequisites

  1. Python 3.10+ available
  2. Google Cloud project with Gmail API and Calendar API enabled
  3. OAuth 2.0 credentials (credentials.json) downloaded
  4. Required packages: google-api-python-client, google-auth-httplib2, google-auth-oauthlib

OAuth Setup

Step 1: Create Google Cloud Project

  1. Go to https://console.cloud.google.com/
  2. Create a new project or select existing
  3. Navigate to APIs & ServicesLibrary
  4. Enable both Gmail API and Google Calendar API

Step 2: Configure OAuth Consent Screen

  1. Go to APIs & ServicesOAuth consent screen
  2. Select External user type
  3. Add scopes:
    • https://www.googleapis.com/auth/gmail.readonly
    • https://www.googleapis.com/auth/gmail.compose
    • https://www.googleapis.com/auth/gmail.modify
    • https://www.googleapis.com/auth/calendar.readonly
    • https://www.googleapis.com/auth/calendar.events
  4. Add user's email as a test user

Step 3: Create OAuth Credentials

  1. Go to APIs & ServicesCredentials
  2. Click Create CredentialsOAuth client ID
  3. Select Desktop app as application type
  4. Download JSON and rename to credentials.json

Step 4: Install Dependencies

bash
uv add google-api-python-client google-auth-httplib2 google-auth-oauthlib

Step 5: First Authentication

Run any script - it will open a browser for OAuth consent. A token.json is saved for future use.


Gmail Operations

Search Emails

bash
uv run python tools/google-workspace/scripts/search_emails.py "from:someone@example.com" --credentials ./credentials.json

Read Email Content

bash
uv run python tools/google-workspace/scripts/read_email.py <message_id> --credentials ./credentials.json

Create Draft

bash
uv run python tools/google-workspace/scripts/create_draft.py \
  --to "recipient@example.com" \
  --subject "Subject line" \
  --body "Email body" \
  --credentials ./credentials.json

Find Emails Needing Reply

bash
uv run python tools/google-workspace/scripts/needs_reply.py --credentials ./credentials.json

Calendar Operations

List Calendars

bash
uv run python tools/google-workspace/scripts/list_calendars.py --credentials ./credentials.json

Search Events

bash
# Search by text
uv run python tools/google-workspace/scripts/search_events.py "meeting" --credentials ./credentials.json

# Search by date range
uv run python tools/google-workspace/scripts/search_events.py --start "2024-01-15" --end "2024-01-20" --credentials ./credentials.json

Check Availability

bash
uv run python tools/google-workspace/scripts/find_busy.py \
  --start "2024-01-15T09:00:00" \
  --end "2024-01-15T17:00:00" \
  --credentials ./credentials.json

Create Event

bash
uv run python tools/google-workspace/scripts/create_event.py \
  --summary "Team Meeting" \
  --start "2024-01-15T10:00:00" \
  --end "2024-01-15T11:00:00" \
  --attendees "alice@example.com,bob@example.com" \
  --credentials ./credentials.json

Options: --description, --location, --timezone, --calendar


Scripts Reference

Gmail:

  • gmail_auth.py - Gmail authentication utilities
  • search_emails.py - Search inbox with Gmail query syntax
  • read_email.py - Read email content by message ID
  • create_draft.py - Create draft emails
  • needs_reply.py - Find emails awaiting response

Calendar:

  • calendar_auth.py - Calendar authentication utilities
  • list_calendars.py - List accessible calendars
  • search_events.py - Search events by text/date
  • find_busy.py - Check free/busy periods
  • create_event.py - Create calendar events

Common Workflows

Schedule a Meeting

  1. Search calendar for availability: search_events.py --start ... --end ...
  2. Create event: create_event.py --summary "..." --start ... --end ...

Reply to Important Emails

  1. Find emails needing reply: needs_reply.py
  2. Read specific email: read_email.py <id>
  3. Create draft response: create_draft.py --to ... --subject "Re: ..."

Expand your agent's capabilities with these related and highly-rated skills.

letta-ai/skills

yelp-search

Search Yelp for local businesses, get contact info, ratings, and hours. Use when finding services (cleaners, groomers, restaurants, etc.), looking up business phone numbers to text, or checking ratings before booking. Triggers on queries about finding businesses, restaurants, services, or "look up on Yelp".

77 14
Explore
letta-ai/skills

extracting-pdf-text

Extract text from PDFs for LLM consumption. Use when processing PDFs for RAG, document analysis, or text extraction. Supports API services (Mistral OCR) and local tools (PyMuPDF, pdfplumber). Handles text-based PDFs, tables, and scanned documents with OCR.

77 14
Explore
letta-ai/skills

morph-warpgrep

Integration guide for Morph's WarpGrep (fast agentic code search) and Fast Apply (10,500 tok/s code editing). Use when building coding agents that need fast, accurate code search or need to apply AI-generated edits to code efficiently. Particularly useful for large codebases, deep logic queries, bug tracing, and code path analysis.

77 14
Explore
letta-ai/skills

obsidian-cli

Work with Obsidian vaults using the official Obsidian CLI. Read, create, append, search, and manage notes, daily notes, properties, tags, tasks, sync, and more from the terminal. Use when the user mentions Obsidian, notes, vault, daily notes, or when working with markdown knowledge bases. Requires Obsidian desktop app running with CLI enabled in Settings > General.

77 14
Explore
letta-ai/skills

mcp-builder

Guide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when building MCP servers to integrate external APIs or services, whether in Python (FastMCP) or Node/TypeScript (MCP SDK).

77 14
Explore
letta-ai/skills

linear

Manage Linear issues via GraphQL API. List, filter, update, prioritize, comment, and search issues. Use when the user asks about Linear, issues, project management, or backlog.

77 14
Explore

Didn't find tool you were looking for?

Be as detailed as possible for better results