@runnerty/notifier-slack

3.1.0 • Public • Published

Smart Processes Management

NPM version Downloads Dependency Status code style: prettier

Slack notifier for Runnerty:

Installation:

Through NPM

npm i @runnerty/notifier-slack

You can also add modules to your project with runnerty

npx runnerty add @runnerty/notifier-slack

This command installs the module in your project, adds example configuration in your config.json and creates an example plan of use.

If you have installed runnerty globally you can include the module with this command:

runnerty add @runnerty/notifier-slack

Configuration sample:

Add in config.json:

{
  "notifiers": [
    {
      "id": "slack_default",
      "type": "@runnerty-notifier-slack",
      "token": "MY_BOT_TOKEN",
      "bot_name": "Runnerty-Sentinel",
      "channel": "MY_CHANNEL",
      "maxConcurrents": 1,
      "minInterval": 600
    }
  ]
}

Plan sample:

Add in plan.json:

  • Simple
{
  "id": "slack_default",
  "bot_emoji": ":metal:",
  "channel": "MY_CHANNEL",
  "message": "PROCESS *:PROCESS_ID* OF CHAIN :CHAIN_ID RUNNING!"
}
  • Attachments
{
  "id": "slack_default",
  "bot_name": "Runnerty Bot",
  "bot_emoji": ":metal:",
  "channel": "MY_CHANNEL",
  "attachments": [
    {
      "fallback": "Required plain-text summary of the attachment.",
      "color": "#36a64f",
      "pretext": "Simple sample pretext",
      "author_name": "Runnerty Bot",
      "author_link": "https://github.com/runnerty/notifier-slackhttp://runnerty.io",
      "author_icon": "https://runnerty.io/assets/header/logo-stroked.png",
      "title": "Slack attachment sample",
      "title_link": "https://api.slack.com/docs/messages/builder",
      "text": "More info",
      "fields": [
        {
          "title": "Priority",
          "value": "High",
          "short": false
        }
      ],
      "image_url": "http://my-website.com/path/to/image.jpg",
      "thumb_url": "https://runnerty.io/assets/header/logo-stroked.png",
      "footer": "Runnerty Notifier Slack Sample",
      "footer_icon": "https://runnerty.io/assets/header/logo-stroked.png"
    }
  ]
}
  • Upload File
{
  "id": "slack_default",
  "bot_emoji": ":metal:",
  "channel": "MY_CHANNEL",
  "message": "PROCESS *:PROCESS_ID* OF CHAIN :CHAIN_ID RUNNING!",
  "file": "./resume.csv"
}

Versions

Current Tags

VersionDownloads (Last 7 Days)Tag
3.1.01latest

Version History

VersionDownloads (Last 7 Days)Published
3.1.01
3.0.10
3.0.00
1.0.00

Package Sidebar

Install

npm i @runnerty/notifier-slack

Weekly Downloads

1

Version

3.1.0

License

MIT

Unpacked Size

10 kB

Total Files

10

Last publish

Collaborators

  • coderty