当前位置:网站首页>推送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
}
}
边栏推荐
- Power system | IEEE paper submission process
- STP spanning tree protocol Foundation
- China solar window market trend report, technical dynamic innovation and market forecast
- [WSL] SSH Remote Connection and host port forwarding configuration
- 【文本数据挖掘】中文命名实体识别:HMM模型+BiLSTM_CRF模型(Pytorch)【调研与实验分析】
- Introduction to machine learning compilation course learning notes lesson 1 overview of machine learning compilation
- ThreadLocal local thread
- 研究生宿舍大盘点!令人羡慕的研究生宿舍来了!
- Combine pod identity in aks and secret in CSI driver mount key vault
- 【Mongodb】READ_ME_TO_RECOVER_YOUR_DATA,数据库被恶意删除
猜你喜欢
The usage difference between isempty and isblank is so different that so many people can't answer it
【Mongodb】READ_ ME_ TO_ RECOVER_ YOUR_ Data, the database is deleted maliciously
2022 safety officer-b certificate examination question bank and answers
Spark 离线开发框架设计与实现
ThreadLocal local thread
Development specification - parameter verification exception, exception return prompt section
What kind of processor architecture is ARM architecture?
[text data mining] Chinese named entity recognition: HMM model +bilstm_ CRF model (pytoch) [research and experimental analysis]
双亲委派机制
详细了解关于sentinel的实际应用
随机推荐
开发规范~参数校验异常、异常返回提示切面
Market trend report, technical innovation and market forecast of solar roof system in China
研究生宿舍大盘点!令人羡慕的研究生宿舍来了!
是否需要提高代码阅读能力?这有技巧
Problem solving - nested lists
Analyze the implementation process of oauth2 distributed authentication and authorization based on the source code
面试害怕被问MySQL相关问题 ?这份三万字精华总结 + 面试100 问,吊打面试官完全够了
Annotation
Development specification - parameter verification exception, exception return prompt section
[WSL] SSH Remote Connection and host port forwarding configuration
Principle of IP routing
What kind of processor architecture is ARM architecture?
Beijiafu (p+f) R2000 modified radar IP
EPICS record Reference 3 - - field available for all Records
CDN principle
EPICS记录参考3 -- 所有记录都有的字段
It's hard to hear C language? Why don't you take a look at my article (7) input and output
倍加福(P+F)R2000修改雷达IP
EPICS记录参考2--EPICS过程数据库概念
【軟件工程】期末重點