# serverless-plugin-notification

> Plugin for serverless framework that notify framework actions to multiple platforms

Latest version **1.3.1** (published 2019-09-09) · MIT license · 0 weekly downloads

## Install

```sh
npm install serverless-plugin-notification
pnpm add serverless-plugin-notification
yarn add serverless-plugin-notification
bun add serverless-plugin-notification
```

## 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.3.1 |
| Published | 2019-09-09 |
| First published | 2017-07-05 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 2 |
| Unpacked size | 12.1 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 7 |
| Author | James Nguyen |
| Maintainers | blackevil245 |

## Links

- npm: https://www.npmjs.com/package/serverless-plugin-notification
- Repository: https://github.com/maasglobal/serverless-plugin-notification
- Homepage: https://github.com/maasglobal/serverless-plugin-notification#readme
- Issues: https://github.com/maasglobal/serverless-plugin-notification/issues
- npm.io page: https://npm.io/package/serverless-plugin-notification

## Dependencies (2)

- [bluebird](https://npm.io/package/bluebird.md) ^3.5.0
- [request-promise-lite](https://npm.io/package/request-promise-lite.md) 0.9

## Recent versions

- 1.3.1 (latest) — 2019-09-09
- 1.3.0 — 2017-10-02
- 1.2.2 — 2017-09-29
- 1.2.1 — 2017-07-07
- 1.2.0 — 2017-07-06
- 1.0.0 — 2017-07-05

## README

# Serverless Plugin Notification

[![serverless](http://public.serverless.com/badges/v3.svg)](http://www.serverless.com)
[![npm version](https://badge.fury.io/js/serverless-plugin-notification.svg)](https://badge.fury.io/js/serverless-plugin-notification)

## Requirement
1. Serverless 1.x
2. Project setup for AWS provider

## Plugin installation
1. Open a terminal to your Serverless project
2. `npm install --save-dev serverless-plugin-notification`
3. Add `serverless-plugin-notification` in your `serverless.yml` file (see [Serverless docs](https://serverless.com/framework/docs/providers/aws/guide/plugins/#installing-plugins))
4. Follow platform specific installation
  - [Slack](#slack)
  - [Webhook](#webhook)

## Supported platforms

### Slack

#### Feature
1. Notify service deployment to predefined Slack channel with custom username. Supporting states
  - Deployment started
  - Deployment succeeded
  - Deployment failed (TODO)
2. Predefined message format - General info in post, function and endpoint listing in thread reply
3. Support Slack thread
4. Support automatically retrieving deployer name
5. EMOJIs !

#### Platform installation

In your `serverless.yml` fill the following configuration
```yaml
custom:
  notification:
    deployer: /* Default deployer name, if not automatically retrieve from local variable, if not default to 'Unnamed deployer' */
    slack:
      token: /* Your slack token here */ - Follow https://api.slack.com/bot-users to get bot access token
      channel:  /* Your channel name here */ e.g '#serverless' NOTE: Using direct message '@person' will have 'channel_not_found' error at `Deployment succeeded` and `Deployment failed`
      username: /* (Optional) Username that will be used to post the message */
```

### Webhook

#### Feature
1. Notify service deployment through http webhook POST using configurable url and headers. Supporting states:
  - Deployment started
  - Deployment succeeded
  - Deployment failed (TODO)

#### Missing pieces
1. `Content-Type` currently support only `application/json`
2. Does not support CORs

#### Plattform installation
In your `serverless.yml` fill the following configuration
```yaml
custom:
  notification:
    webhook:
      url: /* Your webhook url here */
      headers: /* Your headers here - Must be in object format */
        Content-Type: application/json
```

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