# hubot-immail

> hubot adapter for imMail

Latest version **1.1.1** (published 2021-01-26) · MIT license · 0 weekly downloads

## Install

```sh
npm install hubot-immail
pnpm add hubot-immail
yarn add hubot-immail
bun add hubot-immail
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.1.1 |
| Published | 2021-01-26 |
| First published | 2020-05-13 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 3 |
| Unpacked size | 10.3 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | imMail Team |
| Maintainers | rmsouza |
| Keywords | hubot, immail |

## Links

- npm: https://www.npmjs.com/package/hubot-immail
- npm.io page: https://npm.io/package/hubot-immail

## Dependencies (3)

- [hubot](https://npm.io/package/hubot.md) ^3.3.2
- [@immail/web-api](https://npm.io/package/@immail/web-api.md) 0.0.11
- [@immail/realtime-api](https://npm.io/package/@immail/realtime-api.md) 0.0.6

## Alternatives

- [@expo/fingerprint](https://npm.io/package/@expo/fingerprint.md) — 6.2M weekly downloads
- [@azure/monitor-opentelemetry-exporter](https://npm.io/package/@azure/monitor-opentelemetry-exporter.md) — 850.0K weekly downloads
- [@azure/monitor-opentelemetry](https://npm.io/package/@azure/monitor-opentelemetry.md) — 624.0K weekly downloads
- [@posthog/ai](https://npm.io/package/@posthog/ai.md) — 423.3K weekly downloads
- [fakefilter](https://npm.io/package/fakefilter.md) — 63.9K weekly downloads

## Recent versions

- 1.1.1 (latest) — 2021-01-26
- 1.1.0 — 2021-01-26
- 1.0.20 — 2020-08-01
- 1.0.19 — 2020-06-06
- 1.0.18 — 2020-05-20
- 1.0.17 — 2020-05-20
- 1.0.16 — 2020-05-20
- 1.0.15 — 2020-05-20
- 1.0.14 — 2020-05-20
- 1.0.13 — 2020-05-20
- 1.0.12 — 2020-05-20
- 1.0.11 — 2020-05-20
- 1.0.10 — 2020-05-20
- 1.0.9 — 2020-05-20
- 1.0.8 — 2020-05-20
- … 8 more at https://npm.io/package/hubot-immail/versions

## README

<h1 align="center">
  <img src="https://user-images.githubusercontent.com/279535/54444172-8e146800-4718-11e9-97ea-33baf30bc164.png" alt="logo" height="100"/>
  <img src="https://hubot.github.com/assets/images/layout/hubot-avatar@2x.png" alt="logo" height="100"/>
  <br>
  imMail SDK for Hubot
</h1>

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](https://immail.ca) team, giving you guys a new fellow: your own bot.

What is [Hubot](https://hubot.github.com/) 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](https://yeoman.io/), a handy tool that builds projects from a template. We’ll also install the the template for Hubot projects, `generator-hubot`.

```shell
npm install -g yo generator-hubot
```
Now we can create that Hubot project:

```shell
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

```shell
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**

```shell
export HUBOT_IMMAIL_API_HOST=https://api.yourcompany.com
export HUBOT_IMMAIL_WEBSOCKET_HOST=https://websocket.yourcompany.com    
```
Run the command below:

```shell
./bin/hubot --adapter immail
```
You can set the env vars inline too, like this:

```shell
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](https://github.com/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](https://hubot.github.com/docs/scripting/) useful.

---
_Source: https://npm.io/package/hubot-immail · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
