   buf = make_alert_message(query_config, data, columns, msg)
   buf += "\n"
   buf += "To claim this alert use the id #{id}. \"influx claim #{id}\"\n"
-  msg.send buf
-
+  if msg
+    msg.send buf
+  else
+    console.log("sending room alert")
+    room = nconf.get("HUBOT_INFLUXALERTS_ALERT_ROOM")
+    if room
+      robot.messageRoom room, buf
 
 make_alert_message = (query_object, data, columns, msg) ->
   query_columns = query_object.alert_msg.columns

check_alert = (robot, msg, query_name, query, database) ->
  influx_clients[database].query(query, (e, results) ->
    if !results
      return
    for data in results
      columns = data.columns


  alertIntervalId = false

  #automatically turn on alerts if configured
  alert_room = nconf.get "HUBOT_INFLUXALERTS_AUTO_ALERT_ROOM"
  if alert_room
    alertIntervalId = setInterval () ->
      check_for_alerts robot
    , nconf.get("ALERT_HUBOT_INFLUXALERTS_CHECK_INTERVAL")

  robot.hear /influx alerts on/i, (msg) ->
    if alertIntervalId
      msg.send "Alert checking already on"
      return

    alertIntervalId = setInterval () ->
      check_for_alerts(robot, undefined)
    , nconf.get("ALERT_HUBOT_INFLUXALERTS_CHECK_INTERVAL")
    msg.send "Alert checking toggled on (corpsethumb)"

