Skip to content

Hubot adapter for Mattermost using Web API and Websockets

License

Notifications You must be signed in to change notification settings

loafoe/hubot-matteruser

Folders and files

NameName
Last commit message
Last commit date

Latest commit

author
Andy Lo-A-Foe
Feb 15, 2016
80a9f72 · Feb 15, 2016

History

16 Commits
Feb 15, 2016
Feb 10, 2016
Feb 12, 2016
Feb 10, 2016
Feb 14, 2016
Feb 15, 2016

Repository files navigation

Downloads Version Licence

hubot-matteruser

Hubot Adapter for Mattermost using the Web API and Websockets.

Description

Use this Hubot Adapter to connect to your Mattermost server. You can invite your bot to any channel just as a regular user. It will listen and perform your commands. The adapter uses mattermost-client for all low level Mattermost communication.

Installation

Creating a bot from scratch is easy:

npm install -g yo generator-hubot
yo hubot --adapter matteruser

Follow the instructions to set up your bot.

Environment variables

The adapter requires the following environment variables to be defined before your Hubot instance will start:

Variable Required Description
MATTERMOST_HOST Yes The Mattermost host e.g. mm.yourcompany.com
MATTERMOST_GROUP Yes The team/group on your Mattermost server e.g. core
MATTERMOST_USER Yes The Mattermost user account name e.g. hubot
MATTERMOST_PASSWORD Yes The password of the user e.g. s3cr3tP@ssw0rd!
MATTERMOST_WSS_PORT No Overrides the default port 443 for websocket (wss://) connections

Example

The below example assumes you have created a user hubot@yourcompany.com with username hubot and password s3cr3tP@ssw0rd! on your Mattermost server in the core team reachable on URL https://mm.yourcompany.com/core

export MATTERMOST_HOST=mm.yourcompany.com 
export MATTERMOST_GROUP=core
export MATTERMOST_USER=hubot@yourcompany.com
export MATTERMOST_PASSWORD=s3cr3tP@ssw0rd!

Known limitations

Only https is supported at this time. Go check out Let's Encrypt if you need a certificate.

License

The MIT License. See LICENSE file.