Set up Mattermost Notify
If you have not set up the Notify Bot yet, please refer to the Notify Bot Setup documentation.
Once you have your Bot ready you can start using the Mattermost Notify package.
1. Install the Mattermost Notify package
The package can be installed via pip:
# (yep it's in reverse since another project already used the name on PyPi 😅)
pip install notify-mattermost
2. Set up the connection to your Mattermost server
To allow the Mattermost Notify package to connect to your Mattermost server, you need to provide the Bot’s token and the server URL. There is an interactive dialog that you can run by typing:
mattermost-notify setup
Alternatively you can provide the required inputs directly from command-line like should
mattermost-notify setup --token <your_token> --url <your_server_url> --team-name <the name of your team>
Note
The –url should include the protocol (e.g. https://) at the beginning.
You can test the connection by running:
mattermost-notify test
To test if your connection also works you can try sending a message to your user account
mattermost-notify send "this is a test" --user <your_username>
If you have set up the Notify Bot correctly, you should receive a direct message in your Mattermost application or browser session.