Skip to content

Kévin Dunglas

Founder of Les-Tilleuls.coop (worker-owned cooperative). Creator of API Platform, Mercure.rocks, Vulcain.rocks and of some Symfony components.

Menu
  • Talks
  • Resume
  • Sponsor me
  • Contact
Menu

Stack2Slack: a Slack bot written in Go to monitor StackOverflow tags

Posted on October 2, 2017 by Kévin Dunglas
Screenshot of Stack to Slack

At Les-Tilleuls.coop, we use Slack to centralize our communications and notifications. And, as the maintainers of the API Platform framework, we also do our best to help the community on StackOverflow when we have some free time. Until recently we were just checking periodically the StackOverflow website for new questions. But because all our notifications (GitHub, Travis, Twitter…) except the one from StackOverflow were centralized on Slack, it wasn’t optimal.

So I created a tiny Slack bot (just 150 LOC) to monitor StackOverflow (or any other site from the StackExchange galaxy) and automatically post new questions in dedicated Slack channels.

This bot is written in Go, the source code (MIT licensed) as well as binaries are available on GitHub. A Docker image is also available to easily run the daemon locally or on your servers.

To install the bot, start by registering a new Slack bot, the run the daemon. For instance, using Docker:

docker run -e DEBUG=1 -e SLACK_API_TOKEN=<your-API-token> -e TAG_TO_CHANNEL='{“stackoverflow-tag”: “slack-channel”}’ dunglas/stack2slack

You can monitor as many SO tags as you want, and map and choose in which Slack channel questions must be posted.

Last but not least, if you rely on Kubernetes to manage your servers (or, as we do, use Google Container Engine), you can install Stack to Slack in a single command thanks to the provided Helm chart:

  1. Clone the Git repository: git clone [email protected]:dunglas/stack2slack.git
  2. Install the provided chart: helm install  –set slackApiToken=<your-API-token>  –set tagToChannel.stackExchangeTag=slackChannel  ./chart/stack2slack

If you like this bot, give it a star on GitHub. If you’re looking for skilled Go developers, or bot and API experts, drop us a mail!

Related posts:

  1. Using the “103 Early Hints” Status Code in Go Applications
  2. A Structured HTTP Fields Parser and Serializer for the Go Programming Language
  3. PHP et ses tags
  4. Ne fermez pas vos tags à la fin des fichiers PHP

1 thought on “Stack2Slack: a Slack bot written in Go to monitor StackOverflow tags”

  1. hermawanwiwid says:
    November 23, 2017 at 7:25 am

    Hmm, nice idea. Is there any team or group for building this program?

    Reply

Leave a Reply Cancel reply

Follow me on Twitter

My Tweets

Subscribe to this blog

Recent Posts

  • Goroutines, threads, and thread IDs
  • New in Caddy 2.5: Redact Sensitive Data from Your Logs
  • Building Decentralized Web Apps with Solid and PHP
  • JSON Columns and Doctrine DBAL 3 Upgrade
  • Preventing CORS Preflight Requests Using Content Negotiation

Top Posts & Pages

  • JSON Columns and Doctrine DBAL 3 Upgrade
  • Using the "103 Early Hints" Status Code in Go Applications
  • Generate a Symfony password hash from the command line
  • Building Decentralized Web Apps with Solid and PHP
  • PHP 7: Introducing a domain name validator and making the URL validator stricter
  • Webperf: PHP after Server Push
  • Vulcain: HTTP/2 Server Push
 and the rise of client-driven REST APIs
  • New in Caddy 2.5: Redact Sensitive Data from Your Logs
  • Goroutines, threads, and thread IDs
  • Installing a LaTeX environment on a Mac

Persistence in PHP with the Doctrine ORM

Persistence in PHP with the Doctrine ORM

Tags

Apache API API Platform Buzz Caddy Docker Doctrine Go Google HTTP/2 Hydra hypermedia Hébergement Javascript JSON-LD Kubernetes La Coopérative des Tilleuls Les-Tilleuls.coop Lille Linux Mac Mercure Messagerie Instantanée MySQL Open Source PHP Punk Rock Python React REST Rock'n'Roll RSS Schema.org Security SEO SEO Symfony Symfony Live Sécurité Ubuntu Vue.js Web 2.0 Wordpress XHTML XML

Archives

Categories

  • DevOps (24)
  • Mercure (3)
  • Opinions (91)
  • Programming (179)
    • Android (5)
    • Go (12)
    • JavaScript (43)
    • PHP (137)
      • API Platform (60)
      • Symfony (89)
    • Python (14)
      • Django (5)
  • Security (15)
  • SEO (24)
  • Talks (37)
  • Ubuntu (68)
  • Wordpress (6)

Blogoliste

  • API Platform
  • Les-Tilleuls.coop
  • Mercure.rocks
  • Vulcain.rocks
© 2022 Kévin Dunglas | Powered by Minimalist Blog WordPress Theme