npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

processus-handler-slack

v0.0.5

Published

A Processus handler to send messages to Slack via its incoming WebHook

Downloads

177

Readme

processus-handler-slack

A Processus handler to send messages to Slack via its incoming WebHook

Node version NPM version License MIT

Getting Started

Using the Processus handler for Slack's incoming webhooks 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.

Installation

There are 2 options:

Using NPM

If you haven't already, install Processus

npm install --save processus

Then install this handler

npm install --save processus-handler-slack

Clone this repo

git clone https://github.com/cloudb2/processus-handler-slack
cd processus-handler-slack
npm install

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.

Note If you cloned the repo change the handler property processus-handler-slack to ../../../processus-handler-slack

---
  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/processus/bin/processus-cli -l info -f example.yml

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


  ____  ____   __    ___  ____  ____  ____  _  _  ____
 (  _ \(  _ \ /  \  / __)(  __)/ ___)/ ___)/ )( \/ ___)
  ) __/ )   /(  O )( (__  ) _) \___  \___ \) \/ (\___ \
 (__)  (__\_) \__/  \___)(____)(____/(____/\____/(____/

           Processus: A Simple Workflow Engine.

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

In your slack team and channel you should a message. Slack Message

That's it!

See the Slack Incoming Webhooks and Processus User Guide for more details on how this can be used.