Give agents tools for secure, real-time access to fetch, search, write, and sync across every system, with replication, entity mapping, and auth built-in.


About this Connector
Gmail is Google's email service that provides email sending, receiving, and organization capabilities. This connector provides access to messages, threads, labels, drafts, and user profile information.
CRM
Sales Analytics
Customer Data
Version Information
Package version
0.1.7
Connector version
0.1.2
SDK commit
cb4380e76ac5cbc67b9089f94522be1bbe9f8d73
Support Open Source
Check us out on Github and join the Airbyte community
Installation & Usage
1
Install Package
Using uv or pip
bash
uv pip install airbyte-agent-gmail
2
Import
Initialize and use
python
from airbyte_agent_gmail import GmailConnector
from airbyte_agent_gmail.models import GmailAuthConfig
connector = GmailConnector(
auth_config=GmailAuthConfig(
access_token="<Your Google OAuth2 Access Token (optional, will be obtained via refresh)>",
refresh_token="<Your Google OAuth2 Refresh Token>",
client_id="<Your Google OAuth2 Client ID>",
client_secret="<Your Google OAuth2 Client Secret>"
)
)3
Tool
Add tools to your agent
python
@agent.tool_plain # assumes you're using Pydantic AI
@GmailConnector.tool_utils
async def gmail_execute(entity: str, action: str, params: dict | None = None):
return await connector.execute(entity, action, params or {})Supported Entities & Actions
Lorem ipsum
Lorem ipsum
| Entity | Actions |\n|--------|---------|\n| Profile | [Get](./REFERENCE.md#profile-get) |\n| Messages | [List](./REFERENCE.md#messages-list), [Get](./REFERENCE.md#messages-get), [Create](./REFERENCE.md#messages-create), [Update](./REFERENCE.md#messages-update) |\n| Labels | [List](./REFERENCE.md#labels-list), [Create](./REFERENCE.md#labels-create), [Get](./REFERENCE.md#labels-get), [Update](./REFERENCE.md#labels-update), [Delete](./REFERENCE.md#labels-delete) |\n| Drafts | [List](./REFERENCE.md#drafts-list), [Create](./REFERENCE.md#drafts-create), [Get](./REFERENCE.md#drafts-get), [Update](./REFERENCE.md#drafts-update), [Delete](./REFERENCE.md#drafts-delete) |\n| Drafts Send | [Create](./REFERENCE.md#drafts-send-create) |\n| Threads | [List](./REFERENCE.md#threads-list), [Get](./REFERENCE.md#threads-get) |\n| Messages Trash | [Create](./REFERENCE.md#messages-trash-create) |\n| Messages Untrash | [Create](./REFERENCE.md#messages-untrash-create) |
Example Prompts
Lorem ipsum
List my recent emails - Show me unread messages in my inbox - Get the details of a specific email - List all my Gmail labels - Show me details for a specific label - List my email drafts - Get the content of a specific draft - List my email threads - Show me the full thread for a conversation - Get my Gmail profile information - Send an email to someone - Create a new email draft - Archive a message by removing the INBOX label - Mark a message as read - Mark a message as unread - Move a message to trash - Create a new label - Update a label name or settings - Delete a label - Search for messages matching a query - Find emails from a specific sender - Show me emails with attachments
Why Airbyte for AI Agents?
Built for production AI workloads with enterprise-grade reliability
Agent-Native Design
Structured, LLM-friendly schemas optimized for AI agent consumption with natural language query support.
Secure Authentication
Built-in OAuth 2.0 handling with automatic token refresh. No hard-coded credentials.
Production Ready
Battle-tested connectors with comprehensive error handling, logging, and retry logic.
Open Source
Fully open source under the MIT license. Contribute, customize, and extend freely.
Works with your favorite frameworks
🦜
LangChain
🦙
LlamaIndex
🤖
CrewAI
⚡
AutoGen
🧠
OpenAI Agents SDK
🔮
Claude Agents SDK
Frequently Asked Questions
Didn't find your answer? Please don't hesitate to reach out.
The Gmail connector supports Google OAuth2 authentication. You provide an access token (optional, obtained via refresh), a refresh token, a client ID, and a client secret. Alternatively, in hosted mode, credentials are stored securely in Airbyte Cloud and you authenticate using your Airbyte client credentials.
Can I use this connector with any AI agent framework?
The connector is compatible with any Python-based AI agent framework including LangChain, LlamaIndex, CrewAI, Pydantic AI, and custom implementations.
Does this connector support write operations?
Yes, the Gmail connector supports write operations. It can send emails, create and update drafts, modify message labels (e.g., mark as read/unread, archive), move messages to or from trash, and create, update, or delete labels.
How is this different from the Airbyte data connector?
Agent connectors are specifically designed for AI agents and LLM applications. They provide natural language interfaces, optimized response formats, and seamless integration with agent frameworks, unlike traditional ETL-focused connectors.
Will there be a platform for agent connectors?
The hosted version with secure credential storage through Airbyte Cloud is already available. See the hosted usage section in the documentation for setup instructions.