gmail

Search and read Gmail inbox messages and create drafts via the Gmail API.

Updated May 3, 2026
One-click install
npx skills add https://github.com/spikelab/multiplai-cc-mktplace --skill gmail-spikelab
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: gmail
Source: https://github.com/spikelab/multiplai-cc-mktplace/tree/main/plugins/multiplai-messaging/skills/gmail
Command: npx skills add https://github.com/spikelab/multiplai-cc-mktplace --skill gmail-spikelab

SYSTEM DOCUMENTATION & REQUIREMENTS

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

What problem does it solve? It lets an AI assistant check your Gmail inbox, read specific messages, and prepare email drafts on your behalf, while guaranteeing it can never send mail or reach anything outside the inbox. ## Core Features & Use Cases - Inbox Search: Query the inbox with Gmail search syntax (from:, subject:, is:unread, newer_than:) and get headers plus snippets for candidate messages. - Message Reading: Pull the full plain-text body of one inbox message, delivered inside untrusted-content fences to defend against prompt injection. - Draft Creation: Compose a new email or a properly threaded reply (threadId, In-Reply-To, References) as a Gmail draft that you review and send manually. - Use Case: Ask the assistant to find the latest email from a client about a contract, read the thread, and draft a reply — the draft lands in Gmail's Drafts folder unsent, ready for your review. ## Quick Start Ask the assistant to search your inbox for unread messages from a specific sender and draft a reply to the most recent one.

Frequently Asked Questions about gmail

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

FAQPage Schema
How do I search my Gmail inbox from the command line?

Run the gmail.py script with the search verb and a Gmail query such as "from:marco subject:contract newer_than:14d". It returns matching inbox messages with id, date, sender, subject, and snippet, which you can then read individually by id.

Can this Gmail skill send emails automatically?

No. The script contains no send code path; its only write operation is drafts.create, so every email lands in Gmail's Drafts folder unsent. You must review and send drafts manually from Gmail.

What OAuth scopes and credentials does the Gmail API script need?

It needs exactly gmail.compose and gmail.readonly, provided as three env vars: GMAIL_CLIENT_ID, GMAIL_CLIENT_SECRET, and GMAIL_REFRESH_TOKEN. On startup it verifies the granted scopes via Google's tokeninfo endpoint and aborts if anything beyond those two is present.

Can the script read archived, sent, or spam Gmail messages?

No. Every query hard-codes labelIds=['INBOX'], and read or reply requests are rejected unless the message actually carries the INBOX label. Archive, sent, spam, trash, and all-mail are unreachable through this script.

Why does Gmail drafting fail with a 401 after about a week?

In Google Cloud Testing mode, refresh tokens can expire after 7 days for some consent-screen configurations. Re-run get_token.py on the host machine to mint a fresh refresh token and update the env vars.