Gmail Integration
Give your agents the ability to read, search, send, and manage emails through Gmail. Build agents that handle email triage, send follow-ups, draft responses, and automate email workflows.Connecting Gmail
Step 1: Start the OAuth Flow
- Navigate to Agents and select your agent.
- Go to the Tools section and click Add Tool.
- Select Gmail.
- Click Connect Google Account.
Step 2: Authorize Access
- Sign in with the Gmail account you want the agent to use.
- Review the permissions:
- Read your email — search and read messages
- Send email on your behalf — compose and send messages
- Manage labels — organize emails
- Manage drafts — create and edit drafts
- Click Allow.
Step 3: Configure the Tool
| Setting | Description |
|---|---|
| Allowed Actions | Select which email actions the agent can perform |
| Send Restrictions | Optionally restrict which domains the agent can email |
| Signature | Default email signature to append to outgoing messages |
Available Actions
| Action | Description |
|---|---|
| Read Email | Open and read the content of a specific email |
| Search Emails | Search the inbox using Gmail search syntax (from, subject, date, labels) |
| Send Email | Compose and send a new email with subject, body, recipients, and attachments |
| Reply to Email | Send a reply to an existing email thread |
| Create Draft | Save an email as a draft for review before sending |
| Manage Labels | Add or remove labels on emails |
| List Emails | Retrieve recent emails from inbox, sent, or specific labels |
Email Automation Use Cases
Inbox Triage
Have an agent monitor and categorize incoming emails:Auto-Responder
Set up automatic responses for common inquiries:Follow-Up Sequences
Automate follow-up emails after key events:Example: Email Assistant Agent
Build an agent that manages your email workflow.Agent Setup
| Field | Value |
|---|---|
| Name | Email Assistant |
| Model | GPT-4o |
| Tools | Gmail |
Agent Instructions
Sample Conversation
Gmail Search Syntax
Your agent can use Gmail’s powerful search syntax:| Search | Example | Description |
|---|---|---|
| From | from:sarah@company.com | Emails from a specific sender |
| Subject | subject:invoice | Emails with a keyword in the subject |
| Date range | after:2026/03/01 before:2026/03/07 | Emails within a date range |
| Has attachment | has:attachment | Emails with attachments |
| Label | label:important | Emails with a specific label |
| Unread | is:unread | Unread emails only |
| Combined | from:client.com is:unread has:attachment | Multiple conditions |
Combining with Other Tools
Gmail works great alongside other tools:| Combination | Use Case |
|---|---|
| Gmail + Google Calendar | Send calendar invites after booking appointments |
| Gmail + Google Sheets | Log email data into a tracking spreadsheet |
| Gmail + SMS | Send an SMS notification when an urgent email arrives |
| Gmail + Knowledge Base | Draft responses using information from your docs |
| Gmail + CRM Webhook | Update your CRM when replying to leads |
Security Considerations
- OAuth tokens are encrypted and stored securely. thinnestAI never has access to your Google password.
- Revoke access at any time from your Google Account Security page.
- Send restrictions — Limit which domains the agent can email to prevent accidental sends.
- Draft mode — Configure the agent to always save as draft instead of sending directly, giving you a review step.
Troubleshooting
| Issue | Solution |
|---|---|
| ”Not authorized” error | Re-connect your Google account. OAuth tokens expire after extended periods. |
| Can’t send emails | Ensure “Send Email” is in the agent’s Allowed Actions. Check send restrictions if configured. |
| Search returns no results | Verify the search query. Try broadening the date range or simplifying terms. |
| Emails going to spam | If recipients report your agent’s emails as spam, verify your sending domain’s SPF/DKIM records. |
Next Steps
- Google Calendar — Pair email with scheduling for complete workflow automation.
- Google Sheets — Log email data into spreadsheets.
- SMS — Add text messaging to your communication toolkit.

