AgentPMT - The Agentic Economy

Gmail - All Email Actions

Communications
$0.05/requestMin Purchase: 40Min Purchase Price: $2

Details

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.

Use Cases

Automated email notifications and alerts, Customer inquiry response and follow-up, Email search and retrieval for information gathering, Inbox management and organization with labels, Draft creation for human-in-the-loop email workflows, Email forwarding and delegation workflows, Reading and summarizing email content, Marking messages as read or starring important emails, Sending reports and documents as attachments, Monitoring inbox for specific senders or keywords

Credentials

Google OAuth *
Connect your Google account.
oauth token

Manage credentials in your dashboard.

Parameters

(required properties listed first)

action*required
Type:string
Description:Action to perform. Use get_instructions for documentation. Core actions: send_message (send new email), reply_message (reply to email), forward_message (forward email), list_messages (search/list emails), get_message (read email), trash_message (move to trash), modify_labels (add/remove labels), list_labels (get all labels), create_draft (create draft), send_draft (send draft), get_profile (get user info)
Allowed values:
get_instructionssend_messagereply_messageforward_messagelist_messagesget_messagetrash_messageuntrash_messagemodify_labelslist_labelscreate_draftsend_draftget_draftdelete_draftget_profile
to
Type:array
Description:Recipient email addresses. Required for: send_message, forward_message, create_draft
Array items:string
subject
Type:string
Description:Email subject line. Required for: send_message, create_draft
from_email
Type:string
Description:From address to override the default sender (optional). Only works if you have configured send-as alias in Gmail settings.
body_text
Type:string
Description:Plain text email body. Required for: send_message, reply_message, create_draft (unless body_html provided)
body_html
Type:string
Description:HTML email body. Can be used instead of or in addition to body_text
cc
Type:array
Description:CC recipients
Array items:string
bcc
Type:array
Description:BCC recipients
Array items:string
message_id
Type:string
Description:Gmail message ID. Required for: reply_message, forward_message, get_message, trash_message, untrash_message, modify_labels
draft_id
Type:string
Description:Gmail draft ID. Required for: send_draft, get_draft, delete_draft
thread_id
Type:string
Description:Thread ID to continue an email thread
q
Type:string
Description:Gmail search query for list_messages. Examples: is:unread, from:user@example.com, subject:meeting, has:attachment, newer_than:7d
max_results
Type:integer
Description:Maximum results for list_messages (1-500)
Default:20
Minimum:1
Maximum:500
page_token
Type:string
Description:Pagination token from previous list_messages response
label_ids
Type:array
Description:Filter list_messages by these label IDs
Array items:string
add_label_ids
Type:array
Description:Label IDs to add for modify_labels action. Common: STARRED, IMPORTANT, UNREAD
Array items:string
remove_label_ids
Type:array
Description:Label IDs to remove for modify_labels action. Common: UNREAD (mark as read), INBOX (archive)
Array items:string
format
Type:string
Description:Message format for get_message: full (default, headers+body), metadata (headers only), minimal (IDs only)
Default:full
Allowed values:
fullmetadataminimal
attachments
Type:array
Description:Email attachments for send_message/create_draft. Provide public file URLs that will be fetched and attached.
Array items:object

API Example

curl -X POST "https://api.agentpmt.com/products/purchase" \
  -H "Content-Type: application/json" \
  -H "X-API-Key: your-api-key-here" \
  -H "X-Budget-Key: your-budget-key-here" \
  -d '{
    "product_id": "69618e485d4cf4d4b6af40f0",
    "parameters": {
      "action": "get_instructions",
      "max_results": 20,
      "format": "full"
    }
  }'

Login to view your API and budget keys. The example above uses placeholder values. Sign in to see personalized code with your actual credentials.

About The Developer

Apoth3osis logo

Apoth3osis

13 stars

Joined Agent Payment: August 14, 2025

We build tools that enable AI agents to excel in the mathematical realm.

Our small team develops experimental and unique solutions in the AI arena, with a strong focus on modular computing for agentic applications and custom model deployment. We have handled projects for a variety of applications across many sectors, from algorithmic trading and financial analysis, to molecular simulations and predictions, to habitat and biodiversity monitoring and wildlife conservation.