当前位置:网站首页>推送Markdown格式信息到釘釘機器人
推送Markdown格式信息到釘釘機器人
2022-06-24 22:59:00 【樵歌出林】
1.自定義機器人設置
根據釘釘官方開放文檔進行自定義機器人的配置,文檔地址為:自定義機器人接入 - 釘釘開放平臺 (dingtalk.com)

2.Markdown推送形式
- Markdown類型

- 參數說明
3.Markdown圖片格式
Markdown中可以使用url連接的圖片進行推送,格式為:,需注意:此url連接地址獲取可從第三方(如oss)獲取,也可在本地使用apache2創建http服務器自我生成,生成方法和流程可參考另一篇博文“使用apache2創建http服務器生成圖像url"。
如需在Markdown中引入變量,可在文本字符串前加入“f",並在字符串中對需要引入的變量添加花括號進行標明,即f"{變量名}/n/n"。此處注意,如果在引入"f"後需要對後續字符串進行加粗(**需加粗的字符串**),則需要在加粗的字符串**之後,添加“/n",否則釘釘推送的消息在手機APP端顯示异常(電腦端正常)
text = {
"msgtype": "markdown",
"markdown": {
"title": "警告",
"text": "#### **消息預警** @all \n"
f"> **時間:**\n{t0}\n\n"
f"> **類型:**\n{type}\n\n"
f"> **報警信息:**\n{reason}\n\n"
f"> \n\n"
f"> ###### {t0}發布 \n"
},
"at": {
"atMobiles": [
],
"atUserIds": [
],
"isAtAll": True
}
}
边栏推荐
- Simulated 100 questions and online simulated examination of high voltage electrician examination in 2022
- [personal experiment report]
- Feign project construction
- 别再乱用了,这才是 @Validated 和 @Valid 的真正区别!!!
- Learn more about redis' eight data types and application scenario analysis
- JMM 最最最核心的概念:Happens-before 原则
- 【武汉大学】考研初试复试资料分享
- Research Report on terahertz imaging system industry - market status analysis and development prospect forecast
- OSPF basic content
- See how sparksql supports enterprise data warehouse
猜你喜欢

How to submit the shopee opening and settlement flow?

糖豆人登录报错解决方案

别再乱用了,这才是 @Validated 和 @Valid 的真正区别!!!

Power system | IEEE paper submission process

2022-06-16 work record --js- judge the number of digits in string type digits + judge the number of digits in numeric type digits + limit the text length (display n words at most, exceeding...)

Dynamic menu, auto align

Web security XSS foundation 06

23研考生注意啦!备考期间最容易中招的骗局,居然是它们?!

环境配置 | VS2017配置OpenMesh源码和环境

Learning bit segment (1)
随机推荐
China smallpox vaccine market trend report, technical innovation and market forecast
2022安全员-B证考试题库及答案
Research and investment strategy report on China's bridge anticorrosive coating industry (2022 Edition)
环境配置 | VS2017配置OpenMesh源码和环境
MySQL kills 10 people. How many questions can you hold on to?
STP spanning tree protocol Foundation
详细了解Redis的八种数据类型及应用场景分析
【WSL】SSH 远程连接及宿主机端口转发配置
[ingénierie logicielle] points clés à la fin de la période
Based on the codeless platform, users deeply participated in the construction, and digital data + Nanjing Fiberglass Institute jointly built a national smart laboratory solution
京东618会议平板排行榜公布,新锐黑马品牌会参谋角逐前三名,向国货老大华为学习
Learn more about redis' eight data types and application scenario analysis
C#学习两年的增删改查和C#导入导出(去重)案例
New, Huawei cloud Kaitian apaas
cat写多行内容到文件
【武汉大学】考研初试复试资料分享
Parental delegation mechanism
Vulnhub Vegeta: 1
非单文件组件
Servlet