Open rjnordeen opened 7 years ago
you can, its documented on the main page:
You can use the bot to send scheduled Looks to Slack.
Click "Schedule" on a Look
Set "Destination" to "Webhook"
Leave "Format" set to "HTML Attachment". The format selection is ignored.
Enter the webhook URL.
/slack/post/channel/my-channel-name
/slack/post/group/my-channel-name
/slack/post/dm/myusername
These URLs are prefixed with the URL your bot. So, if yoru bot is hosted at https://example.com
and you want to post to a channel called data-science
, the URL would be https://example.com/slack/post/channel/data-science
.
You'll need to make sure that the LOOKER_WEBHOOK_TOKEN
environment variable is properly set to the same verification token found in the Looker admin panel.
Thanks - I was actually asking about a dashboard, similar to how you do for email. I have a dashboard with a ton of looks and dont want to schedule them all.
there is a webhook
destination option for scheduling dashboards as well looks. Let me know if you try it, when I've attempted scheduling dashboards like looks, I've gotten an error I mention in the issue I just posted.
Apologies, dashboards aren't supported at this time for scheduling.
Do you think you want the dashboard to come through to Slack as a PDF or as a collection of the types of "native" Slack attachments the bot normally sends to Slack?
I think a PDF would be first good step, not sure how a collection of native slack attachments would look
How much work would this be for you guys? I also vote PDF.
I think this can be made to work, we've got some other things happening in this space that may make this a bit easier in the relatively near term.
+1
@wilg This has been open for a year now. Any progress on this? Sending looks via slack is great, but being able to send one consolidated dashboard would be more ideal. Doesn't look like there has been much activity on this in a while.
@wilg Is sending dashboards through webhooks officially supported yet? I can set it up in the interface, but I get a "Error: request entity too large" for a dashboard with 6 tiles, regardless of whether I try to post it as a PDF or anything else.
I believe sending dashboards is supported via webhooks.
The Slack Action (which is different than Lookerbot) should support sending dashboard PDFs today: https://docs.looker.com/admin-options/platform/actions
Oops to clarify I believe Looker supports sending dashboards to webhooks, but Lookerbot does not. Are you talking about receiving it via Lookerbot or by some custom webhook service you've created?
@wilg we're currently posting looks through a webhook that hits our Lookerbot. We could use Looker actions, but it looks like the Slack action relies on a deprecated Slack token so doesn't seem ideal.
The documentation at https://github.com/looker/actions/blob/master/src/actions/slack/README.md and https://api.slack.com/custom-integrations/legacy-tokens explicitly says not to share Slack legacy tokens with another application, which I think blocks us from using data actions as a way to deliver dashboards into Slack channels.
So, I would like to +1 this issue to have lookerbot support scheduled dashboards since it appears to be the correct way to get this behaviour. (We just implemented lookerbot and I didn't realize this was a limitation at the time. We're still excited to be integrating Looker and data into our discussions in Slack, but this will create a lot of unnecessary work for end-users IMO.)
What is the cause of the error? Is there any way for us to work around it?
Thanks!
We are in the process of moving the Slack Action to use OAuth rather than Slack's legacy token, so that should become an option in the near future for you. We are definitely intending the Slack Action to be a more accessible solution for sending data to Slack that doesn't require setting up a whole server, so we want to support that fully and properly.
It is possible that you can give the Slack Action a "Bot User OAuth Token" instead of a legacy token and it will "just work". (This is the same token Lookerbot uses and there's some instructions on how to find it here: https://github.com/looker/lookerbot#create-a-new-bot-in-slack).
It would be good for Lookerbot to support sending PDFs to Slack as well, but it's simply not supported so various errors are expected. I don't think it would be hugely difficult to add to Lookerbot, but as we are focusing on the Slack Action as our primary push integration with Slack I am not sure if I'll be able to get to it soon. (Lookerbot remains our primary pull solution, where you can pull data into Slack by talking to the bot.)
Sorry to take things a bit off-topic, but just stumbled on this thread. Is there a rough timeline for the improvements to the Slack Action?
@bayyar Yes, we are hoping for a timeline of one or two months for updating the Slack action to use OAuth. A future version of Looker will support the underpinning additions to the Action API to make OAuth authentication possible, and then we'll need to update the Looker Action Hub (https://github.com/looker/actions) to make use of it.
We'd love to be able to schedule a dashboard to post to slack via looker bot