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.
Each badge shows the default agent permission of an endpoint (allowed: an agent calls it without asking; ask first: you are asked before an agent calls it, when the agent or chat asks permission for sensitive actions; never: no agent may call it), which every user can change endpoint by endpoint in their credential settings.
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 messagesPOSTAgents: ask firstPermanently deletes multiple messages at once. More efficient than individual deletions for bulk operations.batch_modify_messagesBatch modify messagesPOSTAgents: ask firstModifies labels on multiple messages at once. Efficiently mark many emails as read, archive, or apply labels.delete_messageDelete messageDELETEAgents: ask firstPermanently and immediately deletes an email message. This action cannot be undone and bypasses the trash folder entirely.get_messageGet messageGETAgents: ask firstRetrieves email with full content: From, To, Subject, Date, body, and attachments.import_messageImport messagePOSTAgents: ask firstImports an email message into the mailbox as if received via SMTP. Applies spam checking and processing.insert_messageInsert messagePOSTAgents: ask firstDirectly inserts a message into the mailbox bypassing spam filtering and standard processing.list_messagesList messagesGETAgents: ask firstLists email message IDs in the user's mailbox. Use search queries to filter results.modify_messageModify messagePOSTAgents: ask firstModifies labels on an email message. Used to mark as read/unread, star/unstar, archive, or apply custom labels for organization.send_messageSend messagePOSTAgents: ask firstSends 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 messagePOSTAgents: ask firstMoves an email message to the trash folder. The message remains recoverable for 30 days before automatic permanent deletion.untrash_messageUntrash messagePOSTAgents: ask firstRestores an email message from the trash folder back to the inbox. Recovers accidentally deleted messages before permanent deletion.
Draft, 6 operations
create_draftCreate draftPOSTAgents: ask firstCreates a new email draft in Gmail. Saves a message for later editing and sending, appearing in the Drafts folder.delete_draftDelete draftDELETEAgents: ask firstPermanently deletes a draft email. This action cannot be undone and immediately removes the draft.get_draftGet draftGETAgents: ask firstRetrieves a specific draft email with full message content including recipients, subject, and body for editing.list_draftsList draftsGETAgents: ask firstLists all draft emails saved in the Drafts folder. Returns draft IDs and message previews for managing unsent emails.send_draftSend draftPOSTAgents: ask firstSends an existing draft email immediately. Moves the draft to Sent and delivers it to recipients.update_draftUpdate draftPUTAgents: ask firstUpdates an existing draft email with new content. Replaces the draft message while preserving the draft ID.
Thread, 6 operations
delete_threadDelete threadDELETEAgents: ask firstPermanently deletes an entire email thread. This action cannot be undone and bypasses trash.get_threadGet threadGETAgents: ask firstRetrieves a complete email thread with all messages in the conversation. Returns the full reply chain for reading entire email conversations.list_threadsList threadsGETAgents: ask firstRetrieves email conversation threads from Gmail. Groups related messages together for conversation-based email views similar to Gmail's web interface.modify_threadModify threadPOSTAgents: ask firstModifies labels on all messages in a thread. Used to mark conversations read/unread, star, or apply labels.trash_threadTrash threadPOSTAgents: ask firstMoves an entire conversation thread to trash. All messages in the thread are trashed together.untrash_threadUntrash threadPOSTAgents: ask firstRestores an entire conversation thread from trash back to the inbox.
Label, 5 operations
create_labelCreate labelPOSTAgents: ask firstCreates a new custom label (folder) in Gmail for organizing emails. Supports configuring visibility in label list and message list views.delete_labelDelete labelDELETEAgents: ask firstDeletes a custom label from the mailbox. Messages with this label are not deleted, only the label is removed.get_labelGet labelGETAgents: ask firstRetrieves details of a specific Gmail label including message counts, visibility settings, and color information for display purposes.list_labelsList labelsGETAgents: ask firstRetrieves all labels (folders) in a Gmail account including system labels like INBOX and SENT plus custom user-created labels for email organization.update_labelUpdate labelPUTAgents: ask firstUpdates a custom label's name, visibility settings, or color. System labels cannot be modified.
Filter, 3 operations
create_filterCreate filterPOSTAgents: ask firstCreates a new email filter to automatically process incoming messages based on criteria.delete_filterDelete filterDELETEAgents: ask firstDeletes an email filter, stopping its automatic processing of messages.list_filtersList filtersGETAgents: ask firstRetrieves all email filters configured in the Gmail account for automatic message processing.
Vacation, 2 operations
get_vacationGet vacationGETAgents: ask firstRetrieves vacation auto-reply settings including enabled status, message, and date range.update_vacationUpdate vacationPUTAgents: ask firstConfigures vacation auto-reply with message, date range, and recipient restrictions.
Watch, 2 operations
stopStopPOSTAgents: ask firstStops push notifications for the mailbox. Cancels the current watch subscription.watchWatchPOSTAgents: ask firstSets up Gmail push notifications via Google Cloud Pub/Sub. Receive real-time notifications when the mailbox changes.
Attachment, 1 operation
get_attachmentGet attachmentGETAgents: ask firstRetrieves an email attachment's binary data. Returns Base64url-encoded content for downloading or processing attachments.
Forwardingaddress, 1 operation
list_forwarding_addressesList forwarding addressesGETAgents: ask firstRetrieves all email forwarding addresses configured for the Gmail account.
History, 1 operation
list_historyList historyGETAgents: ask firstRetrieves mailbox changes since a specific history ID. Essential for incremental sync and real-time updates.
Profile, 1 operation
get_profileGet profileGETAgents: ask firstRetrieves 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 asGETAgents: ask firstRetrieves 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.
