· Ilya Kaminsky  · 1 min read

Creating a Daily Comic Slack Bot

When it comes to task automation, few tools are as powerful as bots. Yet, not all bots have to solve serious business problems. Some can be…

When it comes to task automation, few tools are as powerful as bots. Yet, not all bots have to solve serious business problems. Some can be…

When it comes to task automation, few tools are as powerful as bots. Yet, not all bots have to solve serious business problems. Some can be fun. In this article, I am going to show you how to deploy a simple bot that posts a daily Dilbert comic to a Slack channel. The source code is available on GitHub.

Slack Integration

  1. Create a new Incoming WebHook on the Custom Integrations page
  2. Copy and save the Webhook URL
    It should start with https://hooks.slack.com
    You’ll need it for the commands below

Deploy Bot with Zeit’s Now

  1. Download “Δ now” from Zeit.co
    Alternatively, install it with npm (npm install now -g)
  2. Deploy the application with the environment flag
    now -e SLACK_WEBHOOK_URL=<URL from #2 above>

And that’s it!

If you want to deploy my version of the bot, so that it posts to the #dilbert channel every day at 15:00 UTC (7am PST / 10am EST), you can do it with one simple command:

now deploy \  -e SLACK_WEBHOOK_URL=[CHANGE ME] \  https://github.com/ilyakam/dilbertbot

Remember to substitute [CHANGE ME] with your SLACK_WEBHOOK_URL in the command above.

    Share:
    Back to Blog

    Related Posts

    View All Posts »
    Deploying AI to the Cloud

    Deploying AI to the Cloud

    This is a tale of the hurdles I had to overcome in my pursuit of deploying an artificial intelligence based program to the cloud…