Install
openclaw skills install @agentpmt/gmail-all-email-actionsGmail - All Email Actions: Gmail integration: send, read, search, reply, forward emails. Manage labels, drafts, trash. Supports attachments and custom from addresses. Use when an agent needs gmail all email actions, gmail all email actions, automated email notifications and alerts, customer inquiry response and follow up, email search and retrieval for information gathering, inbox management and organization with labels, create draft, to through AgentPMT-hosted remote tool calls.
openclaw skills install @agentpmt/gmail-all-email-actionsLast updated: 2026-06-24.
If the current date is more than 7 days after the last updated date, reinstall this skill from skills.sh or ClawHub before relying on endpoints, schemas, setup steps, or examples.
Gmail connection that enables agents to send, read, search, and manage email through Google OAuth integration. The tool provides comprehensive email functionality including composing and sending new messages with attachments, replying to emails while maintaining thread continuity, and forwarding messages to new recipients. Agents can search and filter emails using Gmail's powerful query syntax to find specific messages by sender, subject, date, labels, or attachment status. The tool supports full email lifecycle management including reading message content with parsed headers and body text, moving messages to trash or permanently deleting them, and modifying labels to organize emails or mark them as read. Draft functionality allows agents to create, retrieve, and send draft emails for workflows requiring human review before sending. Additional capabilities include listing all available labels for organization, retrieving user profile information such as email address and message counts, and sending from custom authenticated email addresses.
Complete Gmail management: send, reply, forward, search, read, trash, label, and draft emails.
Send a new email.
Required: to (array of email addresses), subject, body_text or body_html
Optional: cc, bcc, from_email (requires send-as alias configured in Gmail), body_html, attachments, thread_id
{
"action": "send_message",
"to": ["recipient@example.com"],
"subject": "Project Update",
"body_text": "Hi, here is the latest update on the project.",
"cc": ["manager@example.com"]
}
With attachment:
{
"action": "send_message",
"to": ["team@example.com"],
"subject": "Monthly Report",
"body_text": "Please find the report attached.",
"attachments": [
{
"filename": "report.pdf",
"file_url": "https://example.com/files/report.pdf",
"content_type": "application/pdf"
}
]
}
Reply to an existing email. The reply stays in the same thread and automatically uses the original subject and recipient.
Required: message_id, body_text or body_html
Optional: cc, bcc, attachments
{
"action": "reply_message",
"message_id": "18a1b2c3d4e5f6g7",
"body_text": "Thanks for the update. I'll review this by Friday."
}
Forward an email to new recipients. The original message content is included automatically.
Required: message_id, to
Optional: body_text (added above the forwarded content), cc, bcc, attachments
{
"action": "forward_message",
"message_id": "18a1b2c3d4e5f6g7",
"to": ["colleague@example.com"],
"body_text": "FYI - see the message below."
}
Search and list emails. Returns message IDs and thread IDs. Use get_message to read full content.
Required: none
Optional: q (Gmail search query), max_results (1-500, default 20), label_ids, page_token
{
"action": "list_messages",
"q": "is:unread from:boss@example.com",
"max_results": 10
}
Common search queries:
is:unread - unread messagesfrom:user@example.com - from a specific sendersubject:meeting - subject contains "meeting"has:attachment - messages with attachmentsnewer_than:7d - from the last 7 daysolder_than:30d - older than 30 daysin:sent - sent messageslabel:work - messages with a specific labelRead the full content of an email including headers, body, and attachment metadata.
Required: message_id
Optional: format - full (default, headers + body), metadata (headers only), minimal (IDs only)
{
"action": "get_message",
"message_id": "18a1b2c3d4e5f6g7",
"format": "full"
}
Move an email to the trash.
Required: message_id
{
"action": "trash_message",
"message_id": "18a1b2c3d4e5f6g7"
}
Restore an email from the trash back to its original location.
Required: message_id
{
"action": "untrash_message",
"message_id": "18a1b2c3d4e5f6g7"
}
Add or remove labels from an email. Use list_labels first to find available label IDs.
Required: message_id, at least one of add_label_ids or remove_label_ids
{
"action": "modify_labels",
"message_id": "18a1b2c3d4e5f6g7",
"add_label_ids": ["STARRED"],
"remove_label_ids": ["UNREAD"]
}
Common label IDs: INBOX, SENT, TRASH, DRAFT, SPAM, STARRED, IMPORTANT, UNREAD, CATEGORY_PERSONAL, CATEGORY_SOCIAL, CATEGORY_PROMOTIONS
Useful patterns:
remove_label_ids: ["UNREAD"]add_label_ids: ["UNREAD"]remove_label_ids: ["INBOX"]add_label_ids: ["STARRED"]Get all available labels (system and user-created).
Required: none
{
"action": "list_labels"
}
Create a draft email that can be edited or sent later.
Required: to, subject, body_text or body_html
Optional: cc, bcc, from_email, body_html, attachments, thread_id
{
"action": "create_draft",
"to": ["client@example.com"],
"subject": "Proposal Draft",
"body_html": "<h1>Proposal</h1><p>Here are the details...</p>"
}
Send a previously created draft.
Required: draft_id
{
"action": "send_draft",
"draft_id": "r123456789"
}
Retrieve the content of a draft.
Required: draft_id
Optional: format - full (default), metadata, minimal
{
"action": "get_draft",
"draft_id": "r123456789"
}
Permanently delete a draft.
Required: draft_id
{
"action": "delete_draft",
"draft_id": "r123456789"
}
Get the authenticated user's Gmail profile including email address and message counts.
Required: none
{
"action": "get_profile"
}
Check and read unread emails:
list_messages with q: "is:unread" to get message IDsget_message for each message ID to read contentmodify_labels with remove_label_ids: ["UNREAD"] to mark as readSend email with review:
create_draft to compose the emailget_draft to review contentsend_draft to send, or delete_draft to discardReply to a conversation:
list_messages with a search query to find the threadget_message to read the message you want to reply toreply_message with the message_id and your responseOrganize inbox:
list_messages to find messageslist_labels to see available labelsmodify_labels to apply labels, archive, or star messagesbody_text and body_html together. Recipients who support HTML will see the rich version; others see plain text.q parameter uses standard Gmail search operators. Combine multiple operators for precise filtering (e.g., from:alice@example.com newer_than:7d has:attachment).list_messages returns a next_page_token, pass it as page_token in the next request to get more results.from_email field only works if you have configured a send-as alias in Gmail settings.thread_id with send_message or create_draft to add a message to an existing conversation thread.Gmail - All Email Actions on AgentPMT.create_draft, delete_draft, forward_message, get_draft, get_instructions, get_message, get_profile, get_thread, list_labels, list_messages, modify_labels, reply_message, send_draft, send_message, trash_message, untrash_message.No categories or industry tags are published for this tool.
Complete generated action schema: ./schema.md.
Supported action count: 16.
x402 availability: not enabled for this product.
create_draft (action slug: create-draft): Create a draft email that can be edited or sent later. Price: 5 credits. Parameters: attachments, bcc, body_html, body_text, cc, from_email, subject, thread_id, plus 1 more.delete_draft (action slug: delete-draft): Permanently delete a Gmail draft. Price: 5 credits. Parameters: draft_id.forward_message (action slug: forward-message): Forward an email to new recipients. The source message content is included automatically. Price: 5 credits. Parameters: attachments, bcc, body_text, cc, message_id, to.get_draft (action slug: get-draft): Retrieve draft email content with safe body and metadata controls. Price: 5 credits. Parameters: body_format, draft_id, format, max_body_chars, message_format, metadata_headers.get_instructions (action slug: get-instructions): Return Gmail tool usage instructions and examples. Price: 5 credits. Parameters: none.get_message (action slug: get-message): Read a Gmail message with safe body and metadata controls. Price: 5 credits. Parameters: body_format, format, max_body_chars, message_format, message_id, metadata_headers.get_profile (action slug: get-profile): Get the authenticated Gmail profile including email address and message/thread counts. Price: 5 credits. Parameters: none.get_thread (action slug: get-thread): Read Gmail thread messages with safe body and metadata controls. Price: 5 credits. Parameters: body_format, format, include_html, max_body_chars, max_messages, message_format, metadata_headers, thread_id.list_labels (action slug: list-labels): List all available Gmail labels, including system and user-created labels. Price: 5 credits. Parameters: none.list_messages (action slug: list-messages): Search and list Gmail messages for triage. The tool requests a Gmail message page, fetches compact metadata for each listed message, then applies post-fetch date/category/label filters and optional thread dedupe. Returns messages plus result_size_estimate, next_page_token, fetched_count, and returned_count; returned_count can be lower than fetched_count. Price: 5 credits. Parameters: dedupe_by_thread, exclude_categories, exclude_label_ids, include_spam_trash, label_ids, max_internal_date_ms, max_results, min_internal_date_ms, plus 2 more.modify_labels (action slug: modify-labels): Add or remove labels from an email. Common uses: mark as read, star, or archive. Price: 5 credits. Parameters: add_label_ids, message_id, remove_label_ids.reply_message (action slug: reply-message): Reply to an existing email. The reply stays in the same thread and automatically uses the original subject and recipient context. Price: 5 credits. Parameters: attachments, bcc, body_html, body_text, cc, message_id.send_draft (action slug: send-draft): Send a previously created Gmail draft. Price: 5 credits. Parameters: draft_id.send_message (action slug: send-message): Send a new email. Supports plain text, HTML, attachments, CC/BCC, custom from address, and optional thread continuation. Price: 5 credits. Parameters: attachments, bcc, body_html, body_text, cc, from_email, subject, thread_id, plus 1 more.trash_message (action slug: trash-message): Move an email message to trash. Price: 5 credits. Parameters: message_id.untrash_message (action slug: untrash-message): Restore an email message from trash. Price: 5 credits. Parameters: message_id.Use the compact schema above for ordinary calls. Before a new production integration, or whenever parameters, enum values, nested objects, outputs, or examples are unclear, fetch live details first.
agentpmt-tool-search-and-execution with action: "get_schema", and tool_id: "gmail-all-email-actions".agentpmt-tool-search-and-execution with action: "get_instructions" and tool_id: "gmail-all-email-actions", or call this product with action: "get_instructions" when the product tool is already selected.MCP schema lookup through the main AgentPMT MCP server:
{
"method": "tools/call",
"params": {
"name": "AgentPMT-Tool-Search-and-Execution",
"arguments": {
"action": "get_schema",
"tool_id": "gmail-all-email-actions"
}
}
}
For live examples, keep the same MCP tool and use these arguments:
{
"action": "get_instructions",
"tool_id": "gmail-all-email-actions"
}
Authenticated AgentPMT REST schema lookup body:
{
"name": "agentpmt-tool-search-and-execution",
"parameters": {
"action": "get_schema",
"tool_id": "gmail-all-email-actions"
}
}
Authenticated AgentPMT REST live examples body:
{
"name": "agentpmt-tool-search-and-execution",
"parameters": {
"action": "get_instructions",
"tool_id": "gmail-all-email-actions"
}
}
Product slug: gmail-all-email-actions
Marketplace page: https://www.agentpmt.com/marketplace/gmail-all-email-actions
../agentpmt-account-mcp-rest-api-setup to connect the main MCP server or REST API for an Agent Group where this tool is enabled.../what-is-agentpmt for marketplace, Agent Group, workflow, MCP, REST, and payment concepts.If those setup skills are not installed beside this product skill, use the downloads below.
Core AgentPMT setup skills:
openclaw skills install what-is-agentpmtnpx skills add AgentPMT/agent-skills --skill what-is-agentpmtopenclaw skills install agentpmt-account-mcp-rest-api-setupnpx skills add AgentPMT/agent-skills --skill agentpmt-account-mcp-rest-api-setupskills.sh install script:
npx skills add AgentPMT/agent-skills --skill what-is-agentpmt
npx skills add AgentPMT/agent-skills --skill agentpmt-account-mcp-rest-api-setup
MCP call shape after the main AgentPMT MCP server is connected:
{
"method": "tools/call",
"params": {
"name": "Gmail---All-Email-Actions",
"arguments": {
"action": "create_draft",
"attachments": [
{
"content_type": "application/octet-stream",
"file_url": "https://example.com",
"filename": "example filename"
}
],
"bcc": [
"example bcc"
],
"body_html": "example body html",
"body_text": "example body text",
"cc": [
"example cc"
],
"from_email": "user@example.com",
"subject": "example subject",
"thread_id": "example thread id"
}
}
}
Use the exact tool name returned by tools/list; the name above is the expected readable form.
Authenticated AgentPMT REST call body:
{
"name": "gmail-all-email-actions",
"parameters": {
"action": "create_draft",
"attachments": [
{
"content_type": "application/octet-stream",
"file_url": "https://example.com",
"filename": "example filename"
}
],
"bcc": [
"example bcc"
],
"body_html": "example body html",
"body_text": "example body text",
"cc": [
"example cc"
],
"from_email": "user@example.com",
"subject": "example subject",
"thread_id": "example thread id"
}
}
Use the setup skill for the account connection details before making REST calls.
passed or success-style boolean, use it as the workflow gate.get_schema or get_instructions before retrying.create_draft fails, preserve the request parameters and retry only after fixing schema, auth, or payment errors.what-is-agentpmt, page: https://clawhub.ai/agentpmt/what-is-agentpmt; skills.sh: npx skills add AgentPMT/agent-skills --skill what-is-agentpmt)agentpmt-account-mcp-rest-api-setup, page: https://clawhub.ai/agentpmt/agentpmt-account-mcp-rest-api-setup; skills.sh: npx skills add AgentPMT/agent-skills --skill agentpmt-account-mcp-rest-api-setup)