Gmail integration
Google email service API for sending, receiving, and managing emails. Access messages, threads, labels, drafts, and profile information. Supports powerful Gmail search syntax, conversation threading, label management, and email composition. Perfect for building email clients, automation tools, notification systems, and email management integrations.
Say what should happen.
The workflow builds itself.
Common Gmail use cases
- draft management
- storage management
- conversation view
- filter management
- backup restoration
- compliance cleanup
- resuming composition
- inbox management
- security deletion
- mailbox monitoring
What you can do with Gmail
Each of these is one operation on one endpoint, available both as a workflow step and as a tool an AI agent can call on its own. Nothing bundles several operations into one action, so what a run did stays readable afterwards.
Most endpoints run on the free plan. A few, mainly the ones that publish on your behalf, need a paid plan.
Message, 11 operations
batch_delete_messagesBatch delete messagesPOSTPermanently deletes multiple messages at once. More efficient than individual deletions for bulk operations.batch_modify_messagesBatch modify messagesPOSTModifies labels on multiple messages at once. Efficiently mark many emails as read, archive, or apply labels.delete_messageDelete messageDELETEPermanently and immediately deletes an email message. This action cannot be undone and bypasses the trash folder entirely.get_messageGet messageGETRetrieves email with full content: From, To, Subject, Date, body, and attachments.import_messageImport messagePOSTImports an email message into the mailbox as if received via SMTP. Applies spam checking and processing.insert_messageInsert messagePOSTDirectly inserts a message into the mailbox bypassing spam filtering and standard processing.list_messagesList messagesGETLists email message IDs in the user's mailbox. Use search queries to filter results.modify_messageModify messagePOSTModifies labels on an email message. Used to mark as read/unread, star/unstar, archive, or apply custom labels for organization.send_messageSend messagePOSTSends an email message from the authenticated user's Gmail account. Provide to, subject, and body; the message is assembled and sent for you.trash_messageTrash messagePOSTMoves an email message to the trash folder. The message remains recoverable for 30 days before automatic permanent deletion.untrash_messageUntrash messagePOSTRestores an email message from the trash folder back to the inbox. Recovers accidentally deleted messages before permanent deletion.
Draft, 6 operations
create_draftCreate draftPOSTCreates a new email draft in Gmail. Saves a message for later editing and sending, appearing in the Drafts folder.delete_draftDelete draftDELETEPermanently deletes a draft email. This action cannot be undone and immediately removes the draft.get_draftGet draftGETRetrieves a specific draft email with full message content including recipients, subject, and body for editing.list_draftsList draftsGETLists all draft emails saved in the Drafts folder. Returns draft IDs and message previews for managing unsent emails.send_draftSend draftPOSTSends an existing draft email immediately. Moves the draft to Sent and delivers it to recipients.update_draftUpdate draftPUTUpdates an existing draft email with new content. Replaces the draft message while preserving the draft ID.
Thread, 6 operations
delete_threadDelete threadDELETEPermanently deletes an entire email thread. This action cannot be undone and bypasses trash.get_threadGet threadGETRetrieves a complete email thread with all messages in the conversation. Returns the full reply chain for reading entire email conversations.list_threadsList threadsGETRetrieves email conversation threads from Gmail. Groups related messages together for conversation-based email views similar to Gmail's web interface.modify_threadModify threadPOSTModifies labels on all messages in a thread. Used to mark conversations read/unread, star, or apply labels.trash_threadTrash threadPOSTMoves an entire conversation thread to trash. All messages in the thread are trashed together.untrash_threadUntrash threadPOSTRestores an entire conversation thread from trash back to the inbox.
Label, 5 operations
create_labelCreate labelPOSTCreates a new custom label (folder) in Gmail for organizing emails. Supports configuring visibility in label list and message list views.delete_labelDelete labelDELETEDeletes a custom label from the mailbox. Messages with this label are not deleted, only the label is removed.get_labelGet labelGETRetrieves details of a specific Gmail label including message counts, visibility settings, and color information for display purposes.list_labelsList labelsGETRetrieves all labels (folders) in a Gmail account including system labels like INBOX and SENT plus custom user-created labels for email organization.update_labelUpdate labelPUTUpdates a custom label's name, visibility settings, or color. System labels cannot be modified.
Filter, 3 operations
create_filterCreate filterPOSTCreates a new email filter to automatically process incoming messages based on criteria.delete_filterDelete filterDELETEDeletes an email filter, stopping its automatic processing of messages.list_filtersList filtersGETRetrieves all email filters configured in the Gmail account for automatic message processing.
Vacation, 2 operations
get_vacationGet vacationGETRetrieves vacation auto-reply settings including enabled status, message, and date range.update_vacationUpdate vacationPUTConfigures vacation auto-reply with message, date range, and recipient restrictions.
Watch, 2 operations
stopStopPOSTStops push notifications for the mailbox. Cancels the current watch subscription.watchWatchPOSTSets up Gmail push notifications via Google Cloud Pub/Sub. Receive real-time notifications when the mailbox changes.
Attachment, 1 operation
get_attachmentGet attachmentGETRetrieves an email attachment's binary data. Returns Base64url-encoded content for downloading or processing attachments.
Forwardingaddress, 1 operation
list_forwarding_addressesList forwarding addressesGETRetrieves all email forwarding addresses configured for the Gmail account.
History, 1 operation
list_historyList historyGETRetrieves mailbox changes since a specific history ID. Essential for incremental sync and real-time updates.
Profile, 1 operation
get_profileGet profileGETRetrieves the Gmail profile for the authenticated user including email address, total message count, and history ID for sync operations.
Send as alias, 1 operation
list_send_asList send asGETRetrieves all send-as email aliases configured for sending emails from different addresses.
OAuth scopes Gmail requires
Each operation declares the scopes Gmail requires for it.
https://www.googleapis.com/auth/gmail.readonlyneeded by get_attachment, get_draft, get_message and 10 morehttps://www.googleapis.com/auth/gmail.modifyneeded by batch_modify_messages, import_message, insert_message and 8 morehttps://www.googleapis.com/auth/gmail.labelsneeded by create_label, delete_label, get_label and 2 morehttps://mail.google.com/needed by batch_delete_messages, delete_message, delete_threadhttps://www.googleapis.com/auth/gmail.composeneeded by create_draft, delete_draft, update_drafthttps://www.googleapis.com/auth/gmail.settings.basicneeded by create_filter, delete_filter, update_vacationhttps://www.googleapis.com/auth/gmail.sendneeded by send_draft, send_message
Gmail API rate limits
- 100 requests per second
- 80,000,000 requests per day
Gmail uses quota units (not requests). As of 2026-05-01: 6,000 quota units per user per minute (~100 units/sec), 1,200,000 units/minute per project, and 80,000,000 units/day per project before billing. Method costs vary: labels.get=1, messages.get=5, messages.send=100, watch=100. See https://developers.google.com/gmail/api/reference/quota
These are the limits Gmail documents, not ones LiveContext measured. They can change and often depend on your plan, so check the Gmail documentation for current values.
Use Gmail from Claude Code, Cursor or Codex
Connect Gmail in LiveContext, create an API key in Settings, then add the LiveContext MCP server to your client. Its Gmail operations become tools the client can call, next to every other integration you connected.
claude mcp add --transport http livecontext https://livecontext.ai/mcp --header "X-API-Key: YOUR_API_KEY"[mcp_servers.livecontext]
url = "https://livecontext.ai/mcp"
[mcp_servers.livecontext.http_headers]
"X-API-Key" = "YOUR_API_KEY"{
"mcpServers": {
"livecontext": {
"type": "http",
"url": "https://livecontext.ai/mcp",
"headers": {
"X-API-Key": "YOUR_API_KEY"
}
}
}
}How to connect Gmail
- Create your workspace
Sign up free. Nothing to install.
- Connect Gmail once
Add your Gmail connection in Settings. Every tool from this integration reuses it, and secrets are encrypted at rest and visible only to you.
- Describe the job in chat
The workflow builds itself in front of you and picks the endpoints it needs. Drag the steps yourself on the canvas whenever you would rather be explicit.
Gmail integration FAQ
What can you do with the Gmail integration?
LiveContext exposes 40 operations on Gmail, covering message, draft, thread and label. Common uses include draft management, storage management and conversation view.
Which OAuth scopes does Gmail require?
It depends on the operation: each one declares the scopes Gmail requires for it. The most common are https://www.googleapis.com/auth/gmail.readonly (13 operations), https://www.googleapis.com/auth/gmail.modify (11 operations), https://www.googleapis.com/auth/gmail.labels (5 operations) and https://mail.google.com/ (3 operations).
What are the Gmail API rate limits?
Gmail documents 100 requests per second and 80,000,000 requests per day. Gmail uses quota units (not requests). As of 2026-05-01: 6,000 quota units per user per minute (~100 units/sec), 1,200,000 units/minute per project, and 80,000,000 units/day per project before billing. Method costs vary: labels.get=1, messages.get=5, messages.send=100, watch=100. See https://developers.google.com/gmail/api/reference/quota Limits are set by Gmail and can depend on your plan.
