You first have to create a mattermost app to get credentials.
Once you have them you can add these to your
How to set up the outgoing webhook:
To create the Mattermost outgoing webhook, login to your Mattermost team site and go to Main Menu > Integrations > Outgoing Webhooks.
Click Add outgoing webhook.
Fill out the details including the channel you want the bot in. You will need to ensure the trigger words section is set up with
@yourbotnameso that the bot doesn’t trigger on everything that is said.
Make sure trigger when is set to value first word matches a trigger word exactly.
The callback url needs to be your ngrok url where you have your webhook running in Core or your public address, e.g.
For more detailed steps, visit the Mattermost docs.
Running on Mattermost¶
If you want to connect to the Mattermost input channel using the run script, e.g. using:
you need to supply a
credentials.yml with the following content:
mattermost: url: "https://chat.example.com/api/v4" team: "community" user: "firstname.lastname@example.org" pw: "password"
The endpoint for receiving Mattermost channel messages
/webhooks/mattermost/webhook. This is the url you should
add in the Mattermost outgoing webhook.