Questions tagged [hubot]

Hubot is a an automation service / application. You can use hubot to provide access to resources through chat rooms, web services or other interfaces.

Hubot is a robot which runs using node.js and is written in coffee-script.

The documentation on the site does little justice to what Hubot can be used for, because it’s hard to explain that Hubot can be used for succinctly.

In short you can use Hubot to do anything that you are able to program.

See... terrible explanation.

Hubot can be configured to join your company chatroom and based on key words or regular expressions, Hubot can run commands, call APIs, execute scripts or programs… anything at all in the background and return the results to you in the chat room, without you having to change context.

I will give some examples of what Hubot can be used for to make understanding its value.

The two methods I will explain are: hear and respond . e.g.

robot.hear    /restart iis on "(.*)"/i, (msg) ->

robot.respond /restart iis on "(.*)"/i, (msg) ->

If you implement this as a respond function, you must address hubot directly in the chatroom.

john: hubot restart iis on myservername
bill: john just directly asked hubot to restart iis on myservername

However, if you were to implement this as a hear function. You could type a full sentence such as

john: I think if we restart iis on myservername it will resolve the issue.
bill: oops you just restarted the server

Hubot would automatically execute a restart of your iis server. In this case that would have been a bad thing.

With this basic premise that any task you can automate, can be implemented through hubot. You simply map a regular expression for hubot to watch for and either "hear" or "respond" to.

Here are a few ideas of how this could be of value:

  • Allow a person with no production access to execute specific tasks in production
  • Give developers are mechanism of requesting development environment refreshes from production in a chat room.
  • Since your interface to this functionality becomes your chatroom, you can use the chat room as audit documentation of who requested what task be completed.
  • Temporarily grant someone access to perform specific tasks by inviting them to special chat rooms, and removing them from the chatroom after the fact.

Here is a slide deck which discusses hubot/ chatops

ChatOps at GitHub by Jesse Newland

I hope this provides better insight into what hubot can do for you.

Find any repetitive task you do and give it a shot, see if you can write a hubot script to automate that task.

Check out sample scripts in the following deprecated repository for inspiration.

DEPRECATED HUBOT-SCRIPTS REPO

Official Info:

official hubot site

hubot source code

277 questions
0
votes
0 answers

Having trouble with HTTP request from Smartsheet API in CoffeeScript

Preface: It's been a while (2 years) since I was in AP Comp Sci, and I've never worked with CoffeeScript, hubot, HTTP requests, or an API before last week. Pls be gentle. At my job, I've been making a bot (implementing GitHub's hubot) for our Slack…
0
votes
2 answers

How to keep a Heroku dyno alive for a certain time interval?

Since the start of June 2015, free Heroku dynos have had to sleep for six hours in a 24-hour interval, thus rendering things like New Relic useless. I've got a Slack bot running on a free Heroku dyno that we use around the office for parsing…
jwilso48
  • 1
  • 2
0
votes
1 answer

Hubot in Terminal

I'm on a MacBook Pro running OS X Yosemite Version 10.10.3, I'm writing my code in TextMate version 2.0-beta.7.4, and all of the heroku and hubot is the newest version. In a class we had to install Hubot to our computer for local testing of code in…
0
votes
2 answers

Creating a custom bot rather than using Hubot with Firebase

I want to connect a custom Hubot to my Firebase database in my app, unfortunately, Firebase does not have an adapter to connect my Hubot implementation to. I will be making custom scripts and not really using any community scripts. Does it make…
MichaelScaria
  • 1,560
  • 2
  • 16
  • 25
0
votes
1 answer

Hubot change IRC channel topic

I'd like our Hubot to manage the topic of certain IRC channels. When I have hubot send "/TOPIC #channel New Topic" that text just ends up in the channel. I know I can add a listener for IRC topic changes (like irc-topic.coffee) with:…
notpeter
  • 1,046
  • 11
  • 16
0
votes
1 answer

Declaring Variables for Coffee.Script

I'm a new Hubot/Node.js/CoffeeScript user. I'm looking at the UptimeRobot script for Hubot. When I include that in my package I'm getting the error: ERROR Error loading scripts from npm package - Error: Uptime Robot API Key must be provided at…
boostn
  • 21
  • 1
0
votes
1 answer

Trouble assigning multiple nodejs exports return values to variables

I have two files, a main file and a module file. Inside the module file, I export two functions, which return objects. In the main file, I am setting a variable to the return value of each method. However, each variable is set to the return value of…
bronzehedwick
  • 2,862
  • 2
  • 22
  • 28
0
votes
1 answer

Make Hubot run preconfigured commands automatically

I'm using Hubot on flowdock and I'm trying to make Hubot post automatically the respond of a user command. With the help of https://leanpub.com/automation-and-monitoring-with-hubot/read#leanpub-auto-periodic-task-execution , I've managed to make…
0
votes
1 answer

How to git push heroku master by using hubot on hipchat?

I installed hubot, heroku and hipchat. I deployed Hubot to Heroku and I tested on hipchat, I typed some command line example: @hubot help, @hubot image me "hubot".... and It worked fine. But in my project, I need use hipchat to deploy my project to…
0
votes
1 answer

Hubot on Ubuntu error: Type error bad argument

Installed Hubot on a clean latest Ubuntu desktop. First attempt at running Hubot results in this: cd /opt/hubot && ./bin/hubot connect deprecated multipart: use parser (multiparty, busboy, formidable) npm module instead…
Cromulent
  • 79
  • 2
  • 7
0
votes
0 answers

Error installing hubot on Windows

I am installing hubot on Windows. I read the instructions from github hubot repository, but when I tried the command bin/hubot I get the following error $ node node_modules/coffee-script/bin/coffee bin/hubot connect deprecated multipart: use parser…
0
votes
1 answer

Parsing JIRA webhooks with Hubot

I'm attempting to parse a JIRA webhook using a Hubot script. At the moment, I just have a very simple Hubot script to print out the posted body: module.exports = (robot) -> robot.router.post '/jirawebhooks/foo-tickets', (req, res) -> …
victorhooi
  • 16,775
  • 22
  • 90
  • 113
0
votes
2 answers

Hubot regexes - stop at the first match, rather than trying all of them?

I have a simple Hubot script that is looking for certain trigger words, then replying with a URL based on those trigger words. A slightly contrived example: robot.hear /CAT/i, (msg) -> msg.send "This is a URL -…
victorhooi
  • 16,775
  • 22
  • 90
  • 113
0
votes
1 answer

Stop Hubot (with Flowdock) from responding to itself?

I'm using Hubot with the Hubot-Flowdock adapter. I'm using robot.hear to respond to messages with a certain string in them (e.g. "chocolate"). I then call msg.send with a message, which also happens to contain the trigger string ("chocolate") in…
victorhooi
  • 16,775
  • 22
  • 90
  • 113
0
votes
1 answer

Generate table in hubot brain and insert values

I'm trying to make a table of values inside hubot and he pass it's values to redis-brain.coffee but i just know a way: robot.brain.get("blablabla"). This will get a string from redis-brain and i need some kind of table. How I'll use it: At first…