侧边栏壁纸
博主头像
Narutoの博客

行动起来,活在当下

  • 累计撰写 46 篇文章
  • 累计创建 24 个标签
  • 累计收到 0 条评论

目 录CONTENT

文章目录

飞书通知推送

Naruto
2024-08-08 / 0 评论 / 0 点赞 / 5 阅读 / 0 字

飞书通知推送

普通模式

{"msg_type":"text","content":{"text":"%MESSAGE"}}

# linux
{"msg_type":"'"text"'","content":{"text":"'"$message_text"'"}}

富文本模式

利用 消息卡片搭建工具 生成json配置,然后删除首尾两个大括号,缩进两个空格,然后首尾再添加下列内容即可构成配置

{
    "msg_type": "interactive",
    "card": {
       "config": {
        "wide_screen_mode": true
       },
       配置
    }
}

1.Tasker自定义任务通知

{
  "msg_type": "interactive",
  "card": {
    "config": {
      "wide_screen_mode": true
    },
    "elements": [
      {
        "tag": "div",
        "text": {
          "content": "%MESSAGE",
          "tag": "lark_md"
        }
      },
      {
        "tag": "note",
        "elements": [
          {
            "tag": "img",
            "img_key": "img_v3_0287_ba2ffe59-c192-4115-ad44-c3142fb39dcg",
            "alt": {
              "tag": "plain_text",
              "content": ""
            }
          },
          {
            "tag": "plain_text",
            "content": "Android 9\n%time"
          }
        ]
      }
    ],
    "header": {
      "title": {
        "content": "任务通知",
        "tag": "plain_text"
      },
      "template": "green"
    }
  }
}

2.Tasker通知栏通知

{
  "msg_type": "interactive",
  "card": {
    "config": {
      "wide_screen_mode": true
    },
    "elements": [
      {
        "tag": "div",
        "text": {
          "content": "📝 %evtprm2\n%evtprm3",
          "tag": "plain_text"
        }
      },
      {
        "tag": "note",
        "elements": [
          {
            "tag": "img",
            "img_key": "img_v3_0287_ba2ffe59-c192-4115-ad44-c3142fb39dcg",
            "alt": {
              "tag": "plain_text",
              "content": ""
            }
          },
          {
            "tag": "plain_text",
            "content": "Android 9"
          }
        ]
      }
    ],
    "header": {
      "title": {
        "content": "%app_name",
        "tag": "plain_text"
      },
      "template": "blue"
    }
  }
}

3.通知滤盒

{
  "msg_type": "interactive",
  "card": {
    "config": {
      "wide_screen_mode": true
    },
    "elements": [
      {
        "tag": "div",
        "text": {
          "content": "📝 {android.title}\n{android.text}",
          "tag": "plain_text"
        }
      },
      {
        "tag": "note",
        "elements": [
          {
            "tag": "img",
            "img_key": "img_v3_0287_a67f9b41-9381-4c74-8974-a8dda2efb22g",
            "alt": {
              "tag": "plain_text",
              "content": ""
            }
          },
          {
            "tag": "plain_text",
            "content": "XiaoMi 6\n通知滤盒"
          }
        ]
      }
    ],
    "header": {
      "title": {
        "content": "{filterbox.field.APP_NAME}",
        "tag": "plain_text"
      },
      "template": "blue"
    }
  }
}

4.哪吒探针-普通

{
	"msg_type": "interactive",
	"card": {
		"config": {
			"wide_screen_mode": true
		},

		"elements": [{
				"tag": "hr"
			},
			{
				"tag": "div",
				"text": {
					"content": "📝 详细信息:\n名称: \"#SERVER.NAME#\"\nIP: \"#SERVER.IP#\"\nIPv4: \"#SERVER.IPV4#\"\nIPv6: \"#SERVER.IPV6#\"\nCPU: \"#SERVER.CPU#\"\n内存: \"#SERVER.MEM#\"\n交换分区: \"#SERVER.SWAP#\"\n存储: \"#SERVER.DISK#\"\n实时上传速度: \"#SERVER.NETINSPEED#\"\n实时下载速度: \"#SERVER.NETOUTSPEED#\"\n总上传: \"#SERVER.TRANSFERIN#\"\n总下载: \"#SERVER.TRANSFEROUT#\"\n1分钟内负载: \"#SERVER.LOAD1#\"\n5分钟内负载: \"#SERVER.LOAD5#\"\n15分钟内负载: \"#SERVER.LOAD15#\"\nTCP连接数: \"#SERVER.TCPCONNCOUNT\"\nUDP连接数: \"#SERVER.UDPCONNCOUNT\"",
					"tag": "plain_text"
				}
			},
			{
				"tag": "hr"
			},
			{
				"tag": "note",
				"elements": [{
						"tag": "img",
						"img_key": "img_v3_0292_406c7625-aa02-4001-945c-2c63e7c92feg",
						"alt": {
							"tag": "plain_text",
							"content": ""
						}
					},
					{
						"tag": "plain_text",
						"content": "服务器通知"
					}
				]
			},
			{
				"tag": "action",
				"actions": [{
					"tag": "button",
					"text": {
						"tag": "plain_text",
						"content": "查看服务器"
					},
					"type": "primary",
					"multi_url": {
						"url": "https://vps.narutos.top/",
						"pc_url": "",
						"android_url": "",
						"ios_url": ""
					}
				}]
			}
		],
		"header": {
			"template": "purple",
			"title": {
				"content": "#NEZHA#",
				"tag": "plain_text"
			}
		}
	}
}

5.哪吒探针-离线通知

{
	"msg_type": "interactive",
	"card": {
		"config": {
			"wide_screen_mode": true
		},
		"elements": [{
				"tag": "hr"
			},
			{
				"tag": "div",
				"text": {
					"content": "📝 详细信息:\n名称: \"#SERVER.NAME#\"\nIP: \"#SERVER.IP#\"\nIPv4: \"#SERVER.IPV4#\"\nIPv6: \"#SERVER.IPV6#\"\nCPU: \"#SERVER.CPU#\"\n内存: \"#SERVER.MEM#\"\n交换分区: \"#SERVER.SWAP#\"\n存储: \"#SERVER.DISK#\"\n实时上传速度: \"#SERVER.NETINSPEED#\"\n实时下载速度: \"#SERVER.NETOUTSPEED#\"\n总上传: \"#SERVER.TRANSFERIN#\"\n总下载: \"#SERVER.TRANSFEROUT#\"\n1分钟内负载: \"#SERVER.LOAD1#\"\n5分钟内负载: \"#SERVER.LOAD5#\"\n15分钟内负载: \"#SERVER.LOAD15#\"\nTCP连接数: \"#SERVER.TCPCONNCOUNT\"\nUDP连接数: \"#SERVER.UDPCONNCOUNT\"",
					"tag": "lark_md"
				}
			},
			{
				"tag": "hr"
			},
			{
				"tag": "note",
				"elements": [{
						"tag": "img",
						"img_key": "img_v3_0292_406c7625-aa02-4001-945c-2c63e7c92feg",
						"alt": {
							"tag": "plain_text",
							"content": ""
						}
					},
					{
						"tag": "plain_text",
						"content": "离线通知"
					}
				]
			},
			{
				"tag": "action",
				"actions": [{
					"tag": "button",
					"text": {
						"tag": "plain_text",
						"content": "查看服务器"
					},
					"type": "primary",
					"multi_url": {
						"url": "https://vps.narutos.top/",
						"pc_url": "",
						"android_url": "",
						"ios_url": ""
					}
				}]
			}
		],
		"header": {
			"template": "red",
			"title": {
				"content": "#NEZHA#",
				"tag": "plain_text"
			}
		}
	}
}
0

评论区