Question

Using Lookerbot for Slack


Userlevel 5
Badge

The content in this post has been updated and moved to the Looker Help Center. Please visit the Using Lookerbot for Slack article for more information about Lookerbot. 

 


54 replies

Userlevel 2

+1 for a Hipchat bot

Looks great - are you building one for Hipchat?

Thanks @aleks, would be nice to be able to do this via the Lookerbot rather than changing persist_for.


Also, any idea why it’s not possible for us to use to Lookerbot to access the i_looker model? The bot gives me a “forbidden” message. One example use for this is that we regularly need to check PDT avg build times and daily build counts for specific PDTs similar and it would be useful to be able to ask the bot for this info.


See this example for a specific PDT, we’d use a command similar to “@looker pdt builds {pdt_name}”:

@dengstrom, you’ll need to go to the i_looker explore here: https://yourcompany.looker.com/explore/i__looker/history


Then you filter for:

History Source = Other

History Message = Building derived table YOUR_PDT_NAME


And the fields I selected:

History Created Date

History Query Run Count

History Average Runtime

Have you tried running this in AWS Lambda yet? You wouldn’t need a server then if it works.

Userlevel 2

Hi Holger,


Thanks for letting us know the preference. At the moment using wild card would be the only option. We have a feature request to allow the default filtering using “contains”. I have +1 for you.


Xin

Userlevel 5
Badge

Cool! Thanks izzy, but I’ve got my hands full with more sought-after other Looker fun, so I’m going to wait for your new integration. I know you guys will do the better job of it anyways 🙂

Is there a way to get rendered images in slack?


here is my look in Looker


and here is my look in slack

Userlevel 2

Now that Version 0.0.3 is out - is there an easy way to update? I’m using Heroku as per the docs.

Is it possible to use a command with a filter that uses the “contains” criteria instead of “equal to”? No matter what I do, Lookerbot seems to change the filter criteria to “equal to”

Ah, thanks. That makes perfect sense. I hadn’t thought to try that.

Is there a way to configure a custom command not to get results from cache and to run the query instead?

@sam, thanks for the quick response, that’s most probably the reason, we didn’t quite trust our Lookerbot enough to give him admin rights 🙂

Userlevel 2

Does a query rerun when the Slack page is reloaded, or is it run only when the Slack user initially calls for it?

xref https://discourse.looker.com/t/hosted-slack-lookerbot/2334

API gateway to expose it as a service I suppose. I haven’t had a chance to look yet. I used lambda when playing around with the Looker API. I used the API gateway to call a lambda function that made requests to the Looker API. It had a bit of lag but worked fine to get data and display it in a simple nvd3 chart.

Userlevel 1

+1 Lookerbot for HipChat!

@jesko That’s a cool PDT chart. Would you mind sharing where you’re pulling that data from in Looker?

Thanks, @jesko!

In Lookerbot’s help menu listing the available commands, you can get a description of the dashboard that gets returned. To do this:



  1. In Looker, navigate to the dashboard.

  2. If you are using dashboard locks, unlock the dashboard.

  3. Click the dashboard’s gear and choose Edit Dashboard Settings.

  4. In the Description field, enter the description you want to appear in the Lookerbot help menu.

  5. Click Save.

  6. If you are using dashboard locks, lock the dashboard.

Are there any good hacks for staying on Hobbyist Heroku tier but keeping the dynos active during business hours? We keep needing to restart the bot due to idling

@Mark_Brown what would you see as the event source to the Lambda?

My point of concern was that (unless i misunderstand), a slackbot needs to listen - there isn’t any process for sending it an event. It listens to the channel(s) it belongs to.


I’m a big Lambda advocate: have used it successfully and surprisingly smoothly with both API Gateway and Kinesis stream as sources. That being said, I don’t see a way for it to work here without an additional process to listen to the channel and send the events to API Gateway or whatever. The cost of that is, in my mind, more than that of running a server for the bot itself (which is tailor-made for listening to slack channels).

Userlevel 5
Badge

Just a thought here @jesko - does the user to which the bot’s API credentials are connected have Admin privileges?

The i__looker model is only accessible by admins, so this would be a prerequisite. There may be something else special about i__looker that prevents Lookerbot from working here, but that would be my first guess.

Userlevel 5
Badge

Totally fair @jesko 🙂 That’s a lot of power to give all your Slack users!

Reply