Command-line Matrix notify tool and Flask application to provide a webhook for Matrix notifications.
Go to file
2020-04-03 16:41:11 +02:00
.idea Add basic prometheus webhook support 2020-04-03 16:32:17 +02:00
.gitignore Add debug version of simple webhook-server 2019-07-18 14:45:03 +02:00
Dockerfile Add example Dockerfile 2019-07-19 16:16:48 +02:00
LICENSE Init. Add readme, license and gitignore 2019-07-18 13:19:03 +02:00
notify.py Add runnable script for notification 2019-10-09 14:36:25 +02:00
README.md Updated README 2019-08-09 13:29:42 +02:00
requirements.txt Add debug version of simple webhook-server 2019-07-18 14:45:03 +02:00
testrequest.json Added json test request and how to testing 2019-08-08 10:05:00 +02:00
wmn.py Support room alias supplied via channel arg 2020-04-03 16:41:11 +02:00

Webhook Matrix Notifier

Takes notifications via webhook, checks a secret and notifies a Matrix channel. Listens to HTTP only. Should be used behind a reverse-proxy with HTTPS.

Testing the Hook locally

  • Start the webserver locally by env FLASK_APP=wmn.py flask run
    • Or have your IDE do it for you
  • Send a POST request using curl curl -i -X POST "localhost:5000/matrix?channel=%21yhEUnvhAZZFKRStdXb%3Amatrix.org" -H "X-Gitlab-Event: Push Hook" -H "X-Gitlab-Token: ..." -H "Content-Type: application/json" --data-binary @./testrequest.json
    • The part after channel= is the room ID which can retrieved from Matrix channels you are part of
    • %21 escapes ! in URI
    • %3A escapes : in URI
    • The X-Gitlab-Token must correspond to the one provided in config.yaml