From 61c1b0e06504fca8fc35c41a7bb15130e7c08f24 Mon Sep 17 00:00:00 2001 From: moonrailgun Date: Wed, 19 Jun 2024 23:42:49 +0800 Subject: [PATCH] docs: add webhook document --- website/docs/notification/webhook.md | 43 ++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 website/docs/notification/webhook.md diff --git a/website/docs/notification/webhook.md b/website/docs/notification/webhook.md new file mode 100644 index 0000000..838fa4a --- /dev/null +++ b/website/docs/notification/webhook.md @@ -0,0 +1,43 @@ +--- +sidebar_position: 5 +--- + +# Webhook + +If you need a more flexible notification method, you can try using custom webhooks to notify your messages. This way, you can integrate Tianji's notifications into any system. + +### Example Result + +```json +{ + "notification": { + "workspaceId": "xxxxxxxxxxx", + "name": "New Notification", + "type": "webhook", + "payload": { + "webhookUrl": "example.com" + } + }, + "title": "New Notification Notification Testing", + "content": "Tianji: Insight into everything\\nThis is Notification Testing from New Notification\\n[image]", + "raw": [ + { + "type": "title", + "level": 2, + "content": "Tianji: Insight into everything" + }, + { + "type": "text", + "content": "This is Notification Testing from New Notification" + }, + { + "type": "newline" + }, + { + "type": "image", + "url": "https://tianji.msgbyte.com/img/social-card.png" + } + ], + "time": "2024-06-19T15:41:09.390Z" +} +```