Gmail reader

From stevehuang0115/crewly · View interactive version

Gmail reader is an AI agent skill from the GitHub repository stevehuang0115/crewly. List unread emails from a Google account's inbox. Requires a google-oauth credential bound to the 'gmail' slot with gmail.readonly scope.

How to use this skill

Skill file

Gmail Reader

Reads unread emails from a Google account's inbox. The account is selected at

execution time via the gmail credential slot, so the same skill can be used

across multiple Google accounts (e.g., work vs personal).

Usage

Run via crewly_execute_skill with credentialBindings.gmail set to the

credential UUID of the Google account to query. Optionally pass a max-results

value as the first positional argument (default 10, capped at 50).

# Direct invocation (env vars must be set by the executor)
bash execute.sh 10

Inputs

Required Env (injected by the skill executor)

Output

Plain-text summary of unread messages, one per block:

From: Someone <a@b.com>
Subject: Hello
Date: Mon, 22 Apr 2026 10:00:00 -0700
Snippet: First 120 characters of the message body...
ID: <message-id>

If there are no unread messages, prints No unread messages. and exits 0.

Errors

How the credential is resolved

Crewly's skill executor reads the credentials: frontmatter above, looks up

the credential bound to the gmail slot (either from credentialBindings or

the skill's default), refreshes the access token if needed, and injects it

as CREWLY_CRED_GMAIL_ACCESS_TOKEN before spawning this script. Raw token

values never reach the agent/LLM context — output is auto-redacted of any

injected secrets before being returned.

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.