Gmail

Gmail

Send, receive, and manage emails with Gmail

40 tools
2 triggers

Tools

Name
list_messages

List email messages in the mailbox

get_message

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_email

Send an email message

reply_to_email

Send a reply to an existing email thread

forward_email

Forward an email to another recipient, preserving all attachments. Handles base64 encoding conversion automatically so attachments are never corrupted.

modify_labels

Add and/or remove Gmail labels from one email message in a single call.

batch_modify_messages

Add and/or remove labels from multiple Gmail messages in one efficient API call.

batch_delete_messages

Permanently delete multiple Gmail messages. This bypasses Trash and cannot be undone.

trash_message

Move an email message to Gmail Trash.

untrash_message

Restore an email message from Gmail Trash.

delete_message

Permanently delete a Gmail message. This bypasses Trash and cannot be undone.

get_attachment

Retrieve a Gmail attachment by message ID and attachment ID.

list_threads

List Gmail conversation threads with optional search and label filtering.

get_thread

Get a Gmail thread and its messages.

modify_thread_labels

Add and/or remove labels from all messages in a Gmail thread.

trash_thread

Move a Gmail thread to Trash.

untrash_thread

Restore a Gmail thread from Trash.

delete_thread

Permanently delete a Gmail thread and all its messages. This cannot be undone.

add_label

Add a label to an email message. Select from available labels in the dropdown.

remove_label

Remove a label from an email message. Select from available labels in the dropdown.

list_labels

List all labels in the Gmail account

create_label

Create a new Gmail label.

get_label

Get details for a Gmail label.

patch_label

Patch selected properties of a user-created Gmail label.

update_label

Update a Gmail label resource.

delete_label

Permanently delete a user-created Gmail label from the account.

create_draft

Create a Gmail email draft.

list_drafts

List Gmail drafts in the mailbox.

get_draft

Get a Gmail draft by ID.

update_draft

Replace an existing Gmail draft with new message content.

send_draft

Send an existing Gmail draft as-is.

delete_draft

Permanently delete a Gmail draft.

get_profile

Get Gmail profile information for the authenticated user.

list_history

List Gmail mailbox change history since a known start history ID.

list_send_as_aliases

List Gmail send-as aliases for this account.

get_send_as_alias

Get a specific Gmail send-as alias configuration.

get_contacts

List Google contacts for the same authenticated Google account using the People API.

get_people

Get one People API person resource, or list Other Contacts for this Google account.

search_people

Search Google contacts by name, nickname, email, phone, or organization using the People API.

custom_api_call

Make a custom API call to the Gmail API

Triggers

Name
new_email

Triggers when a new email is received

email_labeled

Triggers when a label is added to an email

Quick Start

TypeScript
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.