Serverless Slack Bots Jason Tokoph Tweet

As we mentioned in a previous blog post, Blockspring loves Slack. At the time of writing we have 42 configured Slack integrations. 16 of which are Outgoing Webhook Integrations, all running on the Blockspring platform. We have a healthy mix of bots for both business and pleasure.

One of our bots looks up Blockspring user info:

Another bot will hail an Uber for us:

The coolest aspect of these bots is that they don't require a server or extra software to run. All you need to do to create a new bot is clone an existing bot and change a few lines of code. The webhook URL is automatically created and no servers or software need to be deployed.

Build a bot in 2 Minutes

We've published a few bot templates for you to clone. There is a hello world template for every language we support on Blockspring:

Each template has a webhook method that you can customize for your bot. By default, the templates just echo back the command given without customizing any bot settings like bot name, icon or attachments. There are placeholders for these settings in the templates and you can follow the Slack Attachment Docs if you need to add attachments.

Here is a walkthrough of creating a Youtube search bot

If you can't watch the video

Clone a template function (Javascript, PHP, Python, R, Ruby) Edit the webhook method to generate a new response Publish the Function Copy the Webhook URL from the "Integrations" tab. Add a new outgoing webhook in Slack Try it out!

Example Bots

Here are some public prebuilt bots that are ready to go out of the box. Just copy the webhook URL from the Blockspring page for each bot and point a new Outgoing Webhook to it. These serve as some pretty good examples of how you can build your own bot.

Contribute to the Community

Let us know if you build a cool Slack bot on Blockspring. We are a community driven platform and we would love to showcase the work of contributors on our blog.

If you have any questions, comments or slick ideas for improvement send me an email at jason@blockspring.com