
Your inbox has 37 unread messages. Google Drive contains three versions of the same proposal. A customer has just asked which version is final.
The difficult part is not writing a polite reply. It is collecting the evidence: finding the right thread, checking which document was edited last, reconciling comments, confirming figures, and only then drafting an answer that will not create a new problem.
Connecting Claude to Gmail and Google Drive can reduce that research overhead. Claude can search messages, read relevant Drive files, organize the facts, and prepare a response. High-impact actions—sending mail, changing permissions, moving files, or deleting content—should remain behind human approval.
This guide covers two routes:
- No-code route: use Claude’s native Google Workspace connectors for everyday research and drafting.
- Developer route: combine Gmail API, Drive API, and Apito to build a custom agent with your own approval rules, logs, and business integrations.
If your goal is simply to process email faster, the first half is enough. Continue to the developer section when you need CRM integration, ticketing, auditability, or repeatable automation.
1. What Claude can do with Gmail and Drive
As of August 2026, Anthropic’s Google Workspace integration covers Gmail, Google Calendar, and Google Drive. This article focuses on Gmail and Drive.
| Capability | What it can do | What to verify |
|---|---|---|
| Gmail search and reading | Find messages with natural language, read threads, and inspect attachment metadata | Attachment metadata is not the same as attachment contents |
| Gmail write actions | Draft, send, reply, forward, and manage labels or threads | Write actions should require approval; organization policy may vary |
| Drive retrieval | Search Docs and read supported Sheets, Slides, PDFs, images, and Office files | Embedded images and complex layouts may not be handled like body text |
| Drive write actions | Upload, move, share, or delete files and create folders | Sharing and deletion deserve explicit approval |
| Traceability | Show citations and link back to source messages or documents where possible | Recheck amounts, dates, recipients, attachments, and permissions |
Two distinctions prevent most implementation mistakes.
First, a connector does not hand an entire account to a model without limits. Claude can work only with the Google account and permissions you authorize, and write actions are designed to be approval-sensitive.
Second, native connectors and API development are separate routes. Connecting Gmail inside Claude does not require Apito. Apito becomes relevant when you are building your own agent and need an API model-access layer.

2. No-code setup in about five minutes
Step 1: Find the connectors in Claude
Open Claude on the web or in Claude Desktop, go to connector settings, select Gmail and Google Drive, and sign in to the Google account you want to authorize.
If you use a Team or Enterprise plan and cannot see the connectors, do not start by repeatedly signing out. The organization owner may need to enable connectors at the organization level.
Step 2: Confirm the authorized account
Many browsers contain a personal Gmail account, a company Workspace account, and one or more test accounts. After authorization, confirm exactly which account is connected.
For the first test, use a low-risk account and prepare:
- one searchable test email;
- one Drive document without sensitive data;
- one new folder for saved test files.
Step 3: Test read-only access first
Do not begin by asking Claude to send a message. Start with a narrow, read-only prompt:
Search Gmail for messages from the past seven days with “project weekly meeting” in the subject. List only the sender, date, subject, and a one-sentence summary. Include source citations. Do not send, reply to, move, label, or modify any message.
A successful test is not merely an answer. Verify all four conditions:
- sender and date are correct;
- older messages with a similar subject were not mixed in;
- citations lead back to the source;
- no write action occurred.
Step 4: Test Drive retrieval
Find Drive files with “Q3 proposal” in the name and sort them by most recently modified. Compare the goals, budget, and delivery dates in the two newest files. Answer only from those files, include source links, and do not move, share, or delete anything.
If the documents consist mainly of scans, screenshots, or complex charts, text extraction may be incomplete. Run OCR first or move important visual material into a workflow that supports image understanding. Always inspect the original when a decision depends on a chart or scanned page.
3. Four workflows you can use today

Workflow 1: Turn unread mail into a task table
Find unread work email from the past 24 hours and classify it as “must handle today,” “handle this week,” or “for awareness.” Return sender, subject, deadline, next action, and the reason for the category. Do not mark anything as read and do not reply. If the deadline is unclear, write “needs confirmation” instead of guessing.
This prompt works because it defines categories, fields, and forbidden actions. The result can go directly into a task manager rather than becoming another paragraph you must interpret.
Workflow 2: Draft a reply using Drive context
Read the full email thread with the subject “Annual renewal proposal.” Find the latest pricing document mentioned in the thread. First list the customer’s three main questions, then draft a reply using only the latest file. Cite the source after every amount, date, and product name. Create a draft only; do not send it.
Keep “draft only” in the task even if the interface already has approval controls. Repeating the boundary in the instruction reduces ambiguity.
Workflow 3: Build a brief from scattered files
Search Drive for Docs, Slides, and Sheets modified in the past 30 days and related to “Singapore market.” Produce a brief with background, current progress, key figures, unresolved questions, owners, and the next milestone. Put conflicting information in a separate “needs verification” section and cite every source.
Do not force the model to invent a single truth when documents disagree. A useful agent exposes the conflict, dates each source, and shows who authored it.
Workflow 4: Create a weekly report, then save it
Using this week’s email and Drive files related to the “Northstar” project, prepare a report with completed work, risks, next-week plans, and decisions needed. Show the draft in the conversation first. After I approve it, save it in the Drive folder “Project Reports/2026.”
File creation may require code execution and file-creation capabilities. Even when saving is available, keep the sequence: preview, approve, then write.
4. Six rules that make the workflow dependable
1. Use verifiable search boundaries
“Find my important recent email” is too vague. Specify at least two or three constraints: time window, sender set, subject keywords, unread status, or presence of attachments.
2. Separate facts from recommendations
Ask for two sections: “facts found in source material” and “recommended actions.” This prevents model judgment from blending into the evidence summary.
3. Require citations for critical fields
Amounts, dates, account numbers, contract versions, recipients, and deadlines should each have a source. If there is no source, mark the field as unresolved.
4. Keep human approval for write actions
Sending email, sharing files, changing permissions, and deleting content are high-impact actions. Removing every confirmation to save a click is usually a poor enterprise trade-off.
5. Do not confuse file access with perfect layout understanding
Spreadsheets, slides, scanned PDFs, and embedded images can produce uneven results. Review the original before relying on a visual figure or unusual layout.
6. Prove the workflow with a test account
Prepare sample messages, documents, and deliberate error cases. Validate search scope, approval steps, logs, and revocation before giving the workflow broader access.
5. Developer route: Build an approval-first email agent
The native connector is best for personal and general office workflows. Build a custom agent when you need to:
- match incoming email to CRM customers;
- draft from an internal knowledge base;
- apply labels and write results to a ticketing system;
- enforce different models, budgets, or permissions by department;
- retain an audit trail for every read and write action.
In this architecture, Google APIs retrieve email and documents and create drafts. A Claude model analyzes and generates. Apito provides model access. Your application owns authorization, approval, policy, and logging. The model should never hold uncontrolled long-term credentials.

5.1 Recommended minimum architecture
Gmail / Drive
↓ least-privilege OAuth
Business orchestrator ──→ redaction and context assembly
↓ ↓
Approval queue Apito / Claude
↓ ↓
Create Gmail draft ←──── structured suggestion
↓
Human review and send
Gmail / Drive
↓ least-privilege OAuth
Business orchestrator ──→ redaction and context assembly
↓ ↓
Approval queue Apito / Claude
↓ ↓
Create Gmail draft ←──── structured suggestion
↓
Human review and send
Do not automate sending in version one. A valuable first release can read a selected thread, find related Drive files, generate a structured suggestion, create a draft, and let a human send it.
5.2 Environment variables
APITO_API_KEY=your_apito_key
APITO_BASE_URL=https://gw.apito.ai/v1
APITO_MODEL=current_claude_model_id_from_the_console
GOOGLE_CLIENT_SECRET_FILE=./client_secret.json
GOOGLE_TOKEN_FILE=./token.json
APITO_API_KEY=your_apito_key
APITO_BASE_URL=https://gw.apito.ai/v1
APITO_MODEL=current_claude_model_id_from_the_console
GOOGLE_CLIENT_SECRET_FILE=./client_secret.json
GOOGLE_TOKEN_FILE=./token.json
Use the model ID currently shown in the Apito console. Do not hard-code a name copied from an old tutorial into production.
5.3 Generate a reviewable reply plan
The example below covers only the model layer. Wrap Google OAuth, message retrieval, Drive retrieval, and draft creation in separate components using Google’s official client libraries.
import json
import os
from openai import OpenAI
client = OpenAI(
api_key=os.environ["APITO_API_KEY"],
base_url=os.getenv("APITO_BASE_URL", "https://gw.apito.ai/v1"),
)
def build_reply_plan(email_text: str, drive_context: str) -> dict:
response = client.chat.completions.create(
model=os.environ["APITO_MODEL"],
temperature=0.2,
messages=[
{
"role": "system",
"content": (
"You are an enterprise email assistant. Work only from "
"the supplied messages and documents. Never invent amounts, "
"dates, or commitments. Return strict JSON with the fields "
"summary, facts, uncertainties, subject, body, and sources. "
"The body is a draft and must never imply it was sent."
),
},
{
"role": "user",
"content": f"Email thread:\n{email_text}\n\nDrive context:\n{drive_context}",
},
],
)
return json.loads(response.choices[0].message.content)
import json
import os
from openai import OpenAI
client = OpenAI(
api_key=os.environ["APITO_API_KEY"],
base_url=os.getenv("APITO_BASE_URL", "https://gw.apito.ai/v1"),
)
def build_reply_plan(email_text: str, drive_context: str) -> dict:
response = client.chat.completions.create(
model=os.environ["APITO_MODEL"],
temperature=0.2,
messages=[
{
"role": "system",
"content": (
"You are an enterprise email assistant. Work only from "
"the supplied messages and documents. Never invent amounts, "
"dates, or commitments. Return strict JSON with the fields "
"summary, facts, uncertainties, subject, body, and sources. "
"The body is a draft and must never imply it was sent."
),
},
{
"role": "user",
"content": f"Email thread:\n{email_text}\n\nDrive context:\n{drive_context}",
},
],
)
return json.loads(response.choices[0].message.content)
Production code also needs schema validation, timeouts, retries, length limits, redaction, and a safe handoff to a human queue.
5.4 Create a Gmail draft instead of sending
A Gmail draft contains a MIME message. This example shows the core structure and omits OAuth initialization:
import base64
from email.message import EmailMessage
def create_gmail_draft(gmail_service, to, subject, body):
message = EmailMessage()
message.set_content(body)
message["To"] = to
message["Subject"] = subject
encoded = base64.urlsafe_b64encode(message.as_bytes()).decode()
draft = {"message": {"raw": encoded}}
return (
gmail_service.users()
.drafts()
.create(userId="me", body=draft)
.execute()
)
import base64
from email.message import EmailMessage
def create_gmail_draft(gmail_service, to, subject, body):
message = EmailMessage()
message.set_content(body)
message["To"] = to
message["Subject"] = subject
encoded = base64.urlsafe_b64encode(message.as_bytes()).decode()
draft = {"message": {"raw": encoded}}
return (
gmail_service.users()
.drafts()
.create(userId="me", body=draft)
.execute()
)
Log the resulting draft ID, input message IDs, referenced file IDs, model, timestamp, and approver. Do not retain entire email bodies indefinitely when they are not needed.
5.5 Start with read-only scopes
Begin with Gmail and Drive read-only access. Add draft-related permissions only after the read path works. Drive writes, permission changes, and deletion should be separate capabilities rather than one broad permission granted “for later.”
Some Gmail and Drive scopes are classified as sensitive or restricted. Public applications may require Google OAuth verification and additional security work. Check Google’s current policy before launch.
6. Pre-launch acceptance checklist

- [ ] Test and production accounts are separate.
- [ ] OAuth scopes follow least privilege.
- [ ] Prompts prohibit fabrication and unauthorized actions.
- [ ] Amounts, dates, recipients, and attachments are validated.
- [ ] The default action is to create a draft, not send.
- [ ] Delete, share, move, and permission changes require approval.
- [ ] Logs can trace message IDs, file IDs, model, and approver.
- [ ] Logs do not retain unrelated full content or credentials.
- [ ] Timeouts, rate limits, and expired authorization fail safely to a human.
- [ ] Team members know how to revoke Google access.
7. Frequently asked questions
Will Claude automatically send email after Gmail is connected?
Connecting an account does not by itself trigger sending. Native write actions are approval-sensitive. A custom agent should create drafts by default and let a human review them.
Can Claude read Gmail attachment contents?
The connector can access attachment metadata, but metadata is not the attachment body. If the contents matter, move the file into a supported Drive workflow or process it separately.
Why can I not see the Google Workspace connector?
Check that the client is current and the feature is available for the account. Team and Enterprise users should also confirm that the organization owner enabled the connector.
Can Claude read scanned PDFs and screenshots in Drive?
Results depend on the file and layout. Embedded images may not be treated as document body text. Run OCR on scans and manually verify important charts.
Should I use the native connector or build an agent?
Use the native connector for personal work, occasional retrieval, and general drafting. Build an agent when you need CRM or ticketing integration, approval policy, audit logs, department permissions, or batch processing.
What does Apito do in this architecture?
Apito is the model-access layer for the custom agent, using an API key and compatible Base URL. Google authorization and Gmail or Drive operations remain the responsibility of Google APIs and your application.
How do I keep incorrect information out of email drafts?
Limit the source set, require citations for critical fields, separate uncertainty, validate structured output, and retain draft approval. “Be accurate” is not an engineering control.
8. Reference material
- Anthropic: Using Google Workspace connectors
- Google Developers: Gmail API drafts
- Google Developers: Upload files with Drive API
- Google Developers: OAuth 2.0 scopes
Next steps
Automate information retrieval before automating decisions. Start with a test account and prove the read → generate → draft → approve loop. When you need a custom model-access layer, review the current models and API setup options at Apito before expanding the workflow.



