chatgpt-dingtalk
chatgpt-dingtalk copied to clipboard
新的菜单交互
新的菜单交互
- 使用新的菜单交互(如下图所示)
- 每一个按钮,都是可点击的,点击后自动回复对应的文字
#126 @eryajf
有没有相关的文档,或者欢迎直接提交pr
@eryajf
独立跳转型ActionCard,支持卡片底部多个按钮
文档地址
https://open.dingtalk.com/document/orgapp/custom-robots-send-group-messages
底部按钮配置
actionURL支持配置成dtmd链接
文档地址
https://open.dingtalk.com/document/isvapp/the-internal-robot-of-the-enterprise-realizes-the-interaction-in
这个文档里面也有提到dtmdlink相关的信息
https://open.dingtalk.com/document/isvapp/lightweight-access-document-of-interactive-cards#title-8il-1hb-ywm
@eryajf
示例
这里是一个使用官方样例格式化出来的json示例
这个actionCard
类型的消息,可以通过自建机器人的webhook,或者通过自定义机器人的那种固定回调,都能正常发送
{
'msgtype': 'actionCard',
'actionCard': {
'title': '我 20 年前想打造一间苹果咖啡厅,而它正是 Apple Store 的前身',
'text': ' \n\n #### 乔布斯 20 年前想打造的苹果咖啡厅 \n\n Apple Store 的设计正从原来满满的科技感走向生活化,而其生活化的走向其实可以追溯到 20 年前苹果一个建立咖啡馆的计划',
'btnOrientation': '0',
'btns': [{
'actionURL': 'dtmd://dingtalkclient/sendMessage?content=内容不错',
'title': '内容不错'
},
{
'actionURL': 'dtmd://dingtalkclient/sendMessage?content=不感兴趣',
'title': '不感兴趣'
}]
}
}
python demo
https://gist.github.com/lloydzhou/e2fd09a1aab49d163562727f706d4160