contentrules.slack
Post a message to Slack whenever something happens in your Plone site.
contentrules.slack adds a Post a message to Slack action to Plone's content rules. Pick any event Plone content rules support — a page is published, content is removed, a user logs in — and your team hears about it in the Slack channel of your choice, with the details that matter.
Why use it
- No code. Site administrators set up notifications from the Content Rules control panel, in Volto or Classic UI.
- Messages with context. Use
${...}variables, such as${title},${absolute_url},${review_state_title}, or${user_fullname}, to say what changed, where, and who changed it. - Scoped to where it matters. Assign a rule to the whole site, or only to one folder.
- Never slows editors down. Messages are sent in the background, so publishing never waits for Slack, and never fails because of it.
- Safe for staging. Set one environment variable to silence every notification on a development or staging copy of your site.
Features
- A content rule action, available for every triggering event and content type.
- Slack message attachments with pretext, title and link, text, color, and a table of fields.
- Failed deliveries logged to the Plone log, without leaking the webhook address.
- A Python API,
notify_slack, to post to Slack from your own code. - A user interface in English, Brazilian Portuguese, German, and Spanish.
Compatibility
| contentrules.slack | Plone | Python |
|---|---|---|
| 3.x | 6.2 | 3.10 to 3.14 |
| 3.x | 6.1 | 3.10 to 3.13 |
| 2.x | 6.0 | 3.8 to 3.11 |
Installation
Add contentrules.slack to the dependencies of your Plone project, for example in its pyproject.toml:
[project]
dependencies = [
"Products.CMFPlone",
"contentrules.slack",
]
Or install it with pip, in the same Python environment as Plone:
pip install contentrules.slack
Restart Plone. There is nothing to activate in the Add-ons control panel: Post a message to Slack is now available in Site Setup → Content Rules.
Quick start
- Create an incoming webhook in Slack.
- In Site Setup → Content Rules, add a rule, and choose its triggering event.
- Add the Post a message to Slack action, and paste the webhook address.
- Assign the rule to the whole site, or to a folder.
The documentation walks you through each step, with screenshots, for Volto and Classic UI.
Configuration
| Environment variable | Effect |
|---|---|
DEACTIVATE_SLACK_NOTIFICATION |
Set to deactivate to stop the whole instance from posting to Slack. |
SLACK_WEBHOOK_URL |
Webhook used by notify_slack calls that do not pass one. |
Both are read once, at startup. See the configuration reference for details.
Documentation
The full documentation is at https://collective.github.io/contentrules.slack/.
- How-to guides: install the add-on, and create rules in Volto or Classic UI.
- Reference: every field of the action, the settings, and the Python API.
- Explanation: how messages are delivered, and what happens when Slack fails.
Contributing
To set up a development environment, you need uv, Make, and Git.
git clone https://github.com/collective/contentrules.slack.git
cd contentrules.slack
make install
make test
License
This project is licensed under the GNU General Public License, version 2.
Credits
Originally made in Berlin by Briefy and Pendect.
Now maintained by the Plone Collective.
Changelog
3.0.0 (2026-09-29)
Breaking
- Drop support for Plone 6.0 and Python 3.8 and 3.9. This package now requires Plone 6.1 or later, and Python 3.10 or later. @ericof #14
Feature
- Log failed Slack notifications -- an error status, a timeout or a connection error -- to the
contentrules.slacklogger, instead of losing them in the background thread. The webhook URL is left out of the log message. @ericof #17
Bugfix
- Add the missing space between the two sentences of the "Fields" help text, and update the translations to match. @ericof #18
Internal
- Modernize the package with the cookieplone
backend_addontemplate:pyproject.tomlwith hatchling, and a Makefile using uv and mxdev. Declare theprettyconfdependency explicitly. @ericof #14 - Add type hints and reStructuredText docstrings to the whole codebase, and check types with
mypyagainstplone-stubs(make mypy, also run bymake lint). @ericof #15 - Label Dependabot pull requests, and exempt them from the change log check. @ericof #20
Documentation
- Rewrite the documentation following the Diátaxis framework, with how-to guides, a reference for the action, its configuration and its Python API, and an explanation of how messages are delivered. Publish it again on GitHub Pages, and rewrite the README for PyPI. @ericof #19
Tests
- Reorganize the test suite, add end-to-end tests running a content rule with a Slack action on a real event, and require at least 95% test coverage. @ericof #16
2.0.2 (2023-04-04)
-
Use
requestsinstead ofhttpx, as the former is already distributed with Plone. [ericof] -
Update Sphinx theme used in the documentation [ericof]
2.0.1 (2023-03-10)
-
Use
pytest_plone[ericof] -
Deploy documentation to https://collective.github.io/contentrules.slack [ericof]
2.0.0 (2023-02-07)
-
Use
pytestinstead ofunittest[ericof] -
Drop dependency on
ftw.slacker[ericof] -
Drop support to Plone 5.2 [ericof]
-
Support to Plone 6.0, Python 3.8 to 2.11 [ericof]
-
Update documentation [ericof]
1.0.1 (2020-04-25)
- Fix "TypeError: expected string or bytes-like object" when one attribute of action is not set. [ericof]
1.0.0 (2019-11-28)
-
Add Plone 5.2 / Python 3 support. [ericof]
-
Drop Python 2.7 support. [ericof]
1.0.0a1 (2017-10-17)
- Initial release. [ericof]
Metadata
Release files for contentrules.slack 3.0.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| contentrules_slack-3.0.0.tar.gz | 1.9 MB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| contentrules_slack-3.0.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 1.9 MB
Release files / contentrules_slack-3.0.0.tar.gz
| Download URL | contentrules_slack-3.0.0.tar.gz |
|---|---|
| Size | 1.9 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
38ee440aeb38882e23ab72aa7033588e65e76600b01ca23a005c726507245c85
|
|
BLAKE2b-256 checksum How to use checksums |
6fe24f98a628e96c364362a10521bdd3a051de486ee40e2b7fe90dfe9d21c45a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.14.3
|
Release files / contentrules_slack-3.0.0-py3-none-any.whl
| Download URL | contentrules_slack-3.0.0-py3-none-any.whl |
|---|---|
| Size | 41.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
8e55e864502f1983a2db08bc1e79a5f2c040ebb5b7d953bd3ddf98545117e53e
|
|
BLAKE2b-256 checksum How to use checksums |
2d5ce6f6cbbbfc06342da8bd9ca596affa9c14f7af65e1151673c16dddd38e98
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.14.3
|