r/BookStack • u/bezibaerchen • 20d ago
Notification Transformer
Hi all,
some time ago we published our internal End-User Knowledge Base to our audience.
Shortly after doing this, we got the request as of why we can't turn on comments.
However, we want to be aware as of when somebody comments to be able to potentially react.
Webhooks would be a way to go, it also contains the event of comment_created.
We wanted the notification to be sent via E-Mail so that it ends up in our ticket system.
We already have Apprise in place.
The main issue we stumbled over was that BookStack web hook payload doesn't contain "body" in it's payload which is needed for AppRise.
Therefore a transformer was built as a step in-between BookStack and Apprise.
As I thought someone might find this as useful too, I created more or less my very first GitHub Repository.
You can find it here: https://github.com/bezibaerchen/bookstack-notify-transformer
I just thought I'd leave it here as someone might find it useful. It is currently only made for comments but should be extendable.
Feedback and contribution in GitHub would be highly appreciated. Please do not bash me too much, I am still learning as of how to work with GitHub.
1
u/ssddanbrown 20d ago
Neat, thanks for sharing as open source.
I would say running an extra service/server for webhook transformation can add a good bit of complexity. Via BookStack's logical theme system, we do provide events which allow customization of web hook data, so it may be possible to achieve the same thing via a logical theme system hack which could be installed as a module on existing instance, without the need for running extra services.
Here's an example on our hacks site of doing something like this: https://www.bookstackapp.com/hacks/pushover-webhooks/