SuperAPI AI 工具集

google-slides

办公与效率

查看项目

更新于 10-16 07:25

技能介绍

用途:通过 Google Drive 连接器调用 Google Slides API,读取和编辑演示文稿及演讲者备注。官方文档见 https://developers.google.com/workspace/slides/api/reference/rest。

主要能力:读取演示文稿结构、幻灯片内容与演讲者备注;创建演示文稿或幻灯片;插入、替换、删除或格式化文本;在不改动幻灯片内容与设计的前提下更新演讲者备注;生成幻灯片缩略图。

使用方式:先连接 Google Drive 连接器(app.okou.ai/connectors)。API 复用 $GOOGLE_DRIVE_TOKEN,基础地址为 https://slides.googleapis.com/v1,演示文稿 ID 取自 https://docs.google.com/presentation/d/<presentation-id>/edit。读取用 GET /presentations/<id>;修改用 POST /presentations/<id>:batchUpdate,请求体写入 /tmp/google_slides_request.json,包含 requests 与 writeControl.requiredRevisionId。创建演示文稿用 POST /presentations;缩略图用 GET /presentations/<id>/pages/<page-object-id>/thumbnail。

限制与注意:读取默认允许,创建或修改需 presentations.create 或 presentations.write 权限。编辑前应重新读取最新 revisionId,避免覆盖并发修改;批量更新是原子的,任一请求无效则全部不生效。演讲者备注形状内文本可编辑,备注页其他属性只读。请求失败可运行 okou doctor check-connector --env-name GOOGLE_DRIVE_TOKEN 或 okou doctor check-connector --url https://slides.googleapis.com/v1/presentations/<presentation-id> --method GET 排查。