This simple Python-based Slack Bot uses Slack's Incoming WebHook to automagically post OpenProject Activities.
In other words: It makes it easy to get notifications about the latest updates in OP.
It is not a plugin for OpenProject. Instead, it relies on the external OpenProject resources (currently the Atom feed only).
- a 24/7 running web-server or PC (a Raspberry Pi would do the job, too!)
- Python 3.5/3.4 (tested) - may also work with >=3.0, but totally untested.
- OpenProject - tested with the Community Edition
- Slack with the Incoming WebHook Integration
- Edit the variables in
starter.py
. You'll need to configureSLACK_INCOMING_HOOK_URL
,OP_BASE_URL
,OP_PROJECT_ID
andOP_RSS_KEY
- Start the python script (it needs to be always running if you do not want to get in an unsynchronized state)
Q: Why not use the Slack RSS integration since OpenProject has an Atom feed?
A: There would be no dolphin! 😱
Just kidding. The real reasons:
- Configurable:
- message format/look is configurable by changing dictionary constants in
SlackMessageBuilder
- if you want extremely fresh updates every 5 seconds, simply change the
refresh_rate
constructor parameter inDolphinBot
!
- message format/look is configurable by changing dictionary constants in
- Extensible:
- maybe add OpenProject API support later?
util/op_projects_list.py
already contains an example on how to access the API - e.g. create more than one instance of the bot to watch multiple projects at one (by using threads)
- maybe add OpenProject API support later?
- Smart summary feature:
- allows the bot to collect many updates
- summarizes them in just one message to avoid "spamming" the slack channel
- More intelligent interpretation of the information
- Nicer look
- Test message look and feel: https://api.slack.com/docs/messages/builder
- Incoming WebHook: https://api.slack.com/incoming-webhooks