Feishu Doc Summarizer
Overview
Given a Feishu/Lark document link (docx or wiki), read the document content and reply in-chat with a structured summary following the user’s fixed schema stored in MEMORY.md.
Workflow
0) Input detection
- - Trigger when the user message contains a Feishu/Lark docx link like:
-
https://...larkoffice.com/docx/DOC_TOKEN
- - Also trigger when the user message contains a Feishu/Lark wiki link like:
- INLINECODE1
The user may provide no additional instructions; default to summarizing.
1) Resolve link → doc token (if needed)
- - If it is a docx link: extract
doc_token directly. - If it is a wiki link:
- Use
feishu_wiki(action=get, token=wiki_token) to resolve the underlying object.
- If the object type is
docx, extract its doc token.
- If not docx, tell the user what type it is and what you can support.
2) Read document content
- - Use
feishu_doc(action=read, doc_token=doc_token) to retrieve the full document content. - If permissions fail or content is empty, ask the user to confirm they granted read access.
3) Summarize with the fixed schema (from memory)
- - Before drafting, retrieve the summary schema from memory (search MEMORY.md for “Feishu 云文档摘要偏好” / “固定模板”).
- Produce the summary strictly following the section order and rules in memory.
- Citations: In the “引用原文片段” section, only quote text that appears in the document; do not fabricate.
Long documents
If the document is very long:
1) Chunk by headings/paragraph groups, summarize each chunk briefly.
2) Merge chunk summaries into the final schema.
3) Keep “引用原文片段” short and representative.
4) Reply back to the user
- - Send the final formatted summary back to the current conversation.
- Include the original link in “文档元信息/链接”.
Output format (must follow memory)
Follow the user’s schema in MEMORY.md exactly; keep missing items as “无/未知” rather than removing sections.
Feishu 文档摘要工具
概述
给定一个飞书/ Lark 文档链接(docx 或 wiki),读取文档内容,并在聊天中按照 MEMORY.md 中存储的用户固定模板回复结构化摘要。
工作流程
0) 输入检测
- - 当用户消息包含飞书/ Lark docx 链接时触发,例如:
- https://...larkoffice.com/docx/DOC_TOKEN
- - 当用户消息包含飞书/ Lark wiki 链接时也触发,例如:
- https://...larkoffice.com/wiki/WIKI_TOKEN
用户可能不提供额外指令;默认执行摘要操作。
1) 解析链接 → 文档令牌(如需要)
- - 如果是 docx 链接:直接提取 doc_token。
- 如果是 wiki 链接:
- 使用 feishu
wiki(action=get, token=wikitoken) 解析底层对象。
- 如果对象类型是 docx,提取其文档令牌。
- 如果不是 docx,告知用户该对象类型以及支持的类型。
2) 读取文档内容
- - 使用 feishudoc(action=read, doctoken=doc_token) 获取完整文档内容。
- 如果权限失败或内容为空,请用户确认已授予读取权限。
3) 使用固定模板(来自记忆)进行摘要
- - 起草前,从记忆中检索摘要模板(在 MEMORY.md 中搜索“飞书云文档摘要偏好”/“固定模板”)。
- 严格按照记忆中的章节顺序和规则生成摘要。
- 引用:在“引用原文片段”部分,仅引用文档中出现的文本,不得编造。
长文档处理
如果文档非常长:
1) 按标题/段落组进行分块,简要总结每个块。
2) 将块摘要合并到最终模板中。
3) 保持“引用原文片段”简短且具有代表性。
4) 回复用户
- - 将最终格式化的摘要发送回当前对话。
- 在“文档元信息/链接”中包含原始链接。
输出格式(必须遵循记忆)
严格遵循 MEMORY.md 中用户的模板;缺失项保留为“无/未知”,而非删除章节。