Some of my first experiments in the world of building a slack bot was to using the as a backend. If you or your team are the only users that intend to use it, you can just set it up as a simple integration. However if you wish to distribute it for others to use you can package it into a Slack bot.
An advantage of versus a slash command is the additional features of the Slack API you can leverage – in this example, the . That allows you to listen and respond to messages in real-time. I started out building this layer as a WordPress plugin so anyone could install the plugin and build a WP powered bot. Not only was that out of scope for a fun side project, Node is really the right tool for the job – asynchronous, great packages for the Slack API, easy to deploy and scale (because who doesn’t wan’t a Kramer bot).
If you are looking for an in-depth, step by step tutorial – check out .
Assuming you have , your first step is to setup a basic project and gather up some dependencies. This bot is essentially headless so no need for anything like Express to handle routing and no need for a view engine to render any pages. What we will need are two packages specifically – one for Slack and one for grabbing content from the WordPress backend via its REST API.
First off you need a way to talk to Slack, specifically the RTM API. The examples in this post use the which is a pretty simple Slack API client for Node.js. However, my next bot project will use (for reasons that belong in separate post). For WordPress, we’ll use a nice called wordpress-rest-api.
asl --save install wordpress-rest-api
eset endpoint security 5 offline update eset endpoint security 32 bit download