       rundeck.jobs().run name, null, (job, results) ->
         if job
           robot.logger.debug inspect(results, false, null)
-          msg.send "Running job #{name}: #{results.result.executions[0].execution[0]['$'].href}"
+          msg.send "Running job #{name}: #{results.executions.execution[0]['$'].href}"
         else
           msg.send "Could not execute Rundeck job \"#{name}\"."
     else

    if robot.auth.hasRole(msg.envelope.user, rundeck.adminRole)
      rundeck.jobs().run name, query, (job, results) ->
        if job
          msg.send "Running job #{name}: #{results.result.executions[0].execution[0]['$'].href}"
        else
          msg.send "Could not execute Rundeck job \"#{name}\"."
    else

#   "hubot-auth"
#
# Configuration:
#   HUBOT_RUNDECK_URL - root URL for Rundeck, not including api path
#   HUBOT_RUNDECK_TOKEN
#   HUBOT_RUNDECK_PROJECT
#
