让 Gemini “找一下上周和客户 X 的邮件”或”读一下 Drive 里的 spec 文档”——结果它说”I cannot find that email” / “I don’t have access to your Drive”。这种”看似已集成但其实读不到数据”问题,几乎都是 Workspace 集成开关、账号管理员策略、或当前账号身份导致的。Gemini 的 Workspace 数据访问按”集成开关 → 用户授权 → 当前 active account”三层走,缺任何一层都断。
要让 Gemini 真正读到 Gmail / Drive,得逐层确认。
常见原因
按出现频率:
1. Settings → Apps 里集成开关没全打开(最常见)
即使 Workspace 域级启用了 Gemini,用户端 Settings 里每个应用还要单独打开:
gemini.google.com → 设置 → Apps
- Gmail(默认 OFF)
- Calendar(默认 OFF)
- Drive(默认 OFF)
- Tasks(默认 OFF)
- Maps、YouTube 等其他
很多人只开了一两个,其他默认关。
如何判断:Settings → Apps 里有几个开关是 OFF?
2. Workspace 管理员禁了访问
IT 全局禁了 Gemini 访问 Gmail / Drive(合规防止数据外流):
- 你在 Settings → Apps 里看不到这些选项
- 或选项灰着不能开
如何判断:
- 私人 Google 账号能开同样的集成,工作账号开不了 = 这条
- 联系 IT 确认
3. 当前 active 账号不对
你在 Gemini 里登的是个人 Gmail,但 Drive 文档在 Workspace 账号——账号身份不匹配。
如何判断:
- 看 Gemini 右上角头像显示哪个账号
- 看 mail.google.com 当前活跃的是哪个账号
- 两边一致才行
4. 授权 scope 过期
OAuth refresh token 一年不用会过期,老账号需要重新授权。
如何判断:之前能用,最近几个月没用,现在突然 “no access”。
5. 跨域 Drive 文档
文档在另一个 Workspace 域(比如客户分享给你),Gemini 默认只读你自己域的 Drive。
如何判断:
- 文档 URL 在 docs.google.com/document/d/… 但所属域不是你的
- 你能在 Drive 看到但 Gemini 读不到
6. 文档权限不够
Drive 里的文档你只有 Viewer 权限,没 Editor。Gemini 在某些情况下只能读 Editor 权限的。
7. Workspace 政策限制了某类内容
某些 IT 禁了”机密标签”的文档让 Gemini 读取。
最短修复路径
Step 1:Settings → Apps 全部打开
gemini.google.com → 头像 → Settings → Apps
全部 toggle 到 ON:
- Gmail
- Calendar
- Drive
- Docs
- Tasks
- Keep
- Maps
- YouTube
打开后 prompt Gemini:“Can you access my Gmail right now?” 看返回。
Step 2:核对当前 active 账号
gemini.google.com 右上角头像 → 看 email
mail.google.com 新标签 → 右上角头像 → 看 email
确保两个 email **完全一致**
不一致:
gemini.google.com → 头像 → 切到目标账号
重新打开 Gmail / Drive 标签
Step 3:重新授权 scope
1. myaccount.google.com/permissions
2. 找 "Gemini" / "Google AI" → 移除访问
3. 回到 gemini.google.com 让它访问 Gmail
4. 新弹的 OAuth 同意页**勾选所有 scope**
5. 完整完成 2FA
Step 4:Workspace 联系 IT
工作账号 Apps 选项灰着 / 不存在:
- 联系 IT
- Admin Console → Apps → Additional Google services → Gemini app for Workspace
- 启用 “Allow Gemini to access user data” 和具体 service(Gmail / Drive / Calendar)
- 等 30 分钟生效
Step 5:明确告诉 Gemini 用 Workspace 账号
如果你账号身份混乱:
prompt: "Use my workspace account [you@company.com] to access these emails: ..."
显式提名让 Gemini 知道用哪个账号。
Step 6:跨域文档——手动复制内容
如果文档在客户 Workspace:
- 你打开文档(在 Drive 里能看到)
- Ctrl+A 全选复制
- 粘贴到 Gemini 对话框
- 或下载为 PDF 后上传
Step 7:API / AI Studio 走原生集成
API 用户走 Workspace API + Gemini API 自己整合:
# Gmail API
from googleapiclient.discovery import build
service = build('gmail', 'v1', credentials=creds)
messages = service.users().messages().list(userId='me', q='from:client').execute()
# 然后把内容发给 Gemini
from google import genai
client = genai.Client()
client.models.generate_content(
model="gemini-2.5-pro",
contents=[messages_content, "Summarize these emails"]
)
绕过 Web UI 集成限制。
Step 8:双 profile 隔离
如果你工作 + 私人 Google 账号都重度用:
Chrome → 创建两个 profile:
- Profile A:仅工作账号,仅工作 Workspace
- Profile B:仅私人账号
不要在同 profile 切账号,scope token 容易混淆。
预防建议
- 工作 Gemini 和私人 Gmail 用两个独立 Chrome profile,避免账号混乱
- Settings → Apps 一次性把所有 8 个集成打开,不要按需开
- 每月 myaccount.google.com/permissions 复核 Gemini 的 scope
- 跨域 Drive 文档建议复制到自己域再让 Gemini 处理
- 重度自动化访问 Gmail / Drive 走 API,不依赖 Web UI 集成