Tools
| Name | Description |
|---|---|
list_messagesList email messages in the mailbox | List email messages in the mailbox |
get_messageGet a specific email message with full content. Note: attachment data is returned in URL-safe base64 (RFC 4648 §5) — use forward_email to forward with attachments correctly. | Get a specific email message with full content. Note: attachment data is returned in URL-safe base64 (RFC 4648 §5) — use forward_email to forward with attachments correctly. |
send_emailSend an email message | Send an email message |
reply_to_emailSend a reply to an existing email thread | Send a reply to an existing email thread |
forward_emailForward an email to another recipient, preserving all attachments. Handles base64 encoding conversion automatically so attachments are never corrupted. | Forward an email to another recipient, preserving all attachments. Handles base64 encoding conversion automatically so attachments are never corrupted. |
modify_labelsAdd and/or remove Gmail labels from one email message in a single call. | Add and/or remove Gmail labels from one email message in a single call. |
batch_modify_messagesAdd and/or remove labels from multiple Gmail messages in one efficient API call. | Add and/or remove labels from multiple Gmail messages in one efficient API call. |
batch_delete_messagesPermanently delete multiple Gmail messages. This bypasses Trash and cannot be undone. | Permanently delete multiple Gmail messages. This bypasses Trash and cannot be undone. |
trash_messageMove an email message to Gmail Trash. | Move an email message to Gmail Trash. |
untrash_messageRestore an email message from Gmail Trash. | Restore an email message from Gmail Trash. |
delete_messagePermanently delete a Gmail message. This bypasses Trash and cannot be undone. | Permanently delete a Gmail message. This bypasses Trash and cannot be undone. |
get_attachmentRetrieve a Gmail attachment by message ID and attachment ID. | Retrieve a Gmail attachment by message ID and attachment ID. |
list_threadsList Gmail conversation threads with optional search and label filtering. | List Gmail conversation threads with optional search and label filtering. |
get_threadGet a Gmail thread and its messages. | Get a Gmail thread and its messages. |
modify_thread_labelsAdd and/or remove labels from all messages in a Gmail thread. | Add and/or remove labels from all messages in a Gmail thread. |
trash_threadMove a Gmail thread to Trash. | Move a Gmail thread to Trash. |
untrash_threadRestore a Gmail thread from Trash. | Restore a Gmail thread from Trash. |
delete_threadPermanently delete a Gmail thread and all its messages. This cannot be undone. | Permanently delete a Gmail thread and all its messages. This cannot be undone. |
add_labelAdd a label to an email message. Select from available labels in the dropdown. | Add a label to an email message. Select from available labels in the dropdown. |
remove_labelRemove a label from an email message. Select from available labels in the dropdown. | Remove a label from an email message. Select from available labels in the dropdown. |
list_labelsList all labels in the Gmail account | List all labels in the Gmail account |
create_labelCreate a new Gmail label. | Create a new Gmail label. |
get_labelGet details for a Gmail label. | Get details for a Gmail label. |
patch_labelPatch selected properties of a user-created Gmail label. | Patch selected properties of a user-created Gmail label. |
update_labelUpdate a Gmail label resource. | Update a Gmail label resource. |
delete_labelPermanently delete a user-created Gmail label from the account. | Permanently delete a user-created Gmail label from the account. |
create_draftCreate a Gmail email draft. | Create a Gmail email draft. |
list_draftsList Gmail drafts in the mailbox. | List Gmail drafts in the mailbox. |
get_draftGet a Gmail draft by ID. | Get a Gmail draft by ID. |
update_draftReplace an existing Gmail draft with new message content. | Replace an existing Gmail draft with new message content. |
send_draftSend an existing Gmail draft as-is. | Send an existing Gmail draft as-is. |
delete_draftPermanently delete a Gmail draft. | Permanently delete a Gmail draft. |
get_profileGet Gmail profile information for the authenticated user. | Get Gmail profile information for the authenticated user. |
list_historyList Gmail mailbox change history since a known start history ID. | List Gmail mailbox change history since a known start history ID. |
list_send_as_aliasesList Gmail send-as aliases for this account. | List Gmail send-as aliases for this account. |
get_send_as_aliasGet a specific Gmail send-as alias configuration. | Get a specific Gmail send-as alias configuration. |
get_contactsList Google contacts for the same authenticated Google account using the People API. | List Google contacts for the same authenticated Google account using the People API. |
get_peopleGet one People API person resource, or list Other Contacts for this Google account. | Get one People API person resource, or list Other Contacts for this Google account. |
search_peopleSearch Google contacts by name, nickname, email, phone, or organization using the People API. | Search Google contacts by name, nickname, email, phone, or organization using the People API. |
custom_api_callMake a custom API call to the Gmail API | Make a custom API call to the Gmail API |
Triggers
| Name | Description |
|---|---|
new_emailTriggers when a new email is received | Triggers when a new email is received |
email_labeledTriggers when a label is added to an email | Triggers when a label is added to an email |
Quick Start
import { WeavzClient } from '@weavz/sdk'
const weavz = new WeavzClient({ apiKey: 'wvz_...' })
const result = await weavz.actions.execute('gmail', 'list_messages', {
workspaceId: '550e8400-e29b-41d4-a716-446655440000',
integrationAlias: 'gmail',
input: { /* ... */ },
})Related Integrations
Works well with
Frequently Asked Questions
How do I connect Gmail to my app?
Use Weavz Hosted Connect for OAuth2 authentication. Install the SDK, create a connection through the connect portal or API, then execute tools programmatically.
What tools does Gmail support?
Gmail supports 40 tools including List Messages, Get Message, Send Email, Reply to Email, Forward Email, and more.
Can I use Gmail with AI agents?
Yes. Add Gmail to an MCP server in Tool Mode or Code Mode. Code Mode provides 3 meta-tools with on-demand API discovery so agents can compose stateful workflows without loading every action schema up front.
Can Gmail be used in stateful agent workflows?
Yes. Agents can combine Gmail tools with Filesystem, State KV, Human Gates, input partials, and other workspace integrations while keeping execution scoped to the selected workspace or end user.
What authentication does Gmail use?
Gmail uses OAuth2. Weavz stores OAuth credentials securely and refreshes tokens when supported by the provider.
How much does the Gmail integration cost?
The Gmail integration is included on all Weavz plans including the free tier with 20,000 actions per month. No credit card required.
What triggers does Gmail support?
Gmail supports 2 triggers including New Email, Email Labeled.
Connect Gmail in minutes
Get 20,000 free action executions every month. No credit card required.