-
-
Notifications
You must be signed in to change notification settings - Fork 584
Setup notification
Most notification channels support sending messages via their own HTTPS API. You have these options, and you need to refer to the documentation for the notification channel of your choice to fill in them. Optionally, you can setup multiple webhooks by providing an array.
Below are configuration references for some common notification channels:
First, you need to refer to this document to obtain your own bot_token and chat_id. Assuming your bot_token is 123456:ABCDEF and your chat_id is 5678, you should configure the webhook as follows.
webhook: {
url: 'https://api.telegram.org/bot123456:ABCDEF/sendMessage',
payloadType: 'param',
payload: {
chat_id: 5678,
text: '$MSG'
},
},Get your own Webhook URL following this doc, assuming it's https://qyapi.weixin.qq.com/cgi-bin/webhook/send?key=abcd.
webhook: {
url: 'https://qyapi.weixin.qq.com/cgi-bin/webhook/send?key=abcd',
payloadType: 'json',
payload: {
msgtype: 'text',
text: {
content: '$MSG'
}
}
},webhook: {
url: 'https://api.pushover.net/1/messages.json',
payloadType: 'x-www-form-urlencoded',
payload: {
token: 'YOUR_TOKEN_HERE',
user: 'YOUR_USER_KEY',
message: '$MSG',
},
}UptimeFlare used to use Apprise to send notifications. However, this requires introducing external dependencies and is not the most elegant solution.
If you a) don't know how to configure the webhook mentioned above, or b) your chosen notification channel doesn't support the HTTPS API, you can still use the Apprise method described here.
(For existing users who deployed before 2025/10/15, you don't need to redeploy Apprise, but you must update your configuration file.)
To setup:
-
Click the button below to deploy apprise on your Vercel account.
-
After deploying, you will get a link like
https://testapprise-lyc8503s-projects.vercel.app/, appending/notifyto it, and you get the link to the Apprise API server: https://testapprise-lyc8503s-projects.vercel.app/notify -
Write the URL for sending notifications according to the Apprise wiki, which has detailed documentation and instructions on how to set up each notification channel. e.g. For matrix, your URL is
matrix://{user}:{password}@{matrixhost}/#{room_alias}.If you have multiple recipents, you can use a comma
,to seperate them. -
Fill in the
webhookconfiguration as follows:
webhook: {
url: 'https://testapprise-lyc8503s-projects.vercel.app/notify',
payloadType: 'json',
payload: {
urls: 'matrix://{user}:{password}@{matrixhost}/#{room_alias}',
body: '$MSG'
},
},If you know the javascript language, you can use the fetch API in workerConfig.callbacks to request the webhook you need and achieve fully customizable request and notification content. Logs printed in the callback using console.log can be viewed in the Cloudflare Dashboard.
WARNING: Prolonged blocking or excessive CPU time usage in callbacks can cause the entire monitoring to become abnormal. If you don't know how to debug this situation, don't modify the callbacks, use the methods above.