Using Lookerbot for Slack

(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.

1 Like


@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

1 Like

(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.


(Mike Ghen) #41

It’s fine now, I found out where to look in the logs, I was having connection errors. @looker help is working for me now.


(Svante Esbjörnsson) #42

About those Slash Commands, we can’t get that part to work. When I try in Slack I get this:

slackbot [2:16 PM]
Darn - that slash command didn’t work (error message: Failure when receiving data from the peer). Manage the command at Looker.

When I type '@lookerbot test db b I do get a nice graph so that part is working.

Anyone have some idea why the Slash Commands won’t work.


(bernard.kavanagh) #43

Hi Svante,

Is the /looker help command working for you? If not please come on chat and we can troubleshoot it from there for you.

Thanks :slight_smile:


(Felipe Bonzanini) #44

We have been trying to successfully setup lookerbot in our company. We were able to retrieve data that are plain text fine, but when we try to retrieve images, nothing happens, sometimes it gives an error after many minutes and its a generic one like “An error has occurred”.

I was not able to find any log messages, I tried to start yarn in dev mode but I think the issue is not on yarn level.
We tried using Google Cloud bucket as well as S3 buckets but we had no success on both of them. The files are not being uploaded to the buckets.

Can someone help me to setup a debug mode so I can at least see whats going wrong?



(Ian) #45

We host the bot ourselves and would like to get at some of the log files for the bot to see whats going on but I don’t know where to look (should I actually just be looking at the looker log files instead - you recommend a good log file viewer)? We have a handful of looks that when you schedule them to slack they display the same error as the above poster - “An error has occured”. If I change the look to a table viz then its fine. We have plenty of other looks scheduled to slack that work fine (upload the image to GCP and displays in slack).