电子表格 mention(notify=true)提醒偶发失效:点击提示「提醒已被删除」

Open
#2,904 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
35/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Active
Tech stack
go
Domain
cli

Research direction

The report describes intermittent failures when writing spreadsheet mentions through PUT /open-apis/sheets/v2/spreadsheets/{spreadsheet_token}/values with notify: true; it names no repository files or tests. Start by tracing the CLI command and request path for this endpoint, then compare successful and failed notification cases. Done means identifying whether the CLI request differs in a way that explains the deleted reminder; the report leaves a key cell-state check incomplete.

Written by the indexing model from the issue text.

Description

domain/auth domain/base domain/doc domain/sheets

电子表格 mention(notify=true)提醒偶发失效:点击提示「提醒已被删除」

我只用tauri建一个最小的demo,点击按钮,发送电子表格云文档提醒,都可能有问题(但也可能没问题,是概率性的)

下面的详细——

提交对象:飞书开放平台技术支持 / 飞书客户端问题反馈
提交日期:2026-11-09
反馈人:【待填】

一、问题概述

通过飞书开放平台电子表格接口,在单元格中写入 mention 类型的值并开启 notify: true。被 @ 的用户会正常收到飞书提醒,但点击该提醒时:

  • 有时:正常打开电子表格并定位到对应单元格;
  • 有时:直接提示「提醒已被删除」,无法定位。

接口调用每次均返回成功(code: 0),单元格中的 @ 也确实写入成功。问题为偶发,首次发现于 2026-07-09,截至 2026-11-09 仍可复现。

二、影响范围

  • 被 @ 的用户无法从提醒可靠地跳转到目标单元格,通知功能不可用;
  • 该能力用于值班/排班提醒,提醒失效会导致负责人无法确认需要查看的单元格;
  • 同一张表、同一批用户、同一接口下,成功与失败交替出现,无法通过重试稳定规避。

三、环境信息

项目 内容
操作系统 Windows 10.0.26200 x64
飞书客户端 桌面端【最新】;接收方客户端版本【最新】
表格类型 飞书电子表格(非多维表格)
应用类型 企业自建应用
授权方式 user_access_token(用户身份,非应用身份)
调用方式 通过 lark-cli 调用;等价于下方 curl
接口 PUT /open-apis/sheets/v2/spreadsheets/{spreadsheet_token}/values
相关权限 sheets:spreadsheet:read、sheets:spreadsheet:write_only
接收方 均为同企业成员,且对表格有阅读/编辑权限

补充:表格在 Windows 桌面程序的 WebView 中打开和编辑;提醒由接收方在自己的飞书客户端中点击。

四、复现步骤

  1. 打开电子表格,在目标单元格(示例 C2)输入触发字符 e,然后移开焦点或按回车,让飞书客户端先提交该单元格内容。
  2. 约 0.5 秒后,桌面程序读取 B2、D2 等左右相邻单元格中的负责人简称,映射为对应的 open_id。
  3. 程序调用电子表格 values 接口,将 C2 覆盖为 mention 值,并设置 notify: true(请求体见下)。
  4. 接口返回 code: 0,data.revision 正常递增。
  5. 被 @ 的用户在飞书收到提醒。
  6. 点击该提醒。

重点复现场景:收到提醒后立即点击,期间不修改该单元格。若单元格事后被其他人改写,旧提醒失效可以理解;我们反馈的是“刚收到提醒、单元格未被再次修改”时仍然提示已删除的情况。

五、请求与返回

请求体(已脱敏)
{
  "valueRange": {
    "range": "abc123!C2:C2",
    "values": [
      [
        {
          "type": "mention",
          "textType": "openId",
          "text": "ou_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
          "notify": true
        }
      ]
    ]
  }
}

说明:

  • range 使用 {sheet_id}!{cell}:{cell} 格式;
  • textType 实际使用过 openId(ou_...)和 unionId(on_...)两种类型;
  • 只写入一个单元格,值为单个 mention,不包含其他文本。
返回(示例)
{
  "code": 0,
  "msg": "success",
  "data": {
    "revision": 12345,
    "updatedCells": 1,
    "updatedRows": 1,
    "updatedColumns": 1
  }
}

六、期望结果与实际结果

  • 期望:只要 mention 仍存在于该单元格,点击提醒就应打开表格并定位到该单元格。
  • 实际:有时可以定位;有时提示「提醒已被删除」,无法定位(失败时单元格中的 @ 是否仍存在,见第七节第 5 条)。
  • 频率:偶发,约【待填】次中出现【待填】次。
  • 规律:暂未发现与特定用户、特定单元格或特定客户端的固定对应关系;同一用户也会时而成功、时而失败。

七、应用侧的调用与观察

  1. 单次触发只写入一次:从收到触发到写入完成,应用只调用一次 values 接口,没有并发写入;复现时可提供对应时间点的审计日志(格式见下)。
  2. 写入成功后不再修改该单元格:程序写入 mention 后即结束,不会再次写同一个单元格。
  3. 接口返回成功:code: 0,data.revision 正常递增。
  4. notify: false 行为正常:相同路径的静默 @(notify: false)不会产生提醒,符合预期。
  5. 失败时单元格中的 @ 是否仍然存在:这是区分“提醒实体失效”与“单元格值被改写”的关键。我们会在提交前复现并附上失败时单元格仍为 mention 的截图/录屏。

十、最小复现(curl)

curl -X PUT 'https://open.feishu.cn/open-apis/sheets/v2/spreadsheets/{spreadsheet_token}/values' \
  -H 'Authorization: Bearer {user_access_token}' \
  -H 'Content-Type: application/json; charset=utf-8' \
  -d '{
    "valueRange": {
      "range": "{sheet_id}!C2:C2",
      "values": [[{
        "type": "mention",
        "textType": "openId",
        "text": "{open_id}",
        "notify": true
      }]]
    }
  }'

等价的 lark-cli 调用:

lark-cli api PUT '/open-apis/sheets/v2/spreadsheets/{spreadsheet_token}/values' \
  --as user \
  --data '{"valueRange":{"range":"{sheet_id}!C2:C2","values":[[{"type":"mention","textType":"openId","text":"{open_id}","notify":true}]]}}' \
  --json
  • 失败时单元格是否仍为 mention(这是判断“提醒实体失效”还是“单元格值被改写”的关键)
Dominant language
Go
Stars
18.2k
Forks
1.4k
Avg merge
1d 3h
Merged PRs (30d)
18

Getting set up

  • No Dockerfile or Docker Compose file
  • Has a pull request template
  • No contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from larksuite/cli

All issues in larksuite/cli

Similar issues

More Go issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.