node-red-contrib-slackbotsdk

This package implements a slackbot for node-red using the official Slack Developer Kit for Node.js

Getting started

You will need to:

  • create a bot for you slack team to get a token
  • install node-red-contrib-slackbotsdk using npm
  • get going!
  • p.s. you need to invite the bot into a channel

Install

Run the following command in your Node-RED user directory - typically ~/.node-red

npm install node-red-contrib-slackbotsdk

[{"id":"1d4829a6.6aa586","type":"tab","label":"Flow 1","disabled":false},{"id":"baf3ec3e.50bc8","type":"slackbot in","z":"1d4829a6.6aa586","name":"","token":"a7e55e6.54507a","x":720,"y":120,"wires":[["bf5d7d2f.2fb"]]},{"id":"bf5d7d2f.2fb","type":"change","z":"1d4829a6.6aa586","name":"Echo","rules":[{"t":"set","p":"payload","pt":"msg","to":"This is a test reply","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":610,"y":380,"wires":[["baf3ec3e.50bc8"]]},{"id":"895ba886.b35758","type":"inject","z":"1d4829a6.6aa586","name":"","topic":"","payload":"node-red slackbot is here","payloadType":"str","repeat":"","crontab":"","once":false,"x":170,"y":139,"wires":[["fb623394.7c9ac"]]},{"id":"fb623394.7c9ac","type":"change","z":"1d4829a6.6aa586","name":"","rules":[{"t":"set","p":"channel","pt":"msg","to":"channelID","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":460,"y":100,"wires":[["baf3ec3e.50bc8"]]},{"id":"a7e55e6.54507a","type":"slackbot-token","z":"","name":"Testbot","token":"configure token here"}]
joshendriks

Flow Info

created 2 weeks, 6 days ago

Node Types

Core
  • change (x2)
  • inject (x1)
Other
  • slackbot in (x1)
  • slackbot-token (x1)
  • tab (x1)

Tags

  • slack
  • bot
  • sdk
Copy this flow JSON to your clipboard and then import into Node-RED using the Import From > Clipboard (Ctrl-I) menu option