📎 Webclip
Slack on Rails
Slack can be used as an interface to internal services, and the post argues that this is easier than it was with Campfire and Hubot. It focuses on simple command-and-response integrations and says that Slash Commands and Outgoing WebHooks are the right fit for that use case.
Reading notes #
- Slack improves on Campfire by making chatroom integrations much more powerful.
- Outgoing WebHooks let an app receive Slack messages and reply publicly in the channel.
- Slack can be configured to receive messages that start with a trigger word or all messages from one channel.
- Slash Commands let an app receive command messages and reply privately to the user.
- A Rails app can be updated with Slack integration endpoints by storing Slack tokens, adding a route, and handling requests in a controller.
- The controller checks for a
:commandparameter to distinguish Slash Commands from normal Slack messages. - A separate responder object turns the incoming message into the reply text.