1.1.1 • Published 3 years ago

hubot-immail v1.1.1

Weekly downloads
1
License
MIT
Repository
-
Last release
3 years ago

What about start using imMail and Hubot? We can help you. imMail SDK for Hubot is an adapter that connects your Hubot scripts to your imMail team, giving you guys a new fellow: your own bot.

What is Hubot and when should I use it? In short, it makes developing ChatOps-style bots quicker and easier. It’s an application you host on a server wherever you need to and he will listen to the channels he is allowed to on imMail and behaves however you script it to.

Basic Setup

To get started, you’ll need Node.js installed.

You will first want to create a new Hubot project. The simplest way is to use your computer’s terminal app to install Yeoman, a handy tool that builds projects from a template. We’ll also install the the template for Hubot projects, generator-hubot.

npm install -g yo generator-hubot

Now we can create that Hubot project:

mkdir my-hubot && cd my-hubot
yo hubot --adapter=immail

Yeoman will ask you a few easy questions about your project and fill your directory with a Hubot app, ready to run.

Getting Bot credentials

By definition, a bot is a user like any other. So, at this moment, before you start running your new bot, create a new user account on imMail. We do not recommend use your own imMail account for this.

Coming soon a little smarter way to create your bots accounts without doing this all process.

Running Hubot

Set env variables

export HUBOT_IMMAIL_USER=mybot@company.com
export HUBOT_IMMAIL_PASS=123456

If you want to connect in another environment, an on-premise for instance, add this 2 more variables

export HUBOT_IMMAIL_API_HOST=https://api.yourcompany.com
export HUBOT_IMMAIL_WEBSOCKET_HOST=https://websocket.yourcompany.com    

Run the command below:

./bin/hubot --adapter immail

You can set the env vars inline too, like this:

HUBOT_IMMAIL_USER=mybot@company.com HUBOT_IMMAIL_PASS=123456 ./bin/hubot --adapter immail

About Hubot scripts

Hubot has many pre-written scripts that you can easy add by naming them in external-scripts.json. Take a look at all the possibilites with the hubot-scripts keyword in npm.

You can jump into writing your own scripts by modifying scripts/example.coffee ( you can use javascript for this too ;) ). It had tons of helpful comments to guide you. You might also find the Hubot scripting docs useful.

1.1.1

3 years ago

1.1.0

3 years ago

1.0.20

4 years ago

1.0.19

4 years ago

1.0.18

4 years ago

1.0.17

4 years ago

1.0.16

4 years ago

1.0.15

4 years ago

1.0.14

4 years ago

1.0.13

4 years ago

1.0.12

4 years ago

1.0.11

4 years ago

1.0.9

4 years ago

1.0.10

4 years ago

1.0.8

4 years ago

1.0.7

4 years ago

1.0.6

4 years ago

1.0.5

4 years ago

1.0.4

4 years ago

1.0.3

4 years ago

1.0.2

4 years ago

1.0.1

4 years ago

1.0.0

4 years ago