 
           # Build links for message sending
           title = formatTitleWithTemplate(panel.title, template_map)
-          db = if query.useUid then dashboard.dashboard.uid else "db"
-          imageUrl = "#{endpoint.host}/render/#{query.apiEndpoint}/#{db}/#{slug}/?panelId=#{panel.id}&width=#{query.width}&height=#{query.height}&from=#{timespan.from}&to=#{timespan.to}#{variables}"
+          uid = dashboard.dashboard.uid
+          imageUrl = "#{endpoint.host}/render/#{query.apiEndpoint}/#{uid}/?panelId=#{panel.id}&width=#{query.width}&height=#{query.height}&from=#{timespan.from}&to=#{timespan.to}#{variables}"
           if query.tz
             imageUrl += "&tz=#{encodeURIComponent query.tz}"
           if query.orgId
             imageUrl += "&orgId=#{encodeURIComponent query.orgId}"
-          link = "#{endpoint.host}/dashboard/db/#{slug}/?panelId=#{panel.id}&fullscreen&from=#{timespan.from}&to=#{timespan.to}#{variables}"
+          link = "#{endpoint.host}/d/#{uid}/?panelId=#{panel.id}&fullscreen&from=#{timespan.from}&to=#{timespan.to}#{variables}"
 
           sendDashboardChart msg, title, imageUrl, link
 

    robot.logger.debug pname

    # Call the API to get information about this dashboard
    callGrafana endpoint, "dashboards/db/#{slug}", (dashboard) ->
      robot.logger.debug dashboard

      # Check dashboard information

      return

    for dashboard in list
      response = response + "- #{dashboard.uid}: #{dashboard.title}\n"

    # Remove trailing newline
    response.trim()
