@dgsh/processus-handler-slack
Slack handler for Processus
Last updated 2 years ago by dominicporteous .
MIT · Original npm · Tarball · package.json
$ cnpm install @dgsh/processus-handler-slack 
SYNC missed versions from official npm registry.

processus version (v2.0.0) npm node version (v10.9.0) code style - prettier license (MIT)

Processus Slack Message Handler

A Processus handler for sending messages to Slack via its Incoming WebHook add-on

Using the Processus handler for Slack is relatively simple. Choose one of the installation options below and then invoke from your project using the API or from the command line (example below).

Make sure you have the an Incoming Webhook configured for your Slack team and you know the URL.

See https://api.slack.com/incoming-webhooks for more information.

Compatibility

Ensure that at least your major version of @dgsh/processus-handler-slack matches the versions for @dgsh/processus.

Example

npm install --save @dgsh/processus@2.0.0
npm install --save @dgsh/processus-handler-slack@2.0.0
npm install --save @dgsh/processus@1.2.0
npm install --save @dgsh/processus-handler-slack@1.0.0

Installation

If you haven't already, install Processus

npm install --save @dgsh/processus@2.0.0

Install this handler

npm install --save @dgsh/processus-handler-slack@2.0.0

Testing the Example

Set up an incoming webhook integration in your Slack team as mentioned in https://api.slack.com/incoming-webhooks and make a note of the webhookURL and channel you wish to use.

Configure the example

Update the [webhookURL] and [#channel or @user] according to your slack team.

---
  name: "Demo Slack"
  description: "A demo showing the use of the slack handler to make a incoming webhook call."
  tasks:
    Send a message to Slack's incoming WebHook.:
      blocking: true
      handler: "processus-handler-slack"
      properties:
        webhookURL: "[webhookURL]"
        payload:
          username: "processus"
          channel: "[#channel or @user]"
          text: "Hi from Processus https://github.com/cloudb2/processus-handler-slack\n\nMessage sent from workflow $[id]"
          icon_url: "https://slack.com/img/icons/app-57.png"
          unfurl_links: true

Example Usage from CLI

./node_modules/.bin/processus -l info -f example.yml

You should see something similar to the following on the command line

info: Reading workflow file [example.yml]
info: Starting task [Send a message to Slack's incoming WebHook.]
info: Workflow [example.yml] with id [f1ed1989-2d36-473d-b0b6-ce5fad3b897c] completed successfully.

In your slack team and channel you should a message.

Slack Message

See the Slack Incoming Webhooks for more details on how this can be used.

Current Tags

  • 2.0.0                                ...           latest (2 years ago)

3 Versions

  • 2.0.0                                ...           2 years ago
  • 1.0.1                                ...           2 years ago
  • 1.0.0                                ...           2 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 3
Last Day 0
Last Week 3
Last Month 2
Dependencies (1)
Dev Dependencies (1)
Dependents (1)

Copyright 2014 - 2016 © taobao.org |