This is a bilingual snapshot page saved by the user at 2024-10-3 11:13 for https://yuque.alibaba-inc.com/lark/openapi/webhooks, provided with bilingual support by Immersive Translate. Learn how to save?

Webhooks 消息推送 Webhooks message push

公告 announcement
日期 date
公告 announcement
2023/12/22
为了加强安全性,我们的自定义消息推送服务 ( Webhooks ) 现在只支持推送到内部网络 ( Intranet ) 的域名或 IP 地址。请注意,之前使用的所有公网域名推送服务将在 2024 年 4 月 1 日起停止工作。我们强烈建议尽早进行更新以避免服务中断。更多有关七网隔离政策的信息,敬请参阅相关文档:七网隔离
To strengthen security, our custom message push service (Webhooks) now only supports domain names or IP addresses that can be pushed to your internal network (intranet). Please note that all public domain name push services that you previously used will stop working on April 1, 2024. We strongly recommend updating as early as possible to avoid service disruptions. For more information about the seven-network isolation policy, please refer to the related document: Seven Network Isolation.


概况 Overview
通过配置知识库或团队的 Webhooks,开发者能够在文档发生变动时自动获取到通知。
By configuring a knowledge base or a team's webhooks, developers can be automatically notified when a document changes.

⚠️ 知识库 如果配置了 「自动发布」功能后,文档的 更新/推送 操作暂不会发送 Webhook 通知。
⚠️ Knowledge Base If the "Auto-Publish" function is configured, the update/push operation of the document will not send a webhook notification temporarily.


配置方式 Configuration
在 知识库 -> 设置 -> 开发者设置 页面,会出现 Webhooks 配置地址。
On the Knowledge Base -> Settings -> Developer Settings page, the Webhooks configuration address will appear.

HTTPS://YUQUE.ANTFIN.COM/FORCES/HOW-WE-BUILD-YUQUE/SETTINGS/WEBHOOKS
语雀产品架构之美 The beauty of Yuque's product architecture
权限 Permissions
设置 Set up
回收站 recycle bin
统计 statistics
设置 Set up
知识库信息 Knowledge base information
新增消息推送 Added message push
高级设置 Advanced settings
推送到 Push to
其他渠道 Other channels
钉钉群 DingTalk group
消息推送 Push messages
可将知识库内动态推送到其他渠道,相关信息并填写到下方查看获取方式
You can dynamically push the knowledge base to other channels, and fill in the relevant information below to view the way to obtain it
机器人名字 Robot name
名称,如钉钉机器人 Name, such as DingTalk Robot
WEBHOOK 地址 WEBHOOK ADDRESS
URL
当知识库内发生以下动态时推送 Push when the following dynamics occur in the knowledge base
发布文档 Publish the document
新增评论 Add a comment
更新文档 Update the documentation
更新评论 Update the review
发起评审 Initiate a review
评审完成 The review is complete
取消评审 Cancel the review
添加 Add to
image.png


要给整个团队的文档添加 Webhook,可以在团队设置页进行设置:
To add a webhook to your entire team's documents, you can set it up on the team settings page:

HTTPS://YUQUE.ANTFIN.COM/FORCES/SETTINGS/WEBHOOKS
消息推送 Push messages
添加 Add to
智能协同事业部 Intelligent Collaboration Division
团队管理 Team management
推送条件 Push conditions
名字 name
WEBHOOK 地址 WEBHOOK ADDRESS
操作 operate
统计 statistics
发布文档 Publish the document
更新文档 Update the documentation
权限 Permissions
RFC小 The RFC is small
HTTPS://OAPI.DINGTALK.COM/ROBOT/SEND?
测试 Test
删除 Delete
编辑 edit
发起评审 Initiate a review
ACCESS_TOKEN-E613DBD680EBA9FBC29A7D0...
助手 aides
评审完成 The review is complete
安全日志 Security logs
取消评审 Cancel the review
消息推送 Push messages
TOKEN
回收站 recycle bin
设置 Set up
image.png


推送给钉钉群 Push to the DingTalk group
语雀 Webhooks钉钉自定义机器人做了数据适配,如果添加的 Webhooks URL 是钉钉自定义机器人地址,那么会以 钉钉 link 消息格式发送该知识库的文档 发布 和 更新 信息给机器人。由于钉钉开启了机器人的安全设置,需要在“自定义关键词”中添加“语雀”。
If the added Webhooks URL is the address of the DingTalk custom bot, the document of the knowledge base will be published and updated to the bot in the DingTalk link message format. Since DingTalk has enabled the security settings of the robot, you need to add "Yuque" to the "Custom Keywords".

添加机器人 Add a bot
机器人名字: Robot Name:
日报周报语雀机器人 Daily Weekly Newspaper Whispering Sparrow Robot
蚂蚁体验技术部 Ant Experience Technology Department
添加到群组: Add to a group:
安全设置 Security settings
自定义关键词 Custom keywords
说明文档 Documentation
语雀 Whispering Sparrow
添加 Add to
(最多添加10个) (Add up to 10)
我已阅读并同意 I have read and agreed
定义机器人服务及免毒 Define bot services and toxicity immunity
完成 finish
取消 Cancel
image.png
配置截图 Screenshot of the configuration

钉钉上显示效果 DingTalk shows the effect


支持按文档 Tag 过滤消息 Messages can be filtered by document tag
在语雀文档中,您可以设置自定义标签(Tag),当文档相关信息推送到钉钉群时,标签名称(TagName)也会一并发送。这样,您可以通过钉钉群机器人的“安全设置”中的“自定义关键词”功能,来过滤并只接收包含特定标签的消息,方便快捷地获取需要的信息。
In a Yuque document, you can set a custom tag, and when the document-related information is pushed to the DingTalk group, the tagname will also be sent. In this way, you can filter and only receive messages containing specific tags through the "Custom Keywords" function in the "Security Settings" of the DingTalk group bot, so as to obtain the information you need conveniently and quickly.


TAGS:#技术##产品文档##测试#
文中提及:小明,大王 The text mentions: Xiao Ming, the king
第二行内容 The second line reads
语雀消息 Whispering Bird Message
正文内容 Body content
AG定制推送 AG custom push
白机器人 White robots
tag-dingtalk-example.png

请保管好此WEBHOOK地址,不要公布在外部网站上,泄露有安全风险
PLEASE KEEP THIS WEBHOOK ADDRESS SAFE AND DO NOT PUBLISH IT ON EXTERNAL WEBSITES, AS IT MAY BE LEAKED DUE TO SECURITY RISKS
使用WEBHOOK地址,向钉钉群推送消息查看文档 USE THE WEBHOOK ADDRESS TO PUSH MESSAGES TO THE DINGTALK GROUP TO VIEW DOCUMENTS
HTTPS://OAPI.DINGTALK.COM/ROBOT/SEND?AC
9添加(最多添加10个) 9 additions (up to 10 additions)
机器人管理 Bot management
自定义关键词 Custom keywords
安全设置 Security settings
IP地址(段) IP address (range)
#产品文档#
WEBHOOK:
#技术#
说明文档 Documentation
取消 Cancel
重置 reset
完成 finish
加签 Apostille
复制 copy
bot-setup.png

推送给其他渠道 Push to other channels
在文档发生变动时,语雀会自动使用 HTTP POST 请求已配置的 Webhook URL,具体的 body 是一个 JSON 数据结构,示例如下:
When the document changes, Yuque will automatically use HTTP POST to request the configured webhook URL, the specific body is a JSON data structure, the example is as follows:

JSON
Copy
POST http://someone.com/yuque/webhook

{
"data": DataSerializer
}

URL 填写要求 URL requirements
语雀部署在蚂蚁生产网(小微生产网),Webhook 对应的地址需要先保证能和语雀的服务器互通,即要求填写的 URL 必须是内网域名或 IP,集团跨域的需要申请跨域 VIP。
The address corresponding to the webhook needs to be interoperable with Yuque's server, that is, the URL required to be filled in must be an intranet domain name or IP, and the group needs to apply for a cross-domain VIP.


参考:七网隔离 Reference: Seven networks isolation

推送数据格式说明 Push data format description
文档消息 Document messages
表格正文内容格式 The format of the table body content
表格 body 字段 JSON 反序列化后格式如下:
The deserialized JSON of the table body field looks like this:

评论消息 Comment on the message
评审消息 Review messages



04-01 18:25
4945
2157Word
Adblocker