Using Lookerbot for Slack

(Fab) #21

Is there a way to get rendered images in slack?

here is my look in Looker

and here is my look in slack

(Wil Gieseler) #22

This is likely more to do with using html for image ticks than the bot. Lookerbot renders the image at the default size of the API (I think 554x415), and I suspect at that size the column chart chooses to render the non-HTML version.

This is a weird issue with this workaround and we’re considering introducing an image LookML type that may solve this problem (and some others).


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

(aleks) #24

Hi @jesko!

It is currently not possible to clear cache and refresh a look directly though Lookerbot. I’ll pass your idea to our product team on your behalf.

As a workaround you can specify persist_for on the explores your Lookerbot is running on.


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}”:

(sam) #26

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.


@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 :slight_smile:

(sam) #28

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

(Dustin Engstrom) #29

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


@dengstrom, you’ll need to go to the i_looker explore here:

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

(sam) #31

@dengstrom you might also find this intro to the i__looker history explore helpful.

(Dustin Engstrom) #32

Thanks, @jesko!


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”

(aleks) #34

Hi @jyau

You can do this by wrapping the string in the %character - for example %Singapore%. If you’d like to search for strings that start with certain word, you’d need to put the % at the end of the filter value - for example London%. The same applies to filters that end with a certain word - for example %Paris


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

(Alexander Wang) #36

I just deployed Lookerbot through Heroku and integrated it with my company’s Slack domain. However, I am getting an out of date error in Slack when I try to do a Lookerbot command.

Is it possible that this issue noted in Github is the source of the problem?

(Mike Ghen) #37

I just installed the lookerbot on an instance in Google Cloud engine. Looks like it running:

Nov 12 22:24:12 looker-slack-bot yarn[10265]: yarn run v1.3.2
Nov 12 22:24:13 looker-slack-bot yarn[10265]: $ ./node_modules/.bin/ts-node ./lib/index.ts
Nov 12 22:25:09 looker-slack-bot yarn[10265]: Using Looker information specified in individual environment variables.

But in Slack when I type @looker help I get the slackbot reply. How do I troubleshoot why it’s not working?

(Sara Guzman) #38

Hi Mike,
I noticed that you are using @looker help, to actually invoke the bot you can use /looker help. Give that a try and let me know how it goes :slight_smile:

(Mike Ghen) #39

Ok, I tried that /looker. I just got:

/looker is not a valid command. In Slack, all messages that start with the “/” character are interpreted as commands.

Does that mean I didn’t set something up right? I thought slash commands were optional?

How do I get @looker help to work? I see in the git repo’s instructions that I should do @looker help to verify it’s working. Also says re: Slash Commands:

Slash commands are not required to interact with the bot. You can DM the bot directly or mention the bot like:

@looker help

and use all the functionality.

(Sara Guzman) #40

Hi Mike,
Can you show me what is the slackbot reply that you get when trying @looker help? I’d suggest that you come on chat (chat support), or email us to so we can further troubleshoot this issue in more detail with you.