Webhook (on Cloudflare Workers) to Matrix instant messages
- I'm setting up notifications for my NAS;
- It doesn't suppport native Matrix notifications;
- The custom settings is not enough to handle such specific notification settings;
- So I wrote this tiny middleware.
- Method:
POST
- Content-Type:
application/json
- Body:
{
"homeserver": "YOUR_HOMESERVER_URL",
"token": "YOUR_ACCESS_TOKEN",
"room": "YOUR_ROOM_INTERNAL_ID",
"msg": "MESSAGE_TO_SEND"
}
- DISABLE encryption in your notification room cause it's too difficult for a bot to handle it :(
- Use a bot account, rather than your own account, for safety concerns.