Send, receive, and manage emails with labels, search, and attachment handling
Gmail allows you to manage email communications programmatically. You can send emails with custom content, retrieve and read specific emails, search messages by various criteria including date ranges, manage email labels for organization, handle attachments properly, and modify message properties. This integration is perfect for email automation, inbox management, and communication workflows.
Required:
action
- The operation to perform with GmailSend a new email message
Parameters:
to
(required) - Email address of the recipientsubject
(required) - Subject of the emailbody
(required) - Content of the emailfrom
(optional) - Sender email (defaults to authenticated user)Example:
Response:
Retrieve a specific email by ID
Parameters:
message-id
(required) - The ID of the email messageExample:
Response:
Search for emails using Gmail search syntax
Parameters:
query
(required) - Search query using Gmail search operatorslabel
(optional) - Filter by specific labelfrom-date
(optional) - Start date for search (Unix timestamp)to-date
(optional) - End date for search (Unix timestamp)Example:
Response:
Get all labels in the Gmail account
Parameters:
Example:
Response:
Add a label to an email message
Parameters:
message-id
(required) - The ID of the email messagelabel-name
(required) - Name of the label to addExample:
Response:
Remove a label from an email message
Parameters:
message-id
(required) - The ID of the email messagelabel-name
(required) - Name of the label to removeExample:
Response:
Move an email to a different label/folder
Parameters:
message-id
(required) - The ID of the email messageto-label
(required) - Destination label namefrom-label
(optional) - Label to remove (often INBOX)Example:
Response:
Download and save email attachments
Parameters:
message-id
(required) - The ID of the email with attachmentssave-location
(optional) - Where to save attachmentsExample:
Response:
Email content is base64 encoded when sending. The ‘me’ keyword represents the authenticated user and should only be used for the sender, never the recipient. Date searches use Unix timestamps in seconds. Label searches are case-insensitive. Binary attachments (pdf, images, office files) must be handled with proper file type detection to avoid corruption. Gmail search operators like “from:”, “to:”, “subject:”, “has:attachment” can be used in search queries.