Meet Flower, the Flowdock bot

Flowdock is a team collaboration and group chat service, similar to Campfire.

Flowdock is also the group chat service of choice here at the R&D dept. To make it more fun and/or usable, we made this bot.

Flower, the Flowdock bot was written in Ruby, and made to be easy to extend with your own commands.

How do I use it?

  1. Sign up for Flowdock if you haven’t already
  2. Create a new Flowdock user account for your Flower bot. Give it a nickname, for example “Bot”, or “Steve”.
  3. Download the source code from Github
  4. Copy and rename config.yml.example to config.yml, and fill it with your settings
  5. rake run
  6. Mention your Bot in the chat to command it

Writing my own commands

You should write your own commands to make Flower fun and/or useful for your team.

This is easy. Simply create a class like this in lib/commands that inherits Flower::Command:

MyCommand.respond will be invoked when a message prefix matches what you respond_to. Arguments passed are:

  • command – The matched command
  • message – The entire message
  • sender – A hash with sender user id/nick info: {:id => 123, :nick => "Jonas"}
  • flower – The Flower instance, that can say or paste something. Both methods can take the option {:mention => sender[:id]} to highlight a message to that user in the chat.

A few commands can be found in our separate command repository at Github: https://github.com/mynewsdesk/Flower-Commands

The really fun and useful commands still remains to be written, but Flower provides us with a nice API.

So what do you think? What commands should be implemented next? Is anyone out there using Flowdock?

About Richard

Developer at Mynewsdesk.
Posted by Posted in Services, Workflow Tagged ,
  • http://twitter.com/mutru Otto Hilska

    Great initiative! Let us know a bit later what are the coolest applications for the bot. :)

     - Otto, Flowdock

    • Anonymous

      Thank you Otto for your blessing :)

  • http://www.facebook.com/profile.php?id=624278280 Jan Wikholm

    Hmmmh… One application I could think of would be to have the bot automate build/deploy tasks in Jenkins with text commands and then report back on success etc.

    • http://twitter.com/martinsvalin Martin Svalin

      We use Capistrano for deployment here, but yes, it did occur to me to send deploy status messages to the chat. I think that will be my first hack on this project. :)
      We’ll see if having the bot send deploy commands is something we’re comfortable with. 

  • Pingback: Nodeta » Flowdock API Out Now!

  • taco

    Before you start screaming, please note that the flow name in the .yml is case sEnstive!